Flutter Socket.IO connects successfully but does not receive events in Play Store release
13:50 26 Aug 2026

I'm using Flutter with:

  • socket_io_client: ^3.1.4

  • Socket.IO server: 4.8.1

The Socket.IO connection itself is successful. I can see the connect event and the socket is connected.

However, when the app is installed fresh from Google Play Store, the socket appears to connect but does not receive/handle my application events.

The same code works correctly in debug/local builds.

My Socket.IO configuration is:

socket = io.io(
  url,
  io.OptionBuilder()
      .setTransports(['websocket', 'polling'])
      .disableAutoConnect()
      .enableReconnection()
      .setReconnectionAttempts(10)
      .setReconnectionDelay(1000)
      .setReconnectionDelayMax(5000)
      .setTimeout(20000)
      .enableForceNewConnection()
      .setExtraHeaders({
        "Authorization": token,
      })
      .build(),
);

The socket connects successfully:

socket.onConnect((_) {
  print('SOCKET CONNECTED');
});

But events such as:

socket.on('ride_request', (data) {
  print('RIDE REQUEST: $data');
});

are not being received/handled on a fresh Play Store installation.

Important details

This is not a connection failure.

The sequence is:

Fresh Play Store installation
        ↓
Socket connects
        ↓
Server is running
        ↓
Server emits events
        ↓
Flutter client does not appear to receive/handle those events

Debug/local installation:

Socket connects
        ↓
Events are received correctly

What could cause this?

Could this be caused by:

  1. Event listeners being registered after the server emits the event?

  2. Listeners being removed somewhere by clearListeners(), disconnect(), destroy(), or dispose()?

  3. Multiple Socket.IO instances being created?

  4. enableForceNewConnection() creating a different socket instance?

  5. The release build tree-shaking/obfuscation affecting Socket.IO event handling?

  6. Event names being different between the production server and client?

  7. The authentication middleware allowing the connection but assigning the wrong user/session, causing events to be emitted to a different socket?

  8. Socket.IO rooms not being joined correctly in the release build?

  9. Events being emitted before the client joins the appropriate room?

  10. Some difference in initialization order between a fresh installation and subsequent launches?

What is the best way to debug this when the socket connects successfully but application events are not being received?

I can also provide the server-side io.emit(), socket.emit(), room/join logic, and Flutter listener registration code if needed.

android node.js sockets socket.io