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

Cannot use 'uws', because it's been abandoned #560

Closed
1 of 2 tasks
ghost opened this issue Sep 10, 2018 · 21 comments
Closed
1 of 2 tasks

Cannot use 'uws', because it's been abandoned #560

ghost opened this issue Sep 10, 2018 · 21 comments

Comments

@ghost
Copy link

ghost commented Sep 10, 2018

  • report a bug
  • request a feature

Current behaviour

For Nodejs 8.x and 9.x (with uws = 8.x) works properly.

For Nodejs 10.x + uws (>= 8.x <= 9.x): it throws an error saying "Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'".

For Nodejs 10.x + uws (>=10.x):cannot find module 'uws'.

Steps to reproduce (if the current behaviour is a bug)

Just assign 'uws' to wsEngine, each time I'll remove all the imports by directly removing node_modules and install them by running npm i. Then my uws is installed in the mode of dev-dependencies.

Expected behaviour

Works properly like Node 8 or 9.

Setup

  • OS: Windows 8.1 (SP1), Linux (x64
  • browser: N/A
  • socket.io version: 2.0.4

Other Info

I found uws is deprecated now, so in the main page of Socket.IO SHOULD'T SUPPORT THAT any more (See https://socket.io/docs/server-api/ part). And maybe there's something code to be changed with, or change to a new lib something like uws.

See the DUPLICATED uws: https://www.npmjs.com/package/uws, the version is changing TOO RAPIDLY, not so stable.

Maybe the logic as well as socketio should be modified?
(See codes at:

case 'uws': wsModule = require('uws'); break;
).

@ghost
Copy link
Author

ghost commented Sep 15, 2018

In my test, it seems ONLY 10.148.0 (uws) works on me without any other configs, leave it here for others if they need help

BTW:Will this be a hole in the future?!

@kkomelin
Copy link

Here is more info about what happened with uws https://www.reddit.com/r/node/comments/91kgte/uws_has_been_deprecated/

@ghost
Copy link
Author

ghost commented Sep 24, 2018

Thanks @kkomelin

@slartibardfast
Copy link

hi, a fork / continuation is available, it even has a typescript based js component

https://www.npmjs.com/package/@clusterws/uws
https://github.com/ClusterWS/uWS

might be worth considering a switch?

@ghost
Copy link
Author

ghost commented Oct 28, 2018

Thanks @slartibardfast

@ghost
Copy link

ghost commented Dec 11, 2018

Has someone tested it with engine.io? https://www.npmjs.com/package/@clusterws/cws

@StefansArya
Copy link

Maybe uws was deprecated because uWebSockets.js was released..

@DarkGhostHunter
Copy link

Maybe uws was deprecated because uWebSockets.js was released..

No..

@StefansArya
Copy link

No..

Ok, I will change my comment..
Maybe we can use the official version of uWebSockets.js instead of the deprecated uws library..

@DarkGhostHunter
Copy link

DarkGhostHunter commented Feb 12, 2019 via email

@shirtleton
Copy link

uWS has not been abandoned. The maintainer created a new repo. https://github.com/uNetworking/uWebSockets.js

@stefanovualto
Copy link

uWS has not been abandoned. The maintainer created a new repo. https://github.com/uNetworking/uWebSockets.js

Does that means that we can use uWebSockets.js as wsEngine into the server configuration?

@ghost
Copy link

ghost commented May 17, 2019

@stefanovualto unfortunatelly not yet, uWebSocket.js has different structure.

This was referenced May 17, 2019
@mmdevries
Copy link

@stefanovualto I'm not sure if this solves your issue but we have created a new package based on the original uws merged with some fixes from cws. The new package should be compatible with node 10 and 12.
https://github.com/mmdevries/uws

@stefanovualto
Copy link

@mmdevries I will give it a try thank you.

@mmdevries
Copy link

@stefanovualto, Great, please let me know your findings.

@marceloch2
Copy link

@stefanovualto Just installed your fork and seems fine but not fully tested across all our applications that consume our sockets.

There are any specific cases that i should look closer?

@stefanovualto
Copy link

@marceloch2 it is not my fork (I wish it was), but @mmdevries one.

@mmdevries
Copy link

mmdevries commented Sep 2, 2019

@marceloch2, the "original uws" didn't work correct with node 10 and higher on secure connections. The SSL handshake was failing because Node 10 puts the SSL socket data into a SecureContext which could not be directly accessed. We added a workaround to overcome this issue.

When you use uws icw the Engine.IO layer compression was always disabled (at least in my opinion). We made a fix, now the flag indicating to compress the data coming from the Engine.IO is correcly send to the uws module. So, if you want to have exactly the same behavior as before then you need to set the perMessageDeflate on false while initializing the engine.io layer.

@marceloch2
Copy link

@mmdevries Thanks for the explanation, it's so far running pretty fine with node -v 10.16.3.
If i find any issue i'll for sure share it here.

Thanks again for your time to upgrade this module.

@darrachequesne
Copy link
Member

You can now use eiows, which is the published version of https://github.com/mmdevries/uws.

Again, a big thanks to @mmdevries ❤️

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

9 participants