SocketIO no longer working after updating libraries #1841
-
Hi, so I was successfully using the Flask-SocketIO in my flask application that was communicating with the Vue.js application. I have now updated python packages to their latest versions and this seemed to have broken the SocketIO implementation inside my project. Old package versions:
New package versions:
Socket.IO is initialized as:
So the error that was shown after running the application was: I have both eventlet and gevent installed as dependencies but that didn't seem to work, so I had to manually set gevent as async mode:
So after that I started to get the following error: So I added the monkey patch for gevent:
After that I started to get a new error: After some searching I found a post where it was said that flask run is not working correctly, so I started the application "manually": This got rid of the problem in logs. But even though there are no more errors in the logs and emit is logged, no message will get to my client.
Does anyone have any ideas what could be causing the messages to not work, or if I somehow screwed up the setup of the Flask-SocketIO with the newer version? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
@denisvitez For all the problems except the final one, you could have saved a lot of time if you read the docs. Those are all basic problems that occur because you are doing things in ways that are incorrect and/or unsupported. The last error ( |
Beta Was this translation helpful? Give feedback.
@denisvitez For all the problems except the final one, you could have saved a lot of time if you read the docs. Those are all basic problems that occur because you are doing things in ways that are incorrect and/or unsupported.
The last error (
unable to connect
) could be related to a change that went into the 5.7.0 release. Can I ask you to try 5.6.0 and report if that addresses this particular problem? Thank you.