-
-
Notifications
You must be signed in to change notification settings - Fork 894
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
Flask-SocketIO cross-contamination from other app #882
Comments
So further investigation with a clean working directory: a basic flask app with a venv with no socketio works fine:
but if I delete the venv folder and pycache, add
|
Furthermore, in the second case, if I stop the flask server, go into |
I guess this is related to this: #713 |
So as a work-around, how can I get the FLASK_RUN_PORT working again? |
|
@kf106 based on your description, my suggestion is that you do not install Flask-SocketIO in the venv for the project that doesn't use it. At some point I had a fix in place for #713, but had to undo it as it affected the use of the reloader. My currently thinking is that I'm going to stop supporting the use of |
I feel your pain with regards to I use flask run because it's going to become the standard flasky way of doing things. The problem I had was that the flask port variable wasn't being acted on (both apps will eventually need flask-socketIO, which is excellent, thank you very much!) and so they were both trying to grab port 5000. With --port it now works. I'm guessing getting flask-socketio to check for the environment variable and using it shouldn't be too hard a fix? |
@kf106 I can add the env vars, that's actually not that hard, but this is what I was referring to as a moving target. Each time Flask adds some option to the CLI that breaks my |
Starting with Flask-SocketIO 3.2.0 (just released), the |
I have two applications (bank-app.py and client-app.py), two separate venv installations, one for each. The bank-app.py uses socketio, the client-app.py is a plain flask app.
When I try to run the client-app on a different port, I get two serving messages, and it runs on the wrong port. This only started happening when I added the socketio stuff to the bank-app.py
The code is at https://github.com/kf106/blockchain-games
Any suggestions what is going on here?
The text was updated successfully, but these errors were encountered: