question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reconnecting all the time with status 101 Switching Protocols

See original GitHub issue

Hi!

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?

DeepinScreenshot_выберите-область_20201025090300

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
richardeschlosscommented, Oct 25, 2020

Just specify reconnection to “false”. Socket.io client under the hood by default tries to auto reconnect.

this.socket = this.$nuxtSocket({path: "/development", transports: ["websocket"], reconnection: false }) }

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

1reaction
kameratcommented, Apr 23, 2021

I ended up using vue-socket.io as a custom nuxt plugin.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found