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

Connection timeout errors caused by Webpack #1537

Closed
Quovadisqc opened this issue Apr 6, 2022 · 4 comments
Closed

Connection timeout errors caused by Webpack #1537

Quovadisqc opened this issue Apr 6, 2022 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@Quovadisqc
Copy link

Describe the bug
Webpack version 5.71.0 causes an issue with this library.
It causes statements such as ""__initialize" in WebSocket" in this function to be changed to true.
webpack/webpack#15633

Expected behavior
This is obviously not an issue with this library but I though it would help others to have it documented.
Perhaps error handling could be improved for transports detection.

@Quovadisqc Quovadisqc added the bug Something isn't working label Apr 6, 2022
@darrachequesne
Copy link
Member

Hi! Thanks for the heads-up on this 👍

Is there any workaround/fix that could be added on our side?

@jayarjo
Copy link

jayarjo commented May 2, 2022

@Quovadisqc @darrachequesne any ideas on why would Webpack evaluate "__initialize" in WebSocket condition into a literal true?

darrachequesne added a commit to socketio/engine.io-client that referenced this issue May 2, 2022
This check was added for the flashsocket transport, which has been
deprecated for a while now ([1]). But it fails with latest webpack
versions, as the expression `"__initialize" in WebSocket` gets
evaluated to `true`.

Related:

- #689
- socketio/socket.io-client#1537

[1]: dbc65f3
@Quovadisqc
Copy link
Author

@jayarjo From my understanding, Webpack had an issue when processing "property in object" statements on imported tokens which made Webpack always evaluate and transform the statement to "true". The issue was introduced in version 5.70 and fixed in version 5.72.

@darrachequesne
Copy link
Member

This should be fixed by socketio/engine.io-client@f158c8e.

@Quovadisqc thanks a lot for the detailed explanation 👍

@darrachequesne darrachequesne added this to the 4.5.0 milestone May 3, 2022
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