Dave
Dave

Reputation: 888

AWS API Gateway WebSocket Connection Error - Timeout

Like many others here I am trying to setup websockets through API Gateway + Angular and testing in Chrome. WSCAT works out most of the time but still times out some of the time. Chrome/Angular app times out every single time with "net::ERR_CONNECTION_TIMED_OUT"

   WebSocketSubject.js:91 WebSocket connection to 'wss://xxx.execute-api.region.amazona.com/v1?auth=foobar' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

I'm, using rxjs like so:

import {webSocket, WebSocketSubject} from 'rxjs/webSocket';

but i never ever get a connection in Chrome. like i said WSCAT works. I have used it, please do not tell me to use WSCAT :)

UPDATE: Just confirmed, vanilla websockets also don't work, so nothing with the library, and also it fails to connect in Safari. But like i said, wscat works just fine.

Any ideas?

Upvotes: 0

Views: 810

Answers (1)

Dave
Dave

Reputation: 888

Not sure what happened, but destroying the API and rebuilding it made it "magically" start working... hopefully it won't happen again.

Upvotes: 1

Related Questions