Skip to content

wss:// Socket always in CONNECTING state #410

Description

@sbalasa

Command issued in Browser console:

var socket = new WebSocket("wss://localhost:22600/ws/message/")
socket.onmessage = (message) => {console.log(message.data)}
socket.send('{"message": "This is a test"}')

Browser Console Error:

Uncaught DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
    at <anonymous>:1:8

Browser: Chrome, Safari, Ingonito mode too

pip3 freeze:
channels==3.0.4
channels-redis==3.3.1
daphne==3.0.2

BE command:
daphne -e ssl:443:privateKey=key.pem:certKey=cert.pem -b 0.0.0.0 -p 22600 my_project.asgi:application -t 60 -v 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions