Closed alitnk closed 2 years ago
Apparently, when I set connectOnLogin
to false
, I get the correct Connector.
@alitnk , Same problem...
package.json:
"nuxt": "^2.15.4",
"@nuxtjs/auth-next": "^5.0.0-1616003482.75c20e6",
"@nuxtjs/laravel-echo": "^2.0.0-alpha.5",
"socket.io": "^2.4.0",
"socket.io-client": "^2.4.0",
Using "socket.io" broadcaster with socket.io > 2.4.0 version this module doesn't work (messages from server are not recieved).
nuxt.config.js:
buildModules: [
...
'@nuxtjs/laravel-echo',
],
modules: [
...
'@nuxtjs/auth-next',
],
echo:{
broadcaster: 'socket.io',
host: 'https://mysite.com:6001',
authModule: false,
//authEndpoint: ...
//connectOnLogin: ...
//disconnectOnLogout: ...
},
If I try to change authModule value to true, messages from the server are not receiving, console is clear. May be I should set one of these options:
//authEndpoint: ...
//connectOnLogin: ...
//disconnectOnLogout: ...
Expected to see at least errors in the console...
I have the same error
"@nuxtjs/laravel-echo": "^2.0.0-alpha.5",
"nuxt": "^2.14.12",
"@nuxtjs/auth-next": "^5.0.0-1617968180.f699074",
"socket.io-client": "^4.0.1"
I am connected to server but can't subscribe to any channel (private or public) so I can't receive any message.
this.$echo.private('App.Models.User.' + this.$auth.user.id)
.notification((e) => console.log('received notifications ', e));
I am logged In , please help !!
is there anyone that could listen to this Issues!!!
connection to the server from socket client is successful but I can't subscribe to any channel!
please help
Unlucky same issue. That's why have to implement subscribe/connect to private user channel on every Nuxt vuex initStore
@alitnk , Same problem...
package.json:
"nuxt": "^2.15.4", "@nuxtjs/auth-next": "^5.0.0-1616003482.75c20e6", "@nuxtjs/laravel-echo": "^2.0.0-alpha.5", "socket.io": "^2.4.0", "socket.io-client": "^2.4.0",
You don't need the socket.io package, just the socket.io-client
- Use maxium version 2.4.0 of socket.io-client
@mohsenMJ @hmsk is there anyone that could listen to this Issues!!!
connection to the server from socket client is successful but I can't subscribe to any channel!
please help
looks like there's no issue with the laravel-echo but with the naming of channel or events from Your backend .
I've found that there was a collision in naming, I was trying to access event this way ThreadCreated but the correct way was to add a dot . before the name to be .ThreadCreated and it does work. Look into documentation https://laravel.com/docs/7.x/broadcasting#broadcast-name
@alitnk I think you can try with solution from https://github.com/nuxt-community/laravel-echo-module/issues/56 @mohsenMJ you can try downgrade "socket.io-client": "^2.4.0" which use EIO version 3
package.json:
nuxt.config.js:
My connector is set to
NullConnector
when I setauthModule
totrue
, But when I set it back tofalse
, it's aPusherConnector
again. Any idea?