Skip to content

Realtime API closes immediately #13

@bachya

Description

@bachya

I'm attempting to connect to the Realtime API in a Python package (using python-socketio). When I attempt a simple connection:

sio = socketio.AsyncClient()
await sio.connect('https://api.ambientweather.net/?api=1&applicationKey=<MY_APP_KEY>')

...I get the follow stacktrace:

INFO:engineio.client:Attempting polling connection to https://api.ambientweather.net/socket.io/?api=1&applicationKey=<MY_APP_KEY>&transport=polling&EIO=3
INFO:engineio.client:Polling connection accepted with {'sid': '<GENERATED_SID>', 'upgrades': ['websocket'], 'pingInterval': 25000, 'pingTimeout': 5000}
INFO:socketio.client:Engine.IO connection established
INFO:engineio.client:Attempting WebSocket upgrade to wss://api.ambientweather.net/socket.io/?api=1&applicationKey=<MY_APP_KEY>&transport=websocket&EIO=3
DEBUG:websockets.protocol:client - state = CONNECTING
DEBUG:websockets.protocol:client - event = connection_made(<asyncio.sslproto._SSLProtocolTransport object at 0x109ef8128>)
DEBUG:websockets.protocol:client ! failing WebSocket connection in the CONNECTING state: 1006 [no reason]
DEBUG:websockets.protocol:client x closing TCP connection
DEBUG:websockets.protocol:client - event = connection_lost(None)
DEBUG:websockets.protocol:client - state = CLOSED
DEBUG:websockets.protocol:client x code = 1006, reason = [no reason]
WARNING:engineio.client:WebSocket upgrade failed: connection error
INFO:engineio.client:Sending packet PING data None
INFO:engineio.client:Sending polling GET request to https://api.ambientweather.net/socket.io/?api=1&applicationKey=<MY_APP_KEY>&transport=polling&EIO=3&sid=<GENERATED_SID>

The CONNECTING failure happens fairly immediately.

Not asking anyone to debug the Python library, per se, but I'm at a loss as to how I debug this further. 1006 isn't giving me much to work off of. Any thoughts on where I can go?

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