socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Socket Disconnection issue on Specific Mobile Network on JIO 5g network in INDIA

Open Nilesh410451 opened this issue 2 years ago • 16 comments

Socket.io Version 4.7.2 in NODEJS

Best http socket.io client Version 2.8.6

Platform we are using Unity3d 2021.3.27f1

image_2023_12_07T07_07_20_779Z

Hi Team,

we are using above version for creating socket connection for our game.

The socket is working fine on all other mobile networks and WIFI except JIO 5G network in INDIA.

Once we connect the socket using JIO 5G network. The socket get disconnected multiple times without any reason and this is happens only on JIO 5G Network.

Please let us know how to resolve it

ERROR 1

Error in socket = {"message":"Request Finished with Error! Exception: Unable to read data from the transport connection: Connection reset by peer. at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x000ac] in <160ff2a7112f4c5e8071e4724342c6b6>:0 \n at BestHTTP.Extensions.ReadOnlyBufferedStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00069] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/Extensions/ReadOnlyBufferedStream.cs:48 \n at BestHTTP.Connections.BufferedReadNetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/Connections/BufferedReadNetworkStream.cs:70 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.RecordStream+Record.FillTo (System.IO.Stream input, System.Int32 length) [0x00002] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/RecordStream.cs:495 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.RecordStream+Record.ReadHeader (System.IO.Stream input) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/RecordStream.cs:533 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.RecordStream.ReadRecord () [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/RecordStream.cs:207 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsProtocol.SafeReadRecord () [0x00060] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsProtocol.cs:887 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsProtocol.ReadApplicationData (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x0004f] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsProtocol.cs:748 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsStream.ReadByte () [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsStream.cs:76 \n at BestHTTP.WebSocket.Frames.WebSocketFrameReader.ReadByte (System.IO.Stream stream) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/Frames/WebSocketFrameReader.cs:128 \n at BestHTTP.WebSocket.Frames.WebSocketFrameReader.Read (System.IO.Stream stream) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/Frames/WebSocketFrameReader.cs:50 \n at BestHTTP.WebSocket.WebSocketResponse.ReceiveThreadFunc () [0x00018] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/WebSocketResponse.cs:408 "}

UnityEngine.Debug:LogError (object)

Carrom365.SocketController/<>c:<ReConnect>b__38_2 (object) (at Assets/LUDO/Scripts/Common/SocketController.cs:219)

