qruto/laravel-wave

[Bug]: Can't connect to private channels!

Closed this issue ยท 5 comments

What happened?

In previous versions of laravel-wave when connecting to a private channel a request is made to /broadcasting/auth and a body is sent:

socket_id: xxxxxx.xxxxxx
channel_name: private-user.1

in the new version of laravel wave it is not possible to connect to a private channel! probably because it doesn't send a request to /broadcasting/auth

How to reproduce the bug

window.EchoWave = new Echo({
   broadcaster: WaveConnector,
   debug: true,
   endpoint: '/wave',
   authEndpoint: '/broadcasting/auth',
 })

when connecting to a private channel it automatically makes a request for /broadcasting/auth! what is not happening at the moment! this way it is not possible to receive events in private channels

 window.Echo.private('user.1').listen('RealTimeNotification', e => {
   console.log('Echo user 1 Private ', e.message)
 })
 window.Echo.private('user.2').listen('RealTimeNotification', e => {
   console.log('Echo user 2 Private ', e.message)
 })
 window.Echo.channel('events').listen('RealTimeNotification', e => {
   console.log('Echo ', e.message)
 })

Package Version

0.7.0

PHP Version

8.2.0

Laravel Version

10.10

Which operating systems does with happen with?

Linux

Notes

No response

It was simply a simple detail!!

take a look :

Add method in request fetch

How to fix this issue? @ezequidias

Using latest version (which looks merged?) does not make the auth call on private channels. Rolling back to version 5.0 sends the auth call but seems other issues arise.

Would love to see this working!

@lianmaymesi This bug has now been fixed (pull #15). However, there is still a need to create a new version of the laravel wave client, probably version 0.7.2!

@slavarazum is there any forecast for an update of the laravel wave client (version 0.7.2)?

Sorry for the delay, had a hard time in my country...

Just released the update with various bug fixes include missing method setup.
Let me know if something goes wrong ๐Ÿค