'Flutter socket.io connected but throws error(server node.js)

// please try to help if you can
socketConnect(){
IO.Socket  socket =  IO.io('https://8476-113-20-17-134.ngrok.io/',
    IO.OptionBuilder()
        .disableAutoConnect()
        .setTransports(['websocket'])
        .build()
);
socket.connect();
socket.onConnect((_) {
  print('connect');
});
socket.on("testingnirav", (data) => print(data) );
}

Show Connected in Backend Server Log but throws below error in flutter socket_io_client

E/flutter ( 9164): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type 'String' is not a subtype of type 'int' E/flutter ( 9164): #0 Socket.onHandshake (package:socket_io_client/src/engine/socket.dart:481:5) E/flutter ( 9164): #1 Socket.onPacket (package:socket_io_client/src/engine/socket.dart:449:11)

// link send me to this location 
pingInterval = data['pingInterval'];


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source