WebSocket was closed before the connection was established

The way I use nodejs in @binance/connector to connect websocket, wss://testnet.binance.vision connects successfully, but when using default address Error: WebSocket was closed before the connection was established, after some time

截屏2022-08-01 19.00.05
please ask for your help

Has this happened once or is it a consistent behaviour?

Every time, in Figure 1, I found that the settimeout time is too short, but Figure 2 happens every time, and it will start receiving data after about 12 minutes, and it has not been solved yet. :joy:

Please try using different machines to further diagnose the issue. Does this happen for other websocket apis such as the Futures Websocket?

Thank you for your answer, i will try it,If it works that’s really helpful :grin:

I tried your suggestion, using the example in @node-binance-api to get the kline of futures, but it still got 1006 error, and I used websocket in my vue-web project to connect easily

After 12 minutes I got the data from the server, every time :joy: