Skip to content
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

Stacktrace parsing removes parenthes from source maps when using NEXT.js Route Groups #2189

Open
adamstuller opened this issue Aug 27, 2024 · 4 comments
Labels
backlog We hope to fix this feature/bug in the future

Comments

@adamstuller
Copy link

Describe the bug

When using route groups in NEXT.js, and submitting an error using @bugsnag/js notify method, stacktrace is incorrectly parsed (all parentheses are removed).

For example: file URL https://APP_URL/_next/static/chunks/app/(app)/layout-65e9281b65d94580.js is converted to https://APP_URL/_next/static/chunks/app/app/layout-65e9281b65d94580.js. This makes Bugsnag unable to find a matching uploaded source map.

This problem is caused by error-stack-parser library used for javascript error stacktrace parsing. There is a 2-year-old opened issue with a proposed solution stacktracejs/error-stack-parser#62, but evidently, no one maintains the repo nowadays.

Context

Here parentheses are removed in the error-stack-parser library: https://github.com/stacktracejs/error-stack-parser/blob/master/error-stack-parser.js#L47
Here is the PR that should solve it but no one merges it: stacktracejs/error-stack-parser#82
Here it is used in Bugsnag repository: https://github.com/bugsnag/bugsnag-js/blob/next/packages/core/event.js#L221

Proposed solution

As it is a core feature, it might make sense to fork the library and fix the issue.

@hannah-smartbear
Copy link

Hi @adamstuller,

Thanks for pointing this out.

We have raised this with our engineers, who have added an item to their backlog to implement a fix for this. While we can’t give an ETA for when this will be implemented, we will be sure to let you know here of any updates.

@hannah-smartbear hannah-smartbear added the backlog We hope to fix this feature/bug in the future label Aug 28, 2024
@andylacko
Copy link

Hi @hannah-smartbear , any updates?

@andylacko
Copy link

Is this project dead? We're switching to another tool since Bugsnag seems to be overlooking our issues. We aren't using any obscure frameworks for front-end development; we're working with the most widely adopted one

@mclack
Copy link
Contributor

mclack commented Sep 16, 2024

Hi @andylacko

Apologies for the delay in response here.

As the fix for this relies on needing to fix or fork a 3rd party library, it's going to take us some time to come up with a solution.

I'm afraid we still don't have an ETA we can share on this, but we will make sure to post any further updates on this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future
Projects
None yet
Development

No branches or pull requests

4 participants