angular-laravel-echo icon indicating copy to clipboard operation
angular-laravel-echo copied to clipboard

Channel does not exist

Open prullenbak opened this issue 6 years ago • 2 comments

Hello,

Trying to set this up, we get an error "Channel 'test-channel' does not exist" When trying to listen.

this.echoService.listen('test-channel', 'test-event').subscribe( data => 
    console.log(data) 
);

Any ideas what's wrong? Thanks.

prullenbak avatar Jan 30 '19 14:01 prullenbak

Tried to join first, with this.echoService.join('test-channel','public'), but no luck. It gets rid of the error, but no event is passed from pusher.

prullenbak avatar Jan 30 '19 15:01 prullenbak

You indeed have to join first, but without more context I'm not going to be able to help you. I can assure you that the library works as I've recently implemented it into one of our own projects and did not encounter any issues, both "listen" and "notification" work as expected. I assume this is more a problem with the backend (message is sent on private channel - you join a public channel) or app (wrong pusher appId, etc) config than it has anything to do with the package. Please make sure that you follow the prerequisites/documentation for laravel echo/broadcasting as well since this package (mostly) provides some (angular style) syntactic sugar around that package and a few convenience methods.

chancezeus avatar Jan 30 '19 16:01 chancezeus