-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
printStacks null reference error within index.js #81
Comments
Interesting, yeah this code was changed under the assumption that |
Yes and No. Here is what I was up to when I came across the issue. I was playing around with another component and I noticed after a simple code snippet my program wasn't returning to the command prompt. So... I added why-is-node-running and got the null reference error. So you can see from this post my output from why-is-node-running? CheshireCaat/playwright-with-fingerprints#44 basically it's code that launches hooks that listen for events and stuff. (FILEHANDLE, DNSCHANNEL and TTYWRAP) had the problems it seems. I don't have hello-world example type code to paste to you. I think for now just add that null check and at least it doesn't cause a fatal error. |
I have same issue here, running in node test runner |
We should probably test if Consider what happens when you: import whyIsNodeRunning from 'why-is-node-running';
crypto.subtle
.generateKey('Ed25519', true, ['sign', 'verify'])
.then(key => {
console.log('Generated', key);
})
.finally(() => {
whyIsNodeRunning();
}); I logged around the problem area.
|
Closes mafintosh#81 Signed-off-by: Jon Koops <[email protected]>
Closes #81 Signed-off-by: Jon Koops <[email protected]>
I've restored the old behavior of filtering out any unidentifiable file names and tagged a new release. |
printStacks throws a null reference error within index.js when stack.getFileName() method returns null.
BEFORE:
function printStacks (asyncResource, logger) {
const stacks = asyncResource.stacks.filter((stack) => !stack.getFileName().startsWith('node:'))
THE FIX:
function printStacks (asyncResource, logger) {
const stacks = asyncResource.stacks.filter(stack => stack.getFileName() && !stack.getFileName().startsWith('node:'));
Original output:
Null Ref Exception
New output:
FILEHANDLE
(unknown stack trace)
I am still trying to figure out if I can get a better error message here but wanted to report/share in the mean time.
The text was updated successfully, but these errors were encountered: