-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ERROR uncaughtException: Cannot read property 'aborted' of null #1229
Comments
See #1201, is there a way to reproduce the issue? |
Are you by any chance throwing an error from the This is the only way I can make const http = require('http');
const host = 'a'.repeat(10);
let req = http.get({ host });
req.on('error', (err) => {
if (req.aborted) return;
req = null;
throw err;
});
process.once('uncaughtException', () => {}); Can you also please add more details?
Thanks. |
Hello Luigi, Before, i'll give you more informations about my environment:
Using webstomp over websocket with SSL:
The trace:
Regards |
Thanks, that seems a different error though (not the one in the issue title) and it isn't caught because you didn't add an |
Ok, I can reproduce with this code: const WebSocket = require('ws');
const ws = new WebSocket('wss://localhost');
process.on('uncaughtException', (err) => {
console.error(err);
});
but this is not an issue in The problem here is the use of This no longer happens in Node.js 9 (nodejs/node@620ba41694) but there is nothing wrong also in previous versions of Node.js. |
Thank you again Luigi. Will change my code and will update or close this issue |
Any update here? |
Closing due to inactivity. If your issue is still unresolved, please comment back and I will reopen this. |
Having the same problem here when using |
same here with electron! |
Having the problem since I switched to the very first version in which you support handshakeTimeout (something around 3.0.2 or so) From this version on up to the latest: If this sequence goes into "error", I'll receive an exception
a couple of seconds after the error occurs. The first attempt fails as expected after 5s
If I repeat the sequence then, it immediately fails with
but then after 5 s the exception occurs. For me it looks like as if you would not terminate the handshakeTimer on error
|
@accuware your issue is different from the one reported by the original poster. In your case it seems that Line 542 in 14d9088
is called after the |
ws/lib/WebSocket.js
Line 639 in d0741fa
It seems that, if a previous error occurs, this._req is null. So this line seems to produce an exception.
The text was updated successfully, but these errors were encountered: