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.

"The client is using an unsupported version of the Socket.IO or Engine.IO protocols"

See original GitHub issue

I use python flask as server frame React as front use socket.io-client 3.0.4 as client python-socketio 5.0.0 as server but l can not connect always “The client is using an unsupported version of the Socket.IO or Engine.IO protocols”

    const socket = io("ws://127.0.0.1:8888");
    // client-side
    socket.on("connect", () => {
      console.log(socket.id); // x8WIv7-mJelg7on_ALbx
    });
from flask import Flask,abort,jsonify,request
from dataProcess import handleDataProcess
import socketio
import setting 

app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
app.config.from_object(setting.DevConfig)
sio = socketio.Server()
print({sio})
app.wsgi_app = socketio.WSGIApp(sio, app.wsgi_app)


@app.route('/api/dataprocess',methods=['POST'])
def dataProcess():
    params = request.json.get('params')
    result = handleDataProcess(params)
    emit.SocketIO('dataprocesssuccess',{'test':11})
    return jsonify(result)
@sio.event
def connect():
    print("I'm connected!")

@sio.event
def connect_error():
    print("The connection failed!")

@sio.event
def disconnect():
    print("I'm disconnected!")
@sio.on('my_event')
def my_event(data):
    print('Received data: ', data)
if __name__ == '__main__' :  
    app.run(host='127.0.0.1',port = 8888)

i want to konw why who can help me # #

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:52 (20 by maintainers)

github_iconTop GitHub Comments

39reactions
zkquincommented, Dec 8, 2020

I think I’ve found a solution as I’ve just had to deal with this issue. I believe it’s due to our lovely miguelgrinberg also updating the python-engineio just make sure you pull 3.13.2 if your using say 4.6.1. Otherwise 4.0.0 python-engineio will be pulled which is causing incompatibility issues.

26reactions
kalaersuncommented, Dec 8, 2020

It’s exactly what the error says. The version of the Socket.IO client that you are using is incompatible with the version of the server. Either upgrade your client, or downgrade your server. The README of this repo has a table that shows you which JS and Python versions are compatible.

image socket.io-client 3.0.4 as client python-socketio 5.0.0 as server i use this two i don not konw where is the porblem

Read more comments on GitHub >

github_iconTop Results From Across the Web

The client is using an unsupported version of the Socket.IO or ...
The connection URL suggests your Socket.IO client is a version 1 or version 2. It should be a version 3 to be compatible...
Read more >
The client is using an unsupported version of the Socket.IO or ...
I'm trying to connect rasa 3.2 using socket but I get below error whenever I'm trying to connect. connecting what? can you share...
Read more >
python-socketio - PyPI
Socket.IO server and client for Python.
Read more >
Cannot make a simple socketio connection : r/flask - Reddit
The client is using an unsupported version of the Socket.IO or Engine.IO protocols # __init__.py app = Flask(__name__) app.debug = True ...
Read more >
Troubleshooting connection issues | Socket.IO
anything between the user and the Socket.IO server may encounter a temporary failure or be restarted · the server itself may be killed...
Read more >

github_iconTop Related Medium Post

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