a year ago
Hello,
I'm having an error with WebSocket on my website. The JavaScript is as follows:
const chatSocket = new WebSocket('wss:///ws/endpoint") And the error from the developer tools: WebSocket connection to 'wss://__/ws/endpoint' failed:
It doesn't give me any more information. On the deploy logs, it is as follows:
WARNING:django.request:Not Found: /ws/endpoint
This error doesn't make sense because when I do it locally, everything works fine. In my settings.py I changed CHANNELLAYER "hosts" to include the REDISURL. Other than that, I'm not sure how to connect my site to Redis to be able to run WebSocket connections.
7 Replies
a year ago
The obfuscated error messages you have provided are not particularly helpful, please provide actual error logs.
a year ago
From the console:
"WebSocket connection to 'wss://_/ws/endpoint' failed: ;
Chat socket closed unexpectedly"
From the deploy logs:
"WARNING:django.request:Not Found: /ws/endpoint"
Both of these error messages occur directly after connecting to the page.
a year ago
The obfuscated error messages you have provided are not particularly helpful, please provide actual error messages.
a year ago
I'm not sure what you mean by error logs as opposed to the messages I've sent. These are the logs.
a year ago
These are the error messages. Am I missing something? Where do I find error messages other than in what I've sent?
a year ago
Again, The obfuscated error messages you have provided are not particularly helpful, please provide actual error messages… without the obfuscation.