Skip to content
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

thread '<unnamed>' panicked at 'EngineIO Error' #216

Closed
milandekruijf opened this issue Aug 12, 2022 · 10 comments
Closed

thread '<unnamed>' panicked at 'EngineIO Error' #216

milandekruijf opened this issue Aug 12, 2022 · 10 comments

Comments

@milandekruijf
Copy link

milandekruijf commented Aug 12, 2022

I have the exact same issue as closed issue #166. Are there any updates? I am not sure why it was closed.

EDIT: Something else I noticed it that I don't receive events from the server anymore after some time.

@SSebo
Copy link
Contributor

SSebo commented Aug 12, 2022

EDIT: Something else I noticed it that I don't receive events from the server anymore after some time.

the thread which is respond to handle packet to callback is panic https://github.com/1c3t3a/rust-socketio/blob/main/socketio/src/client/builder.rs#L271

anything error about the underlying websocket connection will cause this thread panic

@milandekruijf
Copy link
Author

I wouldn't know what to do then. It works perfectly on the nodejs implementation of socketio. It happens so sudden, without any reason.

@1c3t3a
Copy link
Owner

1c3t3a commented Aug 12, 2022

In software, nothing happens without any reason. The nodejs implementation contains logic for reconnecting when the underlying websocket connection is closed for some reason (laggy network or whatever). This implementation doesn't have such a logic, but @SSebo is currently working on it.

@milandekruijf
Copy link
Author

Oh, I didn't know that. I look forward to having that feature.

@milandekruijf
Copy link
Author

milandekruijf commented Aug 12, 2022

The error indicates that the WebSocket control frame was fragmented and invalid packet id 101, 105, 68, 44, 32 (maybe even more, they just seem to be added every time I edit this message), btw. Just thought it would maybe be helpful to know. I am just logging it instead of panic'ing for now, and that keeps it running for me, although I am probably not receiving all the data.

@milandekruijf
Copy link
Author

I even got 'thread '' panicked at 'internal error: entered unreachable code: Won't happen as we open the connection beforehand',' after a little while. How is that even possible.

@milandekruijf
Copy link
Author

milandekruijf commented Aug 14, 2022

All my issues seem to be entirely fixed after running the socket in a blocking allowed thread using tokio::task::spawn_blocking method. I didn't really get an error message before to let me know that I had to do that, but now I did, so it might've been a recent push.

let inner = runtime.block_on(AsyncWebsocketSecureTransport::new(

@milandekruijf
Copy link
Author

Nevermind. I actually got the error again after it running for like 7 hours.

@SSebo
Copy link
Contributor

SSebo commented Aug 16, 2022

@1c3t3a @milandekruijf maybe we should add some trace log.

@1c3t3a
Copy link
Owner

1c3t3a commented Oct 20, 2022

This behaviour is now different with #229, this won't panic but rather try to reconnect on a transport error. I am closing this bug as it is outdated.

@1c3t3a 1c3t3a closed this as completed Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants