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

socket.io-adapter block emit calls #71

Closed
Hovhanns97 opened this issue May 27, 2021 · 4 comments
Closed

socket.io-adapter block emit calls #71

Hovhanns97 opened this issue May 27, 2021 · 4 comments

Comments

@Hovhanns97
Copy link

In my application, I have used a socket.io and also an adapter for it. Now when I try to send a response from the server to the frontend with socket.to(id).emit("message", message), it throws this error

unknown

It starts working again after I comment on the code that configures the adapter.

io.adapter(require("socket.io-redis")({host: "localhost", port: 6379}))

But it's not a good solution, because I need to use the adapter for my application. How can I fix this problem in another way?

@darrachequesne
Copy link
Member

It sounds like a compatibility issue. Which version of socket.io-redis / socket.io are you using?

Related: socketio/socket.io-redis-adapter#402

@Hovhanns97
Copy link
Author

I am using these versions.
"socket.io": "4.0.1",
"socket.io-client": "^4.1.2",
"socket.io-redis": "^6.1.0",

@darrachequesne
Copy link
Member

This should be fixed with socket.io-redis@6.1.1, could you please try to run npm update?

@darrachequesne
Copy link
Member

Closed due to inactivity, please reopen if needed.

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

2 participants