-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
ASGI flow error using websockets #414
Comments
I tried with uvicorn too, there I get a 403 response: It seems it has special handling when it gets "websocket.close" when the handshake is not completed. |
I should add that our application doesn't use websockets at all, and we have no code to handle websocket requests. We just noticed this crash, probably from some botnet trying to probe us. |
@estyrke thank you for reporting thing. Gonna push a fix ASAP and include it in 1.6.1 |
Not sure if this is related @gi0baro, however, I have this |
Very timely as I was looking into these errors today for our platform:
We are using websockets (purely for pushing notifications), but the flow error happens randomly and I don't have any ideas currently on how to debug it effectively. It doesn't appear to be impacting performance/useability (nothing reported anyway), but it'd be good to understand more about it.
|
@Tragio @grant-oscillolabs it is quite hard for me to debug the almost cryptic stack traces of Django channels. |
I'm facing the same scenario with latest django & channel websocket implementation. On frontend, the connection gets open, but instantly gets closed. On the console getting the "RuntimeError: ASGI flow error". BTW, the setup works on development but fails on production. |
@grant-oscillolabs did the new version solve the issue for you?
I don't see a problem in functionality but I still have this error occasionally. |
@xeroticikot @Tragio In order to fully debug this, it would be nice to have the ASGI message content sent by Django channels to Granian, otherwise it's very difficult to make assumptions on correct/incorrect behavior of the involved parts. The actual root cause for the OP is fixed; also 1.7 will change the way Granian interacts with |
Sorry for the late reply on this one! Log errors still persisted after updating to 1.6.1, but again no real issues in terms of functionality. I'll update Granian to 1.7 when released and keep monitoring |
I get this error using FastAPI with granian (possibly related to #186). Repro:
Then just
new WebSocket("ws://localhost:8000").connect
in a browser console will trigger this error:Granian 1.6.0, FastAPI 0.115.2.
The text was updated successfully, but these errors were encountered: