Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Private Channels not working #8

Closed
MadScripter opened this issue Aug 27, 2016 · 7 comments
Closed

Private Channels not working #8

MadScripter opened this issue Aug 27, 2016 · 7 comments
Labels

Comments

@MadScripter
Copy link

MadScripter commented Aug 27, 2016

Hello, I'm using this package with Redis. When I use normal channels like Echo.channel('users').listen('UserSignedUp') I do receive the event client side, but when I use private channels, nothing happens. Even though I see that the event was fired in the Redis console.

I'm not sure if this is a problem with this package or with Echo itself. I wonder if someone else is having the same issue?

@tlaverdure
Copy link
Owner

Are you using the private() method?

https://laravel.com/docs/5.3/broadcasting#listening-for-events

@MadScripter
Copy link
Author

Yes I am.

@JulianMined
Copy link

JulianMined commented Aug 27, 2016

My server console shows

(Error): 404

{ url: 'http://homestead.app/broadcasting/auth',
form: { channel_name: 'private-chat.1' },
headers: { 'X-CSRF-TOKEN': 'viOhMUN9kuKi3o7I8VumOHmwN6fClyx6TJ0BBcnz' } }

Sorry, i forgot to add "App\Providers\BroadcastServiceProvider::class" to my config/app.php Providers.
This solved my Problem.

@tlaverdure
Copy link
Owner

@MadScripter are you setting up your broadcasting authentication properly in Laravel? The event will be emitted in the Redis console, but you won't be able to listen if you aren't properly authenticated to the private channel.

@MadScripter
Copy link
Author

Yes I doubled checked everything and it should all be setup correctly. The NodeJS server throws a 302 error everytime I try to broadcast to the private channel :/ The host and the authPath are correct in the options, I even tried to reinstall laravel, but nothing works..

@jonnywilliamson
Copy link
Contributor

I know this doesn't help you @MadScripter but I definitely have private channels working using this script, a laravel 5.3 installation and node 5 (see my other comments about this).

There's obviously just some very small detail that needs to be tweaked.

@tlaverdure
Copy link
Owner

1.0 is now released, please test that version and if this issue exists reopen. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants