Reconnecting all the time with status 101 Switching Protocols
See original GitHub issueHi!
Thank you very much for this project.
I try to use this in my project. On the back (aws websocket gateway api) lambda function is triggered on connected, but connection not establishing.
nuxt.config.js
io: { sockets: [{ name: "statistics", url: "wss://***.us-east-1.amazonaws.com" }] },
mounted() { this.socket = this.$nuxtSocket({path: "/development", transports: ["websocket"]}) }
Where am I going wrong?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Signalr Reconnects every 2 seconds even thought server is up
The reconnect request in the Network dev tools shows "Status Code: 101 Switching Protocols"; We're using ms-signalr-client for the wrapper ...
Read more >101 Switching Protocols - HTTP - MDN Web Docs
The HTTP 101 Switching Protocols response code indicates a protocol to which the server switches. The protocol is specified in the Upgrade ...
Read more >101 Switching Protocols - Evert Pot
101 Switching Protocols is a status code that's used for a server to indicate that the TCP conncection is about to be used...
Read more >101 Switching Protocols. HTTP/1.1 403 Forbidden
This error indicates that the server has determined that you are not allowed access to the thing you've requested, either on purpose or...
Read more >Sync not working - Atlas Device Sync - MongoDB
Sync only works the first time the app runs. ... Connection[2]: Websocket: Expected HTTP response 101 Switching Protocols, but received:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just specify reconnection to “false”. Socket.io client under the hood by default tries to auto reconnect.
If the connection is not happening at all, the problem is most likely due to how the IO is set up on the server (AWS).
This may also be helpful: What Socket.IO is not
I ended up using vue-socket.io as a custom nuxt plugin.