-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Description
I am trying to connect to my socket.io server, and Socket.io is returning a 400 error with the message unknown transport "undefined". It seems that the transport query param needs to be set. I tried setting it to websocket and polling but neither seem to get me anywhere. I don't know much about the connection protocol, but why might this be happening?
Server log:
listening on *:3000
engine intercepting request for path "/socket.io/" +0ms
engine handling "GET" http request "/socket.io/?EIO=3" +1ms
engine unknown transport "undefined" +2msMicropython log:
b'GET %s HTTP/1.1' /socket.io/?EIO=3
b'Host: %s:%s' 192.168.86.31 3000
b''
Traceback (most recent call last):
File "main.py", line 36, in <module>
File "main.py", line 27, in main
File "main.py", line 20, in hello
File "usocketio/client.py", line 78, in connect
File "usocketio/client.py", line 43, in _connect_http
AssertionError: b'HTTP/1.1 400 Bad Request'
MicroPython v1.18 on 2022-01-17; ESP32 module with ESP32
Type "help()" for more information.My code, from example:
with usocketio.client.connect('http://192.168.86.31:3000') as socketio:
@socketio.on('message')
def on_message(self, message):
print("message", message)
socketio.run_forever()Metadata
Metadata
Assignees
Labels
No labels