Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the defaults tests when dashboard-route doesn't exists. #384

Closed
FoksVHox opened this issue Nov 12, 2024 · 6 comments · Fixed by #387
Closed

Issue with the defaults tests when dashboard-route doesn't exists. #384

FoksVHox opened this issue Nov 12, 2024 · 6 comments · Fixed by #387
Labels
bug Something isn't working

Comments

@FoksVHox
Copy link

FoksVHox commented Nov 12, 2024

Stack

Breeze – React with Inertia

Package Version

v6.1.9

Laravel Version

v11.30

Livewire Version

No response

react Version

v18.2.0

Vue Version

No response

PHP Version

PHP 8.2

Problem description

When you've changed the route for /dashboard in the config, and remove the /dashboard, then the tests starts to fail.

The problem is at this line, as it's expecting it to be called 'dashboard'. I've also opened a discussion about it

$this->hasComposerPackage('laravel/breeze') => redirect()->route('dashboard'),

Expected behavior

I'd expect that I don't need the /dashboard to have the tests working.

Steps to reproduce

  1. Change the config file to not use /dashboard, could use / as the redirect route.
  2. Remvoe the /dashboard route
  3. Run the tests
  4. See them fail

Reproduction repository

https://github.com/FoksVHox/socialstream-bug-report-384

Relevant log output

Symfony\Component\Routing\Exception\RouteNotFoundException: Route [dashboard] not defined. in /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php:516
Stack trace:
#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Redirector.php(154): Illuminate\Routing\UrlGenerator->route()
#1 /var/www/html/vendor/joelbutcher/socialstream/src/Http/Responses/OAuthRegisterResponse.php(28): Illuminate\Routing\Redirector->route()
#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(902): JoelButcher\Socialstream\Http\Responses\OAuthRegisterResponse->toResponse()
#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(887): Illuminate\Routing\Router::toResponse()
#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Routing\Router->prepareResponse()
#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#6 /var/www/html/vendor/joelbutcher/socialstream/src/Http/Middleware/ShareInertiaData.php(34): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): JoelButcher\Socialstream\Http\Middleware\ShareInertiaData->handle()
#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/AddLinkHeadersForPreloadedAssets.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets->handle()
#10 /var/www/html/vendor/inertiajs/inertia-laravel/src/Middleware.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Inertia\Middleware->handle()
#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(51): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(88): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#16 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middleware\StartSession->handle()
#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(75): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/HandlePrecognitiveRequests.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests->handle()
#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Pipeline\Pipeline->then()
#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\Routing\Router->runRouteWithinStack()
#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\Routing\Router->runRoute()
#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\Routing\Router->dispatchToRoute()
#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\Routing\Router->dispatch()
#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#34 /var/www/html/vendor/laravel/nova/src/Http/Middleware/ServeNova.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\Nova\Http\Middleware\ServeNova->handle()
#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\ValidatePostSize->handle()
#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\HandleCors->handle()
#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\TrustProxies->handle()
#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\Pipeline\Pipeline->then()
#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php(604): Illuminate\Foundation\Http\Kernel->handle()
#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php(365): Illuminate\Foundation\Testing\TestCase->call()
#55 [internal function]: Illuminate\Foundation\Testing\TestCase->get()
#56 /var/www/html/vendor/pestphp/pest/src/Support/Reflection.php(38): ReflectionMethod->invoke()
#57 /var/www/html/vendor/pestphp/pest/src/Support/HigherOrderMessage.php(59): Pest\Support\Reflection::call()
#58 /var/www/html/vendor/pestphp/pest/src/Support/HigherOrderTapProxy.php(66): Pest\Support\HigherOrderMessage->call()
#59 /var/www/html/vendor/pestphp/pest-plugin-laravel/src/Http.php(189): Pest\Support\HigherOrderTapProxy->__call()
#60 /var/www/html/tests/Feature/SocialstreamRegistrationTest.php(59): Pest\Laravel\get()
#61 /var/www/html/vendor/pestphp/pest/src/Factories/TestCaseMethodFactory.php(110): P\Tests\Feature\SocialstreamRegistrationTest->Tests\Feature\{closure}()
#62 [internal function]: P\Tests\Feature\SocialstreamRegistrationTest->Pest\Factories\{closure}()
#63 /var/www/html/vendor/pestphp/pest/src/Concerns/Testable.php(337): call_user_func_array()
#64 /var/www/html/vendor/pestphp/pest/src/Support/ExceptionTrace.php(26): P\Tests\Feature\SocialstreamRegistrationTest->Pest\Concerns\{closure}()
#65 /var/www/html/vendor/pestphp/pest/src/Concerns/Testable.php(337): Pest\Support\ExceptionTrace::ensure()
#66 /var/www/html/vendor/pestphp/pest/src/Concerns/Testable.php(254): P\Tests\Feature\SocialstreamRegistrationTest->__callClosure()
#67 /var/www/html/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(196) : eval()'d code(48): P\Tests\Feature\SocialstreamRegistrationTest->__runTest()
#68 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(1122): P\Tests\Feature\SocialstreamRegistrationTest->__pest_evaluable_users_can_register_using_socialite_providers()
#69 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(654): PHPUnit\Framework\TestCase->runTest()
#70 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestRunner.php(105): PHPUnit\Framework\TestCase->runBare()
#71 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(488): PHPUnit\Framework\TestRunner->run()
#72 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(349): PHPUnit\Framework\TestCase->run()
#73 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(349): PHPUnit\Framework\TestSuite->run()
#74 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(349): PHPUnit\Framework\TestSuite->run()
#75 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(349): PHPUnit\Framework\TestSuite->run()
#76 /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(62): PHPUnit\Framework\TestSuite->run()
#77 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Application.php(198): PHPUnit\TextUI\TestRunner->run()
#78 /var/www/html/vendor/pestphp/pest/src/Kernel.php(103): PHPUnit\TextUI\Application->run()
#79 /var/www/html/vendor/pestphp/pest/bin/pest(91): Pest\Kernel->handle()
#80 /var/www/html/vendor/pestphp/pest/bin/pest(99): {closure}()
#81 {main}
@FoksVHox FoksVHox added the bug Something isn't working label Nov 12, 2024
Copy link

Hey @FoksVHox! We're sorry to hear that you've hit this issue. 💙

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Socialstream code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
Copy link

Thank you for providing reproduction steps! Reopening the issue now.

@joelbutcher
Copy link
Owner

@FoksVHox I've created a PR for this, please can you install into your reproduction repository and check this works?

@FoksVHox
Copy link
Author

@FoksVHox I've created a PR for this, please can you install into your reproduction repository and check this works?

@joelbutcher It's fixed on the pr branch.

@joelbutcher
Copy link
Owner

@FoksVHox this has now been fixed in v6.1.11. Please update your composer dependencies to this version to see you issue has been rectified!🧑‍💻

@FoksVHox
Copy link
Author

@joelbutcher Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants