Wednesday, May 24, 2017

Re: websocketbridge.js:183 Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.

I know get this error: 

(index):48 Connecting to ws://www.openchat.us/chat/stream/
reconnecting-websocket.min.js:1 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Invalid status line
open @ reconnecting-websocket.min.js:1
a @ reconnecting-websocket.min.js:1
(anonymous) @ (index):49
i @ jquery-1.12.2.min.js:2
fireWith @ jquery-1.12.2.min.js:2
ready @ jquery-1.12.2.min.js:2
K @ jquery-1.12.2.min.js:2
(index):164 Disconnected from chat socket

On Tuesday, May 23, 2017 at 11:56:22 AM UTC-5, djangorobert wrote:
Hi Im working with django and django channels but seem to be running in to constant road blocks not able to get a websocket conection i working with andrew godwins example on github the "MULTICHAT" example all im trying to do is to get it to work lol in a production envirment but i continue to get errors like this: 


websocketbridge.js:183 Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.

this.send = function (data) { ws.send(data); };

   key: 'send',
    value: function send(msg) {
      this.socket.send(JSON.stringify(msg));
    }
dge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream' failed: Error during WebSocket handshake: Invalid status line

var connect = function () { log('connect'); var oldWs = ws; ws = new config.constructor(url, protocols);


WebSocket connection to 'ws://www.openchat.us/chat/stream' failed: WebSocket is closed before the connection is established. (index):170 Disconnected from chat socket

// Helpful debugging webSocketBridge.socket.onopen = function () { console.log("Connected to chat socket"); }; webSocketBridge.socket.onclose = function () { console.log("Disconnected from chat socket"); }


The commands im using in the putty console is : daphne -p{} myproject.asgi:channel_layer
then i open another putty console and enter the command python manage.py runworker

but have continued to run into these problems going on 2 weeks now of this junk I want to use django channels but if the problems continue going to move on with socketio instead.

Thanks for anyone who can help


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3d0017b1-7045-402e-aad3-a325731b4cbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment