v3 Unsupported protocol version error

I’m stuck with the newer version of Everything was fine but when I wanted to upgrade to 3, everything just broke, and currently on the client, I’m getting a 400 HTTP status code with the following JSON response –
{"code":5,"message":"Unsupported protocol version"}

Server-side config –

const io = require("")(server, {
    cors: {
      origin: config.clientURL,
      methods: ["GET", "POST"],
      credentials: true,

Client-side config –

const socket = io(backendURL, {
  withCredentials: true,

I’ve tried very many things and redeployed many times but the error didn’t go away.

For reference, I’ve these github repos –

Client in react.jsGitHub repo

Server in nodeJs and repo

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

Looks like there may be a mismatch between versions of your and server.

First, update the servers with allowEIO3 set to true (added in [email protected])

const io = require("")({
  allowEIO3: true // false by default

After you’ve upgraded the (latest right now is 3.1.1), you can set it back, or remove it since default is false

const io = require("")({
  allowEIO3: false

Solution 2

I install old version by

npx [email protected]

It will install nuxt with express.js in one project.
Then update npm packages by commands:

npx npm-check-updates -u
npm i

And goes well between nuxt and on server

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply