I'm curious,
Which version of my socket is compatible with the client?
Occurrence error,
"The client is using an unsupported version of the Socket.IO or Engine.IO protocols", flask socket.io.js:3511, 400 (400 BAD REQUEST)
"The client is using an unsupported version of the Socket.IO or Engine.IO protocols"
These are my Server current versions:
Flask-SocketIO==5.2.0
python-engineio==4.3.3
python-socketio==5.7.1
simple-websocket==0.7.0
Client side:
https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.8/socket.io.min.js
How can I fix this? Thank you
You are using The JavaScript client version 1.4.8, from about 6 years ago: https://www.npmjs.com/package/socket.io-client/v/1.4.8.
I strongly recommend that you upgrade your Socket.IO client to the latest 4.x versions, but if that cannot be helped, then the Flask-SocketIO documentation clearly tells you what versions of the Python packages to use:
Related
I am using GNU Health and I have installed trytond server 6.0.24 and tryton desktop 6.0.10 and when I install trytond web client it was installed successfully but when I open it on localhost it shows the error Version Mismatch.
How can I match the version of the tryton web client with the trytond server?
This is the error shown on the browser
I have tried to find to version of tryton web client but it never works.
The error is right, you installed the wrong version of the web client. You should install the 6.0 series of tryton-sao. Sao is the name of web client is not the same as the desktop client. For example, you can install the 6.0.27 version (which is the latest at time of writing) which should work for your setup. Note that you should also remove the current installed version to avoid conflicts.
This is because tryton requires all clients (web and desktop) to run the same series (two first digits of version) as the server you are connecting to.
I am trying to connect to a socket.io server. According to the socket.io documentation (version compatibility),"the client and the server must use compatible versions for everything to work", else we get an error like this one here.Problem is, I dont know where to look for server's Engine.io/java/python protocol version on an open webpage Demo.tv. I can run pip freeze to get my socketio and engineio version, but I dont know if I have a webpage open, where do I get protocol versions of the server. example image
I'm trying to run a client an server in python using flask_socketio, socketIO_client and SOCKET.IO in a raspberry pi 4 but I'm getting the following error:
The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)
192.168.1.80 - - [05/Feb/2021 18:30:41] "GET /socket.io/?EIO=3&transport=polling&t=NTpTT-L HTTP/1.1" 400 219 0.000618
These are my current versions:
pi#raspberrypi:~/Desktop/EDAdataLogger $ npm list socket.io
EDAdataLogger# /home/pi/Desktop/EDAdataLogger
└── socket.io#3.1.1
pi#raspberrypi:~/Desktop/EDAdataLogger $ npm list socket.io-client
EDAdataLogger# /home/pi/Desktop/EDAdataLogger
└── socket.io-client#3.1.1
python-engineio==4.0.0
python-socketio==5.0.4
Flask==1.1.2
Flask-Session==0.3.2
Flask-SocketIO==5.0.1
How can I define JavaScript Socket.IO version and Socket.IO protocol revision so everything matches according to (https://pypi.org/project/python-socketio/) ?
How can I fix this? Thank you
There appears to be some backward compatibility issues with SocketIO. You can uninstall python-engineio, python-socketio (and Flask-SocketIO just to be on the safe side) and reinstall lower versions.
The combination that worked for me was:
Flask-SocketIO==4.3.1
python-engineio==3.13.2
python-socketio==4.6.0
To fix the version incompatibility, you can run below "upgrade"commands:
pip install --upgrade python-socketio==4.6.0
pip install --upgrade python-engineio==3.13.2
pip install --upgrade Flask-SocketIO==4.3.1
flask-socketio-5.1.2
python-engineio-4.3.2
python-socketio-5.6.0
script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/4.5.0/socket.io.js">
This worked for me. This error is due to dependency related to python-engineio .
After this, check your socket request shows EIO4 like this
"GET /socket.io/?EIO=4&transport=websocket&sid=mJ1g8wm0didssJSiAAAA HTTP/1.1" 200
My fix was to use the socket.io version, not cloudflare as the source
Check for the compatibility between the JS Client version and the Socket.IO server version here: https://socket.io/docs/v4/client-installation/ and accordingly upgrade/downgrade the client/server version.
You will need these modules on the server side:
Flask-SocketIO
python-engineio
python-socketio
You will have this kind of URL in your client:
//cdnjs.cloudflare.com/ajax/libs/socket.io/
One working example, which I'm using:
On Server side:
Flask-SocketIO==5.2.0
python-engineio==4.3.3
python-socketio==5.7.1
simple-websocket==0.7.0
On Client side:
//cdnjs.cloudflare.com/ajax/libs/socket.io/4.2.0/socket.io.js
I've searched couple of days for it but found nothing to fix this issue.
My client is an iOS device running socket.io v15.2.0 (Oct 17, 2019).
I've followed this post (Implement a WebSocket Using Flask and Socket-IO(Python))
That post described how to connect to the python socket server with a javascript client but even the javascript client has also returned same error :|
Then I checked the compatibility table at this page and found out that the latest version only works with the javascript client versions of 3.x so I checked this website to see the latest version of javascript socket.io client and I changed the version to 3.0.4 then the JS client successfully connected to the python socket server 🥳.
BUT, there is no versioning table for iOS clients at the swift socket.io Github page
Is there any versioning table for iOS/Android clients to show which python-socketio version is compatible with the v15.2.0 of swift socket.io clients?
Error:
The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)
127.0.0.1 - - [24/Dec/2020 13:29:15] "GET /socket.io/?transport=polling&b64=1 HTTP/1.1" 400 -
after testing many different version finally found the correct versioning to work with swift socket.io 15.2.0
here is the versions:
tornado==5.0
Flask-SocketIO==1.0.0
python-engineio==2.2.0
python-socketio==2.0.0
updated as today:
if you use python-socketio-5.7.1 as server, you need to update Socket.IO-Client-Swift 16.0.1
Hi I need a websocket server in python which supports the protocol used in chrome 16(protocol version 13). Tornado and twisted are not working. Websockify works but i can't find any documentation for it. I need minimal setup means lesser imports. Please help me out here thanks in advance.
Maybe you could take a look to pywebsocket, it claims to support protocol version 13 and is designed for :
The pywebsocket project aims to provide a WebSocket standalone server
and a WebSocket extension for Apache HTTP Server, mod_pywebsocket.
Autobahn is another implementation of websockets :
Autobahn WebSockets for Python provides an implementation of the
WebSockets protocol which can be used to build WebSockets clients and
servers
ws4py : Websocket for python :
Python library providing support for the WebSocket protocol defined in
RFC 6455
Here are some examples of implementing a websocket server in Python. Be sure to read and apply the comments on the code of the following examples, because there may be some bugs:
http://popdevelop.com/2010/03/a-minimal-python-websocket-server/ : It has been tested on Chrome, according to the author of the code.
http://mumrah.net/websockets-in-python : At the end of this blog page, the author has included the URL to a Python implementation of a websocket server.
http://dev.enekoalonso.com/2010/05/22/more-websockets-now-with-python/: only works on Chrome, according to the author.
This page contains an implementation of a Python websocket server that can be used through imports:
https://github.com/AdrianGaudebert/python-websocket-server
You should know that the license for using this is MIT. It may only work with Python 3.0.
WebSocket Echo example works on Chrome/16.0.912.63.
It uses txWS a simple library for adding WebSockets server support to your favorite Twisted applications.
If you are still interested in using websockify, there is a simple example of using it to build an echo server included](https://github.com/kanaka/websockify/blob/master/tests/echo.py).
You can run it like this (from a websockify checkout):
./tests/echo.py 8080
The browse to localhost:8080/tests/echo.html. Enter localhost, 8080 for the WebSocket host and port and hit connect. You should see the client sending messages and the server echoing them back (with a "You said: " prefix).