-
Notifications
You must be signed in to change notification settings - Fork 3
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
Release #43 throws an error after a couple of refreshes #106
Comments
Temporary fix:
// Temporary fix, remove when https://github.com/kaliberjs/build/issues/106 is resolved
process.on('uncaughtException', (err) => { if (err.code !== 'ECONNRESET') throw err })
module.exports = { ... } |
Will this be fixed? |
nodejs/node#14102 suggest a missing websockets/ws#1256 suggests We could however add a line in https://github.com/kaliberjs/build/blob/master/library/webpack-plugins/websocket-communication-plugin.js const wss = new ws.Server({ port })
wss.on('error', () => ...) Please try that on a machine where you can easily reproduce the problem and see if the error moves through that method. A suggestion for a workaround in case that doesn't work, add the following to the client: window.addEventListener('beforeunload', function () {
ws.close();
}); Note that this only has effect on Chrome, but according to the reports Chrome > 63 is the browser affected most. A related quote:
More possible fixes (I think these are the most promising): // Server example.
wss.on('connection', (ws) => {
ws.on('error', (err) => {
// Ignore network errors like `ECONNRESET`, `EPIPE`, etc.
if (err.errno) return;
throw err;
});
});
Lastly (from websockets/ws#1256):
|
So yeah, I think we now have enough information to fix it. Let's test it next week. |
You definitely need an Errors can also be emitted on the Don't use |
Trace with
longjohn
:The text was updated successfully, but these errors were encountered: