Seeing HTTP/WS send decode error after upgrading to channels 1.1.3
See original GitHub issueI just upgraded Django channels to 1.1.3 as well as the following related libraries:
channels==1.1.3 daphne==1.2.0 asgi-redis==1.3.0 asgiref==1.1.1
Everything ran fine in my dev environment. But once I pushed to production, installed the new libraries, and completely restarted all services, I immediately started seeing the following error:
ERROR: HTTP/WS send decode error: Cannot dispatch message on channel u'daphne.response.dUTtOgoynk!bNiNpvqevU'
The client was showing the following error:
WebSocket connection to 'wss://<url>.com/' failed: Error during WebSocket handshake: Unexpected response code: 403
When I downgraded to the previous library versions, everything worked fine again.
It appears the issue is during the websocket connect / initial handshake?
I’m using the enforce_ordering decorator on all my websocket consumers as well as the asgi redis back-end.
Any thoughts on what’s going on?
Issue Analytics
- State:
- Created 6 years ago
- Comments:53 (21 by maintainers)
Top Results From Across the Web
Getting Started with Channels — Channels 1.1.8 documentation
When you first run Django with Channels installed, it will be set up in the default layout - where all HTTP requests (on...
Read more >Channels Documentation - Read the Docs
Channels is a project that takes Django and extends its abilities beyond HTTP - to handle WebSockets, chat protocols,.
Read more >Websocket immediately disconnects after upgrading Heroku ...
Websocket immediately disconnects after upgrading Heroku Redis version for Django Channels app ; "channels_redis.core.RedisChannelLayer", "CONFIG ...
Read more >Creating a chat with Django Channels - Gearheart
Nowadays, when every second large company has developed its own instant messenger, in the era of iMessages, Slack, Hipchat, Messager, ...
Read more >Error during WebSocket handshake: Unexpected response code
log information of runworker (it doesn't update after opening the ... INFO - worker - Listening on channels http.request, websocket.connect, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi,
same error - 403 Access Denied, happens every so often. About every 10th request I’d say. Really hard to say what’s wrong.
Here is the Daphne log:
Installed versions:
Yes, when I remove django-debug-toolbar(and django-debug-toolbar-request-history django-debug-toolbar-template-profiler django-channels-panel), the problem is solved.