sample plugin error
Closed this issue · 3 comments
Issue
trying to test the sample plugin, after some changes and reloading, some error was throwed
Error: read ECONNRESET
at _errnoException (util.js:1024:11)
at TCP.onread (net.js:615:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
BTW, the sample plugin's css name in manifest.json
may be wrong
Environment
Mac 10.12.6 & Chrome 63.0.3239.108
Hi CallMeXYZ.
I'm also getting the same error in my existing project. After a little digging it seems the websockets package has introduced a breaking change without changing their major version number! 😡
This means yarn thinks it's safe to use version 3.3.3 instead of 3.0.0 (the version this package was developed against)
net.Socket
errors are no longer swallowed in version 3.3.3.
To add insult to injury, a simple client disconnect is treated as an error - which is insanity.
We have a few options:
-
We can add:
ws.on("error", () => /* NOOP */);
toHotReloaderServer.ts
line 24. -
we can add some more involved error handling where we swallow the disconnect "error" only and throw the rest.
-
Or we can change package.json to force version 3.0.0
@rubenspgcavalcante over to you
@RShergold it's not a breaking change. You should add an 'error'
listener anyway as there are other errors in all ws versions that can make your server crash if you don't have at least one.
The issue seems to be in Chrome 63, all other browsers do not trigger the error.
FWIW I also filed an issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=798194#c1
@RShergold got it , maybe you can create a pull-request?