-
-
Notifications
You must be signed in to change notification settings - Fork 890
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 server cannot catch emitted message from client #367
Comments
How is your server side project structure? Are you sure the module that has your |
With the information you provided I can't really see what the problem is. Sorry. Can you make a complete example that I can try here that demonstrates the problem? There is obviously something wrong, but it is probably a small detail. |
Hi @miguelgrinberg, this is a minimal example for you to test. |
This ended up being a bug on my side. It was caused by having Socket.IO options passed in the constructor, and later calling init_app with more options. |
@renodesper give version 2.8.1 a try please. |
Awesome, it works as expected now. |
I have this flask-angular2 project which use socketio to send message every 5 second from the server after the client send some coordinate to the server. But when the client emit the message, the server can't catch that message. I use custom namespace, but it also happens when I use default namespace (/).
This is how I open the connection to the default namespace:
This is the function to send the message:
My function simply emit the message to the server. I also try to print the message with console.log and it appears successfully:
Now, in the server I have this handler to catch that message:
But the log doesn't print the message nor the string even though flask-socketio received the message:
These are all the packages that I use:
I also can't catch the "client_connected" message or any other message.
Can you tell me where I'm doing wrong?
I really appreciate your response, thank you very much.
The text was updated successfully, but these errors were encountered: