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

WebSocketDisconnect (<CloseCode.ABNORMAL_CLOSURE: 1006>, None) #442

Open
ChutchawanGit opened this issue Nov 27, 2024 · 0 comments
Open

Comments

@ChutchawanGit
Copy link

Could the WebSocket closure with error code 1006 be related to the video recording feature used for generating web pages?

INFO: connection open
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 250, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\fastapi\applications.py", line 1054, in call
await super().call(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\middleware\errors.py", line 152, in call
await self.app(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\middleware\cors.py", line 77, in call
await self.app(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\middleware\exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\routing.py", line 735, in app
await route.handle(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\routing.py", line 362, in handle
await self.app(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\routing.py", line 95, in app
await wrap_app_handling_exceptions(app, session)(scope, receive, send)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\routing.py", line 93, in app
await func(session)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\fastapi\routing.py", line 383, in app
await dependant.call(**solved_result.values)
File "C:\Users\chutchawan.m\screenshot-to-code\backend\routes\generate_code.py", line 206, in stream_code
params: dict[str, str] = await websocket.receive_json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\websockets.py", line 135, in receive_json
self._raise_on_disconnect(message)
File "C:\Users\chutchawan.m\AppData\Local\pypoetry\Cache\virtualenvs\backend-K2HrQqBb-py3.12\Lib\site-packages\starlette\websockets.py", line 113, in _raise_on_disconnect
raise WebSocketDisconnect(message["code"], message.get("reason"))
starlette.websockets.WebSocketDisconnect: (<CloseCode.ABNORMAL_CLOSURE: 1006>, None)
INFO: connection closed

@ChutchawanGit ChutchawanGit changed the title "WebSocketDisconnect (<CloseCode.ABNORMAL_CLOSURE: 1006>, None)" WebSocketDisconnect (<CloseCode.ABNORMAL_CLOSURE: 1006>, None) Nov 27, 2024
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

1 participant