TechMind
TechMind

Reputation: 13

GET https://s10onilover.izisoft.io:0/socket.io/?EIO=4&transport=polling net::ERR_ADDRESS_INVALID

I am using SockIO for my Flutter project.

In production environment, the above error occurred.

Flutter version: 3.22.3

Socket_io_client version: socket_io_client: ^3.0.2

void initialize() {
    socket = IO.io(
      SocketEndPoint.SOCKET_URL,
      IO.OptionBuilder().enableAutoConnect().build(),
    );

    socket.io.options?['extraHeaders'] = {'authorization': 'Bearer ${sl.get<SharedPreferenceHelper>().getJwtToken}'};

    if (socket.disconnected) {
      socket
        ..disconnect()
        ..connect();
      socket.onConnect(
        (_) {
          _joinRoomConversation();
        },
      );
    }   }

enter image description here

Upvotes: 0

Views: 20

Answers (1)

Evert
Evert

Reputation: 99495

TCP port 0 is not a valid TCP port.

Upvotes: 0

Related Questions