-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transport close - ping has not timeout #3191
Comments
@tady21cn it seems the ping has failed. What is the status of the request in the Network panel? |
Someone has any updates on this issue? |
Still facing issue on "socket.io": "2.3.0" Client randomly disconnects with reason transport close and reason on server is ping timeout. The socket is stable and ping/pong events are triggered as expected. I didn't faced any issues on both client and server on version 2.0.3. I have tried degrading the version to 2.0.3 and everything worked without any disconnect event |
I second @vinaymuley96 |
@vinaymuley96 @Unforgiven-wanda |
Downgrading to 2.0.3 did not solve this for me. Still running into this issue, created a Stackoverflow question for this. Sometimes it works, sometimes it doesn't. The most recent update I have is the difference in the logging of socket.io when it works vs when it doesn't Left is the case where it doesn't work, right is the case where it does work. Can we track down issues from these logs? |
OK, let's try to find the needle...
The The
Which would mean that either the WebSocket connection is severed (the client looses connection) or the server forcefully closes the connection (here).
In that case, the server also forcefully closes the connection by sending a 'close' packet (here). Which brings us to Socket.clearTransport and finally Socket.onClose on the server side. Several possibilities here:
It would be interesting to have the Engine.IO server logs, to understand why the server closes the connection. If it's a ping timeout, it could be a case of delayed timer on the client. Which is why the heartbeat mechanism will be reverted (server sends a ping, and client responds with a pong) in Socket.IO v3. |
@darrachequesne Can I be of help to figure out those Engine.IO server logs? Not exactly sure right now if I can still provide some helpful info. I have been able to get my chat working without noticing the This is a diffcheck between two working examples. If I can still be of help figuring this out, or help providing info, let me know! Thanks for putting your attention on this :) |
@kevinwaelkens are you able to reproduce the issue? under which conditions? Note: could you please provide the logs as plain text instead of an image? Thanks! |
Is still happening |
These were the logs of a not-working environment (couldn't pin point what exactly made the difference)
These were two logs when it did work
However, I can't seem to connect anymore. I tried everything both on version 2.3.0, but I can't join a room anymore apparently... It seems like it keeps reconnecting, but gets disconnected within 2s. These are my latest logs
Without the debug mode, it's a little more clear that there's always alternating between 1 and 2 connections...
|
I created a repository in which you should be able to reproduce this issue. Please let me know if you need any more help setting this up or if I can just provide more information |
Experiencing similar issue, although haven't quite investigated thoroughly. Have anyone been experiencing this or similar issue with socket.io 3.x or 4.x? |
I'm going to close this issue, as it should be fixed in Socket.IO v3. See also: https://socket.io/docs/v4/troubleshooting-connection-issues/ Please reopen if needed. |
Stll issue is there in 4.7.5 |
Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Current behaviour
socket.io will occur "transport close" when i use the internet proxy software.
I want to know the root cause, so open DEBUG model on client and server sides, still no answer after check the log.
remark : the option of client reconnect is closed.
I guessed that:
server log:
Tue, 06 Mar 2018 10:00:39 GMT socket.io:socket got packet {"type":2,"nsp":"/","data":["message",{"message_id":"msg_sync_mouse_1520330439192","client_id":"p-VZ_JZeeBABWZwYAAAB","type":"sync_mouse","initiator":"5a379898f329915fd2470d72","data":{"user_id":"5a379898f329915fd2470d72","meeting_id":"5a72ba31f329910992b98de0","x":402,"y":-13,"cursor":"default"}}]} Tue, 06 Mar 2018 10:00:39 GMT socket.io:socket emitting event ["message",{"message_id":"msg_sync_mouse_1520330439192","client_id":"p-VZ_JZeeBABWZwYAAAB","type":"sync_mouse","initiator":"5a379898f329915fd2470d72","data":{"user_id":"5a379898f329915fd2470d72","meeting_id":"5a72ba31f329910992b98de0","x":402,"y":-13,"cursor":"default"}}] Tue, 06 Mar 2018 10:00:39 GMT socket.io:socket dispatching an event ["message",{"message_id":"msg_sync_mouse_1520330439192","client_id":"p-VZ_JZeeBABWZwYAAAB","type":"sync_mouse","initiator":"5a379898f329915fd2470d72","data":{"user_id":"5a379898f329915fd2470d72","meeting_id":"5a72ba31f329910992b98de0","x":402,"y":-13,"cursor":"default"}}] Tue, 06 Mar 2018 10:00:39 GMT socket.io:client client close with reason transport close Tue, 06 Mar 2018 10:00:39 GMT socket.io:socket closing socket - reason transport close Tue, 06 Mar 2018 10:00:39 GMT socket.io:socket leave room 5a72ba31f329910992b98de0 Tue, 06 Mar 2018 10:00:39 GMT socket.io:socket left room 5a72ba31f329910992b98de0
client log:
browser.js:133 engine.io-client:socket flushing 1 packets in socket +15ms 18:00:39.425 browser.js:123 socket.io-client:manager writing packet {"type":2,"data":["message",{"message_id":"msg_sync_mouse_1520330439426","client_id":"p-VZ_JZeeBABWZwYAAAB","type":"sync_mouse","initiator":"5a379898f329915fd2470d72","data":{"user_id":"5a379898f329915fd2470d72","meeting_id":"5a72ba31f329910992b98de0","x":439,"y":62,"cursor":"default"}}],"options":{"compress":true},"nsp":"/"} +18ms 18:00:39.425 browser.js:133 socket.io-parser encoding packet {"type":2,"data":["message",{"message_id":"msg_sync_mouse_1520330439426","client_id":"p-VZ_JZeeBABWZwYAAAB","type":"sync_mouse","initiator":"5a379898f329915fd2470d72","data":{"user_id":"5a379898f329915fd2470d72","meeting_id":"5a72ba31f329910992b98de0","x":439,"y":62,"cursor":"default"}}],"options":{"compress":true},"nsp":"/"} +17ms 18:00:39.426 browser.js:133 socket.io-parser encoded {"type":2,"data":["message",{"message_id":"msg_sync_mouse_1520330439426","client_id":"p-VZ_JZeeBABWZwYAAAB","type":"sync_mouse","initiator":"5a379898f329915fd2470d72","data":{"user_id":"5a379898f329915fd2470d72","meeting_id":"5a72ba31f329910992b98de0","x":439,"y":62,"cursor":"default"}}],"options":{"compress":true},"nsp":"/"} as 2["message",{"message_id":"msg_sync_mouse_1520330439426","client_id":"p-VZ_JZeeBABWZwYAAAB","type":"sync_mouse","initiator":"5a379898f329915fd2470d72","data":{"user_id":"5a379898f329915fd2470d72","meeting_id":"5a72ba31f329910992b98de0","x":439,"y":62,"cursor":"default"}}] +0ms 18:00:39.426 browser.js:133 engine.io-client:socket flushing 1 packets in socket +17ms 18:00:39.429 browser.js:133 engine.io-client:socket socket close with reason: "transport close" +3ms 18:00:39.429 browser.js:123 socket.io-client:manager onclose +4ms 18:00:39.430 browser.js:123 socket.io-client:manager cleanup +0ms 18:00:39.430 browser.js:123 socket.io-client:socket close (transport close) +1ms
Steps to reproduce (if the current behaviour is a bug)
Note: the best way to get a quick answer is to provide a failing test case, by forking the following fiddle for example.
Expected behaviour
to find out the reason, avoid "transport close"
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered: