Flask SocketIO message ack not received

Flask 2.0.2
Flask-SocketIO 5.1.1

I am trying to build a very simple Flask SocketIO server which sends a message to the client when he connects to the server, and receives the acknowledgement of that message. I am testing my server with this SocketIO client tool. Sending the message upon connection is working, however my server does not receive the ack of the client. These are my connection and ack method:

def ack():
print('message was received!')


@socketio.on('connect')
def client_connected():
    active_clients.append(request.sid)
    queue.append(request.sid)
    print(request.sid)
    socketio.send("hallo", to=request.sid, callback=ack)

So in the client tool, I do receive the message ("hallo"), but on my server it does not print "message was received". Does anyone know what the problem could be?


Solution 1:

Apparently this client I used did not implement calling the callback function. Implementing a client myself that calls the callback function upon receiving a message solved the issue.