-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
TypeError: Cannot read property 'binary' of undefined #5971
Comments
Reverting to an older version of websockets in npm/node fixes the issue. It looks like flags was removed in the latest websocket and thus causes this issue? Seems emscripten/the sdl_net port needs to be updated to represent this? See here: websockets/ws@c15118f |
Right now I have to revert to version 2 of 'ws'. (out of 6 major versions that exist). Using version 2 also triggers a npm vulnerability warning for the 'ws' package. Is there a workaround I'm not aware of? (That doesn't involve patching emscripten?) |
Apparently the version of ws used in the emscripten socket tests is 0.8.0 (in the directory tests/sockets/ws ). And it really only supports at most version 2 of ws. Versions of ws greater than 2 cause the tests to fail. To correct this problem is possibly only updating the code emscripten. |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
I'm writing some networking code using sdl_net and I'm getting this error & crash (on the server) any time I send data from the client to the server (but not the other way around).
Commenting out the following 'if (!flags.binary)' statement in the server.js output results in a functioning server and everything works as expected.
What's even more strange is I've written a minimal test case and this doesn't crop up on that, it's only happening when trying to integrate it into my larger project, which uses various other libraries. (here are the flags)
(Server run via node, client run via js/html output. All on localhost)
Looking at the latest websocket, is it possible that flags was deprecated?
The text was updated successfully, but these errors were encountered: