You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebSocket connection succeeds but no AIS messages are ever received #30
I'm experiencing an issue with the AISStream WebSocket service.
The client successfully connects to the WebSocket endpoint and sends the subscription message, but it never receives any AIS messages. The connection remains open indefinitely without any errors or data.
Environment:
Operating System: Windows Server
Python: 3.13
websockets: latest version
FastAPI + Uvicorn (although the same behavior occurs in a standalone Python script)
I also tested without FilterMessageTypes and with specific MMSI filters. The behavior is exactly the same.
Observed behavior:
WebSocket connection is established successfully.
Subscription message is sent successfully.
The connection remains open.
No exceptions are raised.
No messages are ever received.
The server does not close the connection.
At this point the client waits indefinitely. The async for raw in websocket: loop is never entered because no frames are received.
Additional tests:
Tested from multiple Windows machines.
Internet connectivity is working.
TCP connection to stream.aisstream.io:443 succeeds.
WebSocket handshake succeeds.
The same behavior occurs using both:
a minimal Python example from the documentation;
a production application.
Expected behavior
After sending the subscription message, the server should start streaming AIS messages matching the subscription.
Question:
Has there been any recent change to the WebSocket API, authentication, or subscription protocol that could explain this behavior?
Is there any known service issue, account restriction, or additional requirement that would cause the connection to remain open while delivering no messages?
Thank you.
Activity
TritonTechnical-BusinessSystems commented on Aug 11, 2026
I'm hitting this exact same issue — independently, on a completely different stack (Node.js 22 / TypeScript, native WebSocket, Linux), so this doesn't look environment-specific.
Symptom, precisely: WebSocket handshake succeeds, subscription message sends successfully, connection stays open (well past the documented 3-second "no subscription received" auto-close, so the subscription is apparently being accepted), and then — nothing. No error frame, no AIS messages, ever. Have to close the connection myself after a timeout.
What I've ruled out, to save you some diagnostic back-and-forth:
Not a request-format bug — cross-checked every field name/structure in my subscription message against your auto-generated OpenAPI models (ais-message-models) and the working golang/main.go reference in this repo. Both confirm APIKey, BoundingBoxes in [lat,lon] order, MetaData, etc. are exactly what I'm sending.
Not a filter issue — reproduces identically with zero filters at all (just APIKey + a fully global BoundingBoxes), which per your docs should be a ~300 msg/s firehose. Also reproduces with FiltersShipMMSI set to real MMSIs, and with FilterMessageTypes set/unset.
Not a stale/bad key — reproduces on two separately-generated API keys (rotated one to rule out a key-specific problem). Neither ever returned the documented {"error": "Api Key Is Not Valid"} response, so both appear to be accepted as valid.
Not a client library quirk — reproduces identically with both Node's native WebSocket and the ws npm package.
Not firewall/network — TCP + TLS + WS handshake completes cleanly every time; this is on a normal cloud VM with unrestricted outbound access.
Given all of that, it really looks like something account/backend-side rather than a client bug. Happy to email logs and both API keys to support@aisstream.io if that's the fastest path to diagnosing it — let me know.
The WebSocket connection is established successfully and the subscription message is sent, but no AIS messages are received afterward. The script just waits indefinitely / produces no output.
I tested with:
Valid API key loaded from .env
wss://stream.aisstream.io/v0/stream
Example bounding boxes from the repository
Without message filters
With FilterMessageTypes: ["PositionReport"]
On both Ubuntu and Windows
In all cases, the connection succeeds but raw_count remains 0 and no messages are received.
Example output:
connected
subscription sent
30s timeout: no AIS message received yet, still waiting...
raw_count: 0
parsed_count: 0
Is this related to API key activation, account approval, or a server-side stream issue?
Activity
TritonTechnical-BusinessSystems commentedon Aug 11, 2026
I'm hitting this exact same issue — independently, on a completely different stack (Node.js 22 / TypeScript, native WebSocket, Linux), so this doesn't look environment-specific.
Symptom, precisely: WebSocket handshake succeeds, subscription message sends successfully, connection stays open (well past the documented 3-second "no subscription received" auto-close, so the subscription is apparently being accepted), and then — nothing. No error frame, no AIS messages, ever. Have to close the connection myself after a timeout.
What I've ruled out, to save you some diagnostic back-and-forth:
Not a request-format bug — cross-checked every field name/structure in my subscription message against your auto-generated OpenAPI models (ais-message-models) and the working golang/main.go reference in this repo. Both confirm APIKey, BoundingBoxes in [lat,lon] order, MetaData, etc. are exactly what I'm sending.
Not a filter issue — reproduces identically with zero filters at all (just APIKey + a fully global BoundingBoxes), which per your docs should be a ~300 msg/s firehose. Also reproduces with FiltersShipMMSI set to real MMSIs, and with FilterMessageTypes set/unset.
Not a stale/bad key — reproduces on two separately-generated API keys (rotated one to rule out a key-specific problem). Neither ever returned the documented {"error": "Api Key Is Not Valid"} response, so both appear to be accepted as valid.
Not a client library quirk — reproduces identically with both Node's native WebSocket and the ws npm package.
Not firewall/network — TCP + TLS + WS handshake completes cleanly every time; this is on a normal cloud VM with unrestricted outbound access.
Given all of that, it really looks like something account/backend-side rather than a client bug. Happy to email logs and both API keys to support@aisstream.io if that's the fastest path to diagnosing it — let me know.
abdulkerimakten commentedon Aug 11, 2026
Hi, I am experiencing the same issue.
The WebSocket connection is established successfully and the subscription message is sent, but no AIS messages are received afterward. The script just waits indefinitely / produces no output.
I tested with:
.envwss://stream.aisstream.io/v0/streamFilterMessageTypes: ["PositionReport"]In all cases, the connection succeeds but
raw_countremains 0 and no messages are received.Example output:
connected
subscription sent
30s timeout: no AIS message received yet, still waiting...
raw_count: 0
parsed_count: 0
Is this related to API key activation, account approval, or a server-side stream issue?
dmonizer commentedon Aug 12, 2026
+1 exactly the same symptoms. connection succeeded, no signals for the whole world. fresh api key.
able-macaroni-pacemaker commentedon Aug 13, 2026
1+, starting around 2026-08-05 13:30 UTC
dmonizer commentedon Aug 14, 2026
is there something we as the community can help with?
able-macaroni-pacemaker commentedon Aug 17, 2026
I have been receiving data again since 2026-08-17 07:49 UTC.