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

SignalR ws bufferutil utf-8-validate #19089

Closed
Exocomp opened this issue Feb 17, 2020 · 3 comments
Closed

SignalR ws bufferutil utf-8-validate #19089

Exocomp opened this issue Feb 17, 2020 · 3 comments
Labels
area-signalr Includes: SignalR clients and servers Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.

Comments

@Exocomp
Copy link

Exocomp commented Feb 17, 2020

Angular: 9.0.1
@microsoft/signalr: 3.0.0

I get the following warnings when I build for prod:

WARNING in ./node_modules/ws/lib/buffer-util.js
Module not found: Error: Can't resolve 'bufferutil' in 'R:\phoenix\src\phoenix-angular-web\node_modules\ws\lib'
 @ ./node_modules/ws/lib/buffer-util.js
 @ ./node_modules/ws/lib/receiver.js
 @ ./node_modules/ws/index.js
 @ ./dist/server/main.js
 @ ./server.ts

WARNING in ./node_modules/ws/lib/validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in 'R:\phoenix\src\phoenix-angular-web\node_modules\ws\lib'
 @ ./node_modules/ws/lib/validation.js
 @ ./node_modules/ws/lib/receiver.js
 @ ./node_modules/ws/index.js
 @ ./dist/server/main.js
 @ ./server.ts

I see that @microsoft/signalr has a dependency on ws and in the ws readme I see:

https://github.com/websockets/ws

"Opt-in for performance and spec compliance
There are 2 optional modules that can be installed along side with the ws module. These modules are binary addons which improve certain operations. Prebuilt binaries are available for the most popular platforms so you don't necessarily need to have a C++ compiler installed on your machine.

npm install --save-optional bufferutil: Allows to efficiently perform operations such as masking and unmasking the data payload of the WebSocket frames.
npm install --save-optional utf-8-validate: Allows to efficiently check if a message contains valid UTF-8 as required by the spec."

My question:

  • Will SignalR benefit from bufferutil/utf-8-validate in any way?
  • Is there better way to handle this with the @microsoft/signalr package so that it doesn't throw these warnings?
@javiercn javiercn added the area-signalr Includes: SignalR clients and servers label Feb 17, 2020
@BrennanConroy
Copy link
Member

I can't reproduce the warnings. But it looks like maybe the ws package has a fix now. You could try referencing version 7.2.1 explicitly and see if that resolves the warning.

@analogrelay analogrelay added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Feb 19, 2020
@ghost
Copy link

ghost commented Feb 23, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.

@Exocomp
Copy link
Author

Exocomp commented Mar 3, 2020

I can't reproduce it anymore, closing.

@Exocomp Exocomp closed this as completed Mar 3, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-signalr Includes: SignalR clients and servers Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.
Projects
None yet
Development

No branches or pull requests

4 participants