BestHTTP.SocketIO3.Socket/<>c__DisplayClass36_0`1:<On>b__0 (object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Socket.cs:243)

BestHTTP.SocketIO3.Events.TypedEventTable:Call (string,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Events/TypedEventTable.cs:95)

BestHTTP.SocketIO3.Socket:BestHTTP.SocketIO3.ISocket.EmitEvent (string,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Socket.cs:483)

BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.EmitEvent (string,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:642)

BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.EmitEvent (BestHTTP.SocketIO3.SocketIOEventTypes,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:650)

BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.EmitError (string) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:662)

BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.OnTransportError (BestHTTP.SocketIO3.Transports.ITransport,string) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:483)

BestHTTP.SocketIO3.Transports.WebSocketTransport:OnError (BestHTTP.WebSocket.WebSocket,string) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Transports/WebSocketTransport.cs:261)

BestHTTP.WebSocket.OverHTTP1:OnInternalRequestCallback (BestHTTP.HTTPRequest,BestHTTP.HTTPResponse) (at Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/Implementations/OverHTTP1.cs:206)

BestHTTP.Core.RequestEventHelper:HandleRequestStateChange (BestHTTP.Core.RequestEventInfo) (at Assets/ThirdPartyPlugins/Best HTTP/Source/Core/RequestEvents.cs:569)

BestHTTP.Core.RequestEventHelper:ProcessQueue () (at Assets/ThirdPartyPlugins/Best HTTP/Source/Core/RequestEvents.cs:437)

BestHTTP.HTTPManager:OnUpdate () (at Assets/ThirdPartyPlugins/Best HTTP/Source/HTTPManager.cs:422)

BestHTTP.HTTPUpdateDelegator:CallOnUpdate () (at Assets/ThirdPartyPlugins/Best HTTP/Source/HTTPUpdateDelegator.cs:286)

BestHTTP.HTTPUpdateDelegator:Update () (at Assets/ThirdPartyPlugins/Best HTTP/Source/HTTPUpdateDelegator.cs:276

ERROR 2

Error in socket = {"message":"[BestHTTP.Connections.HTTP1Handler] Remote server closed the connection before sending response header! Previous request state: Processing. Connection state: Processing\n"}

UnityEngine.Debug:LogError (object)

ERROR 3

Error in socket = {"message":"Unable to write data to the transport connection: The socket has been shut down.\n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsProtocol.SafeWriteRecord (System.Int16 type, System.Byte[] buf, System.Int32 offset, System.Int32 len) [0x00036] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsProtocol.cs:939 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsProtocol.WriteApplicationData (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x000e5] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsProtocol.cs:1060 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsStream.cs:92 \n at BestHTTP.Extensions.WriteOnlyBufferedStream.Flush () [0x00009] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/Extensions/WriteOnlyBufferedStream.cs:35 \n at BestHTTP.HTTPRequest.SendOutTo (System.IO.Stream stream) [0x000b3] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/HTTPRequest.cs:1255 \n at BestHTTP.Connections.HTTP1Handler.RunHandler () [0x000b7] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/Connections/HTTP1Handler.cs:61 "}

Nilesh410451 avatar Dec 07 '23 07:12 Nilesh410451

Anyone have idea...about socket disconnection issue. 534 million users are using JIO 5G network and its major issue. Need to resolve it ASAP..its critical issue in socket.io

Nilesh410451 avatar Dec 08 '23 05:12 Nilesh410451

It seems that there is an issue with the WebSocket connection. Not sure what we can do to prevent this though.

Does it also happen with HTTP long-polling only?

const socket = io("https://example.com", {
  transports: ["polling"]
});

darrachequesne avatar Dec 08 '23 09:12 darrachequesne

Hi Team, thank you very much for the reply.

We have already written to the JIO 5G mobile network services team. Maybe they have resolved it from their side. From today onwards we didn't get the issue. I hope the problem is resolved now. but we have tried both transports: ["websocket"] and transports: ["polling"] and none of this works in the past. we will let you know if any issue appears in socket

thanks

On Fri, Dec 8, 2023 at 3:26 PM Damien Arrachequesne < @.***> wrote:

It seems that there is an issue with the WebSocket connection. Not sure what we can do to prevent this though.

Does it also happen with HTTP long-polling only?

const socket = io("https://example.com", { transports: ["polling"]});

— Reply to this email directly, view it on GitHub https://github.com/socketio/socket.io/issues/4891#issuecomment-1846885665, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJZOTPV2FJBKXNYJQOCBJDYILP6LAVCNFSM6AAAAABAKTAI7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBWHA4DKNRWGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Thanks and Regards

Nilesh Gawade, Co-Founder

Aaryavarta Technologies | E: @.*** @.***> | M: +91 9822 000 891

http://www.aaryavarta.com

Nilesh410451 avatar Dec 08 '23 11:12 Nilesh410451

Hi Team, This issue is not resolved yet. We are using below code but the same issue appears again.

const socket = io("https://example.com", { transports: ["polling"] });

I have emailed to the network operator but they have not resolved the issue. Please check below error logs.

Error in socket = {"message":"Request Finished with Error! Exception: Unable to read data from the transport connection: Connection reset by peer. at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x000ac] in <160ff2a7112f4c5e8071e4724342c6b6>:0 \n at BestHTTP.Extensions.ReadOnlyBufferedStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00069] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/Extensions/ReadOnlyBufferedStream.cs:48 \n at BestHTTP.Connections.BufferedReadNetworkStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/Connections/BufferedReadNetworkStream.cs:70 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.RecordStream+Record.FillTo (System.IO.Stream input, System.Int32 length) [0x00002] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/RecordStream.cs:495 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.RecordStream+Record.ReadHeader (System.IO.Stream input) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/RecordStream.cs:533 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.RecordStream.ReadRecord () [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/RecordStream.cs:207 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsProtocol.SafeReadRecord () [0x00060] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsProtocol.cs:887 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsProtocol.ReadApplicationData (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x0004f] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsProtocol.cs:748 \n at BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.TlsStream.ReadByte () [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/SecureProtocol/tls/TlsStream.cs:76 \n at BestHTTP.WebSocket.Frames.WebSocketFrameReader.ReadByte (System.IO.Stream stream) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/Frames/WebSocketFrameReader.cs:128 \n at BestHTTP.WebSocket.Frames.WebSocketFrameReader.Read (System.IO.Stream stream) [0x00000] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/Frames/WebSocketFrameReader.cs:50 \n at BestHTTP.WebSocket.WebSocketResponse.ReceiveThreadFunc () [0x00018] in /Users/aaryanshgawade/Carrom365Android/Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/WebSocketResponse.cs:408 "} UnityEngine.Debug:LogError (object) Carrom365.SocketController/<>c:<ReConnect>b__38_2 (object) (at Assets/LUDO/Scripts/Common/SocketController.cs:230) BestHTTP.SocketIO3.Socket/<>c__DisplayClass36_0`1:<On>b__0 (object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Socket.cs:243) BestHTTP.SocketIO3.Events.TypedEventTable:Call (string,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Events/TypedEventTable.cs:95) BestHTTP.SocketIO3.Socket:BestHTTP.SocketIO3.ISocket.EmitEvent (string,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Socket.cs:483) BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.EmitEvent (string,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:642) BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.EmitEvent (BestHTTP.SocketIO3.SocketIOEventTypes,object[]) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:650) BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.EmitError (string) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:662) BestHTTP.SocketIO3.SocketManager:BestHTTP.SocketIO3.IManager.OnTransportError (BestHTTP.SocketIO3.Transports.ITransport,string) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/SocketManager.cs:483) BestHTTP.SocketIO3.Transports.WebSocketTransport:OnError (BestHTTP.WebSocket.WebSocket,string) (at Assets/ThirdPartyPlugins/Best HTTP/Source/SocketIO.3/Transports/WebSocketTransport.cs:261) BestHTTP.WebSocket.OverHTTP1:OnInternalRequestCallback (BestHTTP.HTTPRequest,BestHTTP.HTTPResponse) (at Assets/ThirdPartyPlugins/Best HTTP/Source/WebSocket/Implementations/OverHTTP1.cs:206) BestHTTP.Core.RequestEventHelper:HandleRequestStateChange (BestHTTP.Core.RequestEventInfo) (at Assets/ThirdPartyPlugins/Best HTTP/Source/Core/RequestEvents.cs:569) BestHTTP.Core.RequestEventHelper:ProcessQueue () (at Assets/ThirdPartyPlugins/Best HTTP/Source/Core/RequestEvents.cs:437) BestHTTP.HTTPManager:OnUpdate () (at Assets/ThirdPartyPlugins/Best HTTP/Source/HTTPManager.cs:422) BestHTTP.HTTPUpdateDelegator:CallOnUpdate () (at Assets/ThirdPartyPlugins/Best HTTP/Source/HTTPUpdateDelegator.cs:286) BestHTTP.HTTPUpdateDelegator:Update () (at Assets/ThirdPartyPlugins/Best HTTP/Source/HTTPUpdateDelegator.cs:276)

Nilesh410451 avatar Dec 09 '23 05:12 Nilesh410451

Hi Team,

can you suggest any solutions for this socket.io issue on specific network

thanks

On Fri, Dec 8, 2023 at 4:31 PM Nilesh Gawade @.***> wrote:

Hi Team, thank you very much for the reply.

We have already written to the JIO 5G mobile network services team. Maybe they have resolved it from their side. From today onwards we didn't get the issue. I hope the problem is resolved now. but we have tried both transports: ["websocket"] and transports: ["polling"] and none of this works in the past. we will let you know if any issue appears in socket

thanks

On Fri, Dec 8, 2023 at 3:26 PM Damien Arrachequesne < @.***> wrote:

It seems that there is an issue with the WebSocket connection. Not sure what we can do to prevent this though.

Does it also happen with HTTP long-polling only?

const socket = io("https://example.com", { transports: ["polling"]});

— Reply to this email directly, view it on GitHub https://github.com/socketio/socket.io/issues/4891#issuecomment-1846885665, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJZOTPV2FJBKXNYJQOCBJDYILP6LAVCNFSM6AAAAABAKTAI7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBWHA4DKNRWGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Thanks and Regards

Nilesh Gawade, Co-Founder

Aaryavarta Technologies | E: @.*** @.***> | M: +91 9822 000 891

http://www.aaryavarta.com

-- Thanks and Regards

Nilesh Gawade, Co-Founder

Aaryavarta Technologies | E: @.*** @.***> | M: +91 9822 000 891

http://www.aaryavarta.com

Nilesh410451 avatar Dec 11 '23 07:12 Nilesh410451

If the ISP is closing the TCP connection, I don't think there is much we can do (besides reconnecting, which should already be the case).

darrachequesne avatar Dec 11 '23 07:12 darrachequesne

Hi Team, it's just a fraction of seconds where the connection gets closed. I don't think ISP is closing TCP connection. Its around 534 millions reliance JIO users in INDIA. Why are they closing the TCP connection? . there must be a way in socket.io to check the issue why it is closing and it can be handled from socket.io.

thanks

On Mon, Dec 11, 2023 at 1:14 PM Damien Arrachequesne < @.***> wrote:

If the ISP is closing the TCP connection, I don't think there is much we can do (besides reconnecting, which should already be the case).

— Reply to this email directly, view it on GitHub https://github.com/socketio/socket.io/issues/4891#issuecomment-1849484275, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJZOTI6RUSFNLL5BLCIZT3YI22UPAVCNFSM6AAAAABAKTAI7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGQ4DIMRXGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Thanks and Regards

Nilesh Gawade, Co-Founder

Aaryavarta Technologies | E: @.*** @.***> | M: +91 9822 000 891

http://www.aaryavarta.com

Nilesh410451 avatar Dec 11 '23 07:12 Nilesh410451

Please check the video below in which we are playing 3 games of different companies

  1. Carrom disc pool by miniclip

  2. Carron King of Gametion global

  3. Carrom 365 game developed our company Aaryavarta Technologies( https://www.aaryavarta.com)

https://drive.google.com/file/d/1TiT_nmQJmfJrqqMHlq4ig-9Le1sWL5DK/view?usp=sharing https://drive.google.com/file/d/1TiT_nmQJmfJrqqMHlq4ig-9Le1sWL5DK/view?usp=sharing&fbclid=IwAR0QXX7tZyvFXbteCEKnKJbuhyic126jca5NafTuHVAFuRTRsa7_N9aoUag

In the above video you can clearly check that we are playing the above 3 games with JIO 5g and 4g network at the same time with different opponents in the world and facing disconnection issue

Please check second video

https://drive.google.com/file/d/1-1vjLbnJqYt-41vi6K6muWZbSpqIuXAA/view?usp=sharing https://drive.google.com/file/d/1-1vjLbnJqYt-41vi6K6muWZbSpqIuXAA/view?usp=sharing&fbclid=IwAR0AxLGE0LL5wtG1C-RmvfKxPsYU9oLmkJ4h-4LE-YgcTHTwvsI63_ZM4UU

In the above video we are checking famous game Carrom Disc pool with Vodafone, Airtel, JIO 5g, JIO 4g. 4 different mobile networks and in JIO 5g its disconnecting

Please suggest how to handle this

Thanks

On Mon, Dec 11, 2023 at 1:23 PM Nilesh Gawade @.***> wrote:

Hi Team, it's just a fraction of seconds where the connection gets closed. I don't think ISP is closing TCP connection. Its around 534 millions reliance JIO users in INDIA. Why are they closing the TCP connection? . there must be a way in socket.io to check the issue why it is closing and it can be handled from socket.io.

thanks

On Mon, Dec 11, 2023 at 1:14 PM Damien Arrachequesne < @.***> wrote:

If the ISP is closing the TCP connection, I don't think there is much we can do (besides reconnecting, which should already be the case).

— Reply to this email directly, view it on GitHub https://github.com/socketio/socket.io/issues/4891#issuecomment-1849484275, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJZOTI6RUSFNLL5BLCIZT3YI22UPAVCNFSM6AAAAABAKTAI7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGQ4DIMRXGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Thanks and Regards

Nilesh Gawade, Co-Founder

Aaryavarta Technologies | E: @.*** @.***> | M: +91 9822 000 891

http://www.aaryavarta.com

-- Thanks and Regards

Nilesh Gawade, Co-Founder

Aaryavarta Technologies | E: @.*** @.***> | M: +91 9822 000 891

http://www.aaryavarta.com

Nilesh410451 avatar Dec 11 '23 14:12 Nilesh410451

const SocketIo = require('socket.io'); const io = SocketIo(server, { allowUpgrades: false });

Hi @Nilesh410451, I have used above solution at server side, its works fine in my case. if you have still problem and you are passing huge payload you can increase { "pingTimeout: 60000" } by passing this parameter and also change value according your requirement.

nishantmovaliya avatar Feb 14 '24 12:02 nishantmovaliya

@Nilesh410451 Hi there, I am facing the same issue on my flutter app using official plugin websocket_channel. My connection abrupt with close code 1002 (details here). After struggling bw my backend and frontend for over a week I have noticed this in other apps as well. It only happens when I am on mobile network not on Wifi. This is indeed a JIO's issue and nothing to do with the libraries we are using. Same issue is observed by me while playing chess on my phone on chess.com app, similar to what you have shared with Carrom app. I do not see any solution here, other than improving our services. If you can across some better alternative/solution please connect with me.

itsji10dra avatar Feb 29 '24 06:02 itsji10dra

You should consider using a network monitoring tool to find the error better that why the connection is reset by the peer. Also you can try that there is a min delay between 2 consecutive requests. consider reading this

Mpratyush54 avatar May 06 '24 21:05 Mpratyush54