Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
stacktraces from async functions break error reporting #24863
Comments
|
Hi @mathewTH ! Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it. If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look. Thanks for using Gatsby! |
|
I have reproduced the bug using https://github.com/mathewTH/gatsby-bug-24863-repro |
|
Hi @mathewTH . I'm a bit confused here, because it seems to be doing what it's supposed to be doing. Does the file |
|
Yes that file exists, however the filename being used from the stack trace
has 'async ' prepended which causes the file to not be found.
…On Thu, 18 Jun 2020, 22:08 Matt Kane ***@***.***> wrote:
Hi @mathewTH <https://github.com/mathewTH> . I'm a bit confused here,
because it seems to be doing what it's supposed to be doing. Does the file
C:\Users\Mathew\Development\dive-club-gatsby\node_modules\gatsby-source-google-spreadsheet\gatsby-node.js
actually exist? The code there is trying to load that file so that it can
highlight the context of the error. I'm confused as to why the stack frame
has that filename, but the file doesn't exist.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24863 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZCFCSGWLPSSN6J2PXGPTDRXHRRTANCNFSM4NYAG2FQ>
.
|
|
Hiya! This issue has gone quiet. Spooky quiet. We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! |
|
@mathewTH Thank you for a great reproduction! I've confirmed this bug on the latest gatsby. This seems to be a problem with To fix this problem one would replace stacktrace library with a inlined version that works for async functions. In addition, adding a test to error reporting would be useful. |
|
Hi, I'm new to open source, can I try to solve this issue? |


Description
Error while processing an error generated by a source plugin.
Gatsby tries to open an invalid filename from the stack trace. This causes a new error that hides the original plugin error.
Steps to reproduce
I'm unsure of exact steps, although if necessary I might be able to create some. But from what I have seen, I believe it could be triggered when a plugin throws an exception with a stack trace entry which contains
gatsby-nodebut is not a valid filename. In my case the invalid filename isasync C:\Users\Mathew\Development\dive-club-gatsby\node_modules\gatsby-source-google-spreadsheet\gatsby-node.js.Expected result
Something like the following:
I produced that output by modifying
api-runner-node.js, addingafter line 383
const file = stackTrace.parse(err).find(file => /gatsby-node/.test(file.fileName));(changingconsttolettoo) and beforeif (file) {.Actual result
Environment