Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not receiving any data from echo #35

Open
sts-ryan-holton opened this issue Feb 2, 2021 · 3 comments
Open

Not receiving any data from echo #35

sts-ryan-holton opened this issue Feb 2, 2021 · 3 comments

Comments

@sts-ryan-holton
Copy link

Hi, I'm having trouble getting any data to come through with this package and wonder whether it's working as intended. I've got Laravel Websockets set up (the package) and have my websocket server running and can see in the console that it is receiving data, but I'm not seeing any data coming through my channel to my Nuxt JS project.

/*
** Echo config
*/
echo: {
  broadcaster: 'pusher',
  key: 'websocketkey',
  host: 'http://localhost:6001',
  plugins: [ '~/plugins/echo.js' ],
},

In my web page, I've got:

this.$echo.channel('agents')
        .listen('AgentStats', (e) => {
            console.log(e);
        });
    }

My event channel is called agents, it's on a private channel, and the event is called AgentStats, but I see no data logged in my console log.

@melvin78
Copy link

did you manage to solve it?

@4KDA
Copy link

4KDA commented Mar 12, 2021

did you manage to solve it?

Use .on instead of .listen

@melvin78
Copy link

ok thanks. I can see your echo configuration file in nuxt is a little bit different . I that everything?. Or there is no difference between host and wsHost?

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

No branches or pull requests

3 participants