Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Steady-Entertainment's avatar

Jetstream session errors

~/reniar/code/OfflineJetstream/
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `sessions` where `id` = BVmwk1y0yP3VqLBaRqUAvUGfdRxqEd0f6EuQh87a limit 1)
http://offlinejetstream.test/

I think currently jetstream has some issues with sessions and livewire.session

this is the seconds post of me today regarding this topic.

First time is installed jetstream into an existing livewire project and that installed all the jetstream magic into the project

  • composer require laravel/jetstream - inside an existing livewire project. (not recommended at all)

solution for the first scenario

kill the project start from scratch and manually migrate MVC

The second time I made a jetstream application from scratch and just tweaked minor front end stuff the only files i tweaked were the following blade files as you can see on my gs (git status)

	modified:   resources/views/vendor/jetstream/components/application-logo.blade.php
	modified:   resources/views/vendor/jetstream/components/authentication-card-logo.blade.php
	modified:   resources/views/vendor/jetstream/components/authentication-card.blade.php

Without doing anything to that fresh application no commands on the command line nothing on other applications jetstream destroyed itself again

is there some sort of self destruction magic that I am not aware of?

solution for this scenario

was

-mfs (php artisan migrate:fresh)

Conclusion:

In my experience jetstream has issues with its sessions and is there fore unstable atm

https://laracasts.com/discuss/channels/livewire/base-table-or-view-not-found-1146-table-livewiresessions-doesnt-exist-sql-select-from-sessions-where-id-3oagmloz5iyz

0 likes
7 replies
Snapey's avatar

Your opinion is misguided I'm afraid.

1 like
Steady-Entertainment's avatar

Hey Snapey :)

I posted it under feedback and that is my user experience.

I mean I didn't even start to work on it.

I just did a fresh install again.

Now the bug happens from time to time and then disappears.

If you think that my feedback is misguiding I would be more than happy if you could guid me in the right direction.

Any ideas or hints are welcome but I am still stepping in the dark about this.

I will investigate further (I think it has something to do when you get logged out automatically and your user session is still in the database).

When I find out how to reproduce the bug exactly I will make an issue on git hub.

If I am wrong and it is not a bug than I would love to find the solution.

Thx for your answer anyways

https://i.imgur.com/QwPw4yE.png

Steady-Entertainment's avatar

I think you were right in the end ... I never experienced the bug again ... I think there was something unrelated to jetstream ...

mea culpa :D

Snapey's avatar

The point is, Jetstream does not use anything new that has not been tried by 1000's of developers over the last few years. The only difference recently has been the default changing from file based sessions to database sessions - but that has been an option for over 5 years and is battle tested.

Steady-Entertainment's avatar

Okay thank you but anyways the problem is back in business ...

~/reniar/code/OfflineJetstream/
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `sessions` where `id` = 4m7cXbjFonKGSFlIbXSsopA2h7c9fZoHoofZ5bGQ limit 1)
http://offlinejetstream.test/user/profile
Steady-Entertainment's avatar

I have to hit refresh exactly 3 times and it works again every morning when I wake up and go to a jetstream application exactly 3 times it changes the session ID 3 times and then it works ...

Snapey's avatar

seems more like you have issues with your database setup. Is it local?

Please or to participate in this conversation.