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

Unhandled Runtime Error Error: unknown packet type NaN #3927

Closed
Him-2C opened this issue May 16, 2021 · 4 comments
Closed

Unhandled Runtime Error Error: unknown packet type NaN #3927

Him-2C opened this issue May 16, 2021 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@Him-2C
Copy link

Him-2C commented May 16, 2021

Describe the bug
How to fix this

Unhandled Runtime Error
Error: unknown packet type NaN

Socket.IO server version: 4.1.0
Socket.IO client version: 4.1.0

Client

image

@Him-2C Him-2C added the bug Something isn't working label May 16, 2021
@el-zorab
Copy link

Hello! Could you provide the code you are using?

@Him-2C
Copy link
Author

Him-2C commented May 16, 2021

@CallMeGhosty duplicate 3922

I can not provide it to you, bcz 4.0.2 it works!

darrachequesne added a commit that referenced this issue May 17, 2021
Using `socket.io@4.1.0` with `socket.io-adapter@2.2.0` would lead to
the following error:

> Uncaught Error: unknown packet type NaN

Because the packet would be encoded twice, resulting in "undefined".

See also:

- socketio/socket.io-adapter@5579d40
- dc381b7

Related:

- #3922
- #3927
@darrachequesne
Copy link
Member

This should be fixed in socket.io@4.1.2. Could you please check?

@darrachequesne darrachequesne added this to the 4.1.2 milestone May 17, 2021
@Him-2C
Copy link
Author

Him-2C commented May 18, 2021

@darrachequesne Work! thank you.

@Him-2C Him-2C closed this as completed May 18, 2021
dzad pushed a commit to dzad/socket.io that referenced this issue May 29, 2023
Using `socket.io@4.1.0` with `socket.io-adapter@2.2.0` would lead to
the following error:

> Uncaught Error: unknown packet type NaN

Because the packet would be encoded twice, resulting in "undefined".

See also:

- socketio/socket.io-adapter@5579d40
- socketio@aafc3d8

Related:

- socketio#3922
- socketio#3927
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants