tlaverdure / laravel-echo-server

Socket.io server for Laravel Echo
MIT License
2.65k stars 510 forks source link

Inconsistent behavior and receiving 500 error while testing multiple times #424

Open nicolasvahidzein opened 5 years ago

nicolasvahidzein commented 5 years ago

So this is getting to be quite stressful.

I have a working chat applications where i subscribe to many individual chatrooms and i am able to connect to all of them on load.

I then enter and leave my chatroom section and i see them all connecting on the laravel-echo-server CLI, but after a while, many 3 or 4 times, it starts bugging out. Some channels cannot authenticate.

? [4:39:12 PM] - sQKACxMPAkVuz7TBAAAA could not be authenticated to private-chats
{
    "message": "Server Error"
}
Client can not be authenticated, got HTTP status 500
? [4:39:12 PM] - sQKACxMPAkVuz7TBAAAA could not be authenticated to presence-chatMessages.3420f166-d890-4171-a392-77928c6850f9
{
    "message": "Server Error"
}
Client can not be authenticated, got HTTP status 500

I don't have an explanation, anyone have any ideas where this behavior is coming from?

catalinux commented 5 years ago

Those are laravel errors. You should see errors either in laravel logs or php logs.

nicolasvahidzein commented 5 years ago

ok i will dig deeper, thanks. I will revert and or close when i know more.

nicolasvahidzein commented 5 years ago

no log errors at all in laravel. it works one second then it bugs. Any other idea?

AdSegura commented 5 years ago

More than one month but did you resolve the issue ?

It's from /broadcasting/auth laravel-backend.

You can debug what's laravel returning if you place console.log(response, body) just below this line in private-channel

run npm run build start laravel-echo-server and you will see whats behind scenes.

nicolasvahidzein commented 5 years ago

i started using laravel websockets instead, works like a charm.