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

Unminify failing in v8 vs v7 #13419

Open
3 tasks done
benscobie opened this issue Aug 18, 2024 · 11 comments
Open
3 tasks done

Unminify failing in v8 vs v7 #13419

benscobie opened this issue Aug 18, 2024 · 11 comments

Comments

@benscobie
Copy link

benscobie commented Aug 18, 2024

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

8.26.0

Framework Version

Next 14.2.5

Link to Sentry event

https://none-rai.sentry.io/issues/5692732697/events/524b2243e043485caeab2735c6464186/?project=4506994036703232

Reproduction Example/SDK Setup

https://github.com/benscobie/student-loan-repayment-calculator - this is using 8.25.0 but I've tested locally with 8.26.0 and that has the same issue.

Live URL for this project is here: https://www.studentloanrepaymentcalc.co.uk/

This is happening in 3rd party code with widenClientFileUpload, I've not tested this with first party code yet.

Steps to Reproduce

  1. Load up https://www.studentloanrepaymentcalc.co.uk/ or clone the repo and setup env vars and run yarn build && yarn start
  2. Use Safari v13 or some other old browser that will trigger a syntax error
  3. Loan Type -> Plan 5, Balance Remaining £1 -> Save Plan -> Error thrown within chart.js

Expected Result

The code is correctly unminified as was the case in v7

Actual Result

The code cannot be unminified in the UI. The Releases tab has the error Stack frame path doesn't match a source file artifact name and the debug IDs tab has Stack frame doesn't have Debug IDs.

The artifact bundles in the latest v7 release has the ~/_next/static/ file path like so:
~/_next/static/chunks/555-d441d4fd54bfbe83.js
Sourcemap Reference: 555-d441d4fd54bfbe83.js.map

The artifact bundles in the latest v8 release doesn't contain that file path, though I'm not sure if that is by design given the addition of debug IDs:
~/09b852f2-09fc-41b1-a8af-c8a3c4a613ef-0.js
Sourcemap Reference: 236.js.map
Debug ID: 09b852f2-09fc-41b1-a8af-c8a3c4a613ef

After reading the troubleshooting guide I couldn't locate the debug_meta in the v8 event payload.

The debug IDs appear to be injected as seen here (this is the path referenced in the v8 event): https://www.studentloanrepaymentcalc.co.uk/_next/static/chunks/ee8b1517-f26c95194c102265.js

In v7 the code is mapped, an example event using the latest v7 is here: https://none-rai.sentry.io/issues/5271420882/events/224718c00bc142198e9deefad68eb5b3/?project=4506994036703232&statsPeriod=14d

Whereas a V8 event doesn't map for the same error: https://none-rai.sentry.io/issues/5692732697/events/524b2243e043485caeab2735c6464186/?project=4506994036703232

Log when uploading with v8:

[@sentry/nextjs - Node.js] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
> Found 22 files
> Analyzing 22 sources
> Analyzing completed in 0.023s
> Adding source map references
> Bundling completed in 0.357s
> Bundled 22 files for upload
> Bundle ID: a5bb3020-802a-5a1a-a001-01e65fdcd422
> Optimizing completed in 0.019s
> Uploading completed in 0.974s
> Uploaded files to Sentry
> Processing completed in 0.205s
> File upload complete (processing pending on server)
> Organization: none-rai
> Project: slrc-frontend
> Release: 0CcTdo-bKTOHas9sjJIzz
> Dist: None
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/09b852f2-09fc-41b1-a8af-c8a3c4a613ef-0.js (sourcemap at 236.js.map, debug id 09b852f2-09fc-41b1-a8af-c8a3c4a613ef)
    ~/4b6a4114-122d-4c6e-bb85-13cc1a3748aa-1.js (sourcemap at 3.js.map, debug id 4b6a4114-122d-4c6e-bb85-13cc1a3748aa)
    ~/5d996ee9-31f8-4add-a0b3-6458e58a8650-2.js (sourcemap at 859.js.map, debug id 5d996ee9-31f8-4add-a0b3-6458e58a8650)
    ~/66083d84-4d70-436c-96fa-7d43d56c08dd-5.js (sourcemap at _document.js.map, debug id 66083d84-4d70-436c-96fa-7d43d56c08dd)
    ~/6dcad467-3abc-462b-8351-4ecbcccb62e6-3.js (sourcemap at instrumentation.js.map, debug id 6dcad467-3abc-462b-8351-4ecbcccb62e6)
    ~/7f189de2-3b5f-4ad1-8a15-704a32821342-4.js (sourcemap at _app.js.map, debug id 7f189de2-3b5f-4ad1-8a15-704a32821342)
    ~/888fef21-f8a7-41af-b23c-18d2869d92f8-10.js (sourcemap at webpack-runtime.js.map, debug id 888fef21-f8a7-41af-b23c-18d2869d92f8)
    ~/c9768282-dc62-48c4-b1af-698bf68ef0ef-6.js (sourcemap at _error.js.map, debug id c9768282-dc62-48c4-b1af-698bf68ef0ef)
    ~/dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a-9.js (sourcemap at webpack-api-runtime.js.map, debug id dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a)
    ~/e55e5078-1a5b-4998-9c4c-bd5d5e6588f8-7.js (sourcemap at calculate.js.map, debug id e55e5078-1a5b-4998-9c4c-bd5d5e6588f8)
    ~/f62e2db7-d47d-4de3-b165-ee640f6791df-8.js (sourcemap at index.js.map, debug id f62e2db7-d47d-4de3-b165-ee640f6791df)
  Source Maps
    ~/09b852f2-09fc-41b1-a8af-c8a3c4a613ef-0.js.map (debug id 09b852f2-09fc-41b1-a8af-c8a3c4a613ef)
    ~/4b6a4114-122d-4c6e-bb85-13cc1a3748aa-1.js.map (debug id 4b6a4114-122d-4c6e-bb85-13cc1a3748aa)
    ~/5d996ee9-31f8-4add-a0b3-6458e58a8650-2.js.map (debug id 5d996ee9-31f8-4add-a0b3-6458e58a8650)
    ~/66083d84-4d70-436c-96fa-7d43d56c08dd-5.js.map (debug id 66083d84-4d70-436c-96fa-7d43d56c08dd)
    ~/6dcad467-3abc-462b-8351-4ecbcccb62e6-3.js.map (debug id 6dcad467-3abc-462b-8351-4ecbcccb62e6)
    ~/7f189de2-3b5f-4ad1-8a15-704a32821342-4.js.map (debug id 7f189de2-3b5f-4ad1-8a15-704a32821342)
    ~/888fef21-f8a7-41af-b23c-18d2869d92f8-10.js.map (debug id 888fef21-f8a7-41af-b23c-18d2869d92f8)
    ~/c9768282-dc62-48c4-b1af-698bf68ef0ef-6.js.map (debug id c9768282-dc62-48c4-b1af-698bf68ef0ef)
    ~/dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a-9.js.map (debug id dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a)
    ~/e55e5078-1a5b-4998-9c4c-bd5d5e6588f8-7.js.map (debug id e55e5078-1a5b-4998-9c4c-bd5d5e6588f8)
    ~/f62e2db7-d47d-4de3-b165-ee640f6791df-8.js.map (debug id f62e2db7-d47d-4de3-b165-ee640f6791df)
[@sentry/nextjs - Node.js] Info: Successfully uploaded source maps to Sentry
[@sentry/nextjs - Edge] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
> Found 26 files
> Analyzing 26 sources
> Analyzing completed in 0.026s
> Adding source map references
> Bundling completed in 0.42s
> Bundled 26 files for upload
> Bundle ID: b5d0b0f9-c8ef-5f91-ad85-8dfde5acf314
> Optimizing completed in 0.021s
> Uploading completed in 3.852s
> Uploaded files to Sentry
> Processing completed in 0.416s
> File upload complete (processing pending on server)
> Organization: none-rai
> Project: slrc-frontend
> Release: 0CcTdo-bKTOHas9sjJIzz
> Dist: None
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/09b852f2-09fc-41b1-a8af-c8a3c4a613ef-0.js (sourcemap at 236.js.map, debug id 09b852f2-09fc-41b1-a8af-c8a3c4a613ef)
    ~/19dc2d67-8c41-4852-99eb-fe70d770ce08-3.js (sourcemap at edge-instrumentation.js.map, debug id 19dc2d67-8c41-4852-99eb-fe70d770ce08)
    ~/4b6a4114-122d-4c6e-bb85-13cc1a3748aa-1.js (sourcemap at 3.js.map, debug id 4b6a4114-122d-4c6e-bb85-13cc1a3748aa)
    ~/5d996ee9-31f8-4add-a0b3-6458e58a8650-2.js (sourcemap at 859.js.map, debug id 5d996ee9-31f8-4add-a0b3-6458e58a8650)
    ~/66083d84-4d70-436c-96fa-7d43d56c08dd-8.js (sourcemap at _document.js.map, debug id 66083d84-4d70-436c-96fa-7d43d56c08dd)
    ~/6dcad467-3abc-462b-8351-4ecbcccb62e6-5.js (sourcemap at instrumentation.js.map, debug id 6dcad467-3abc-462b-8351-4ecbcccb62e6)
    ~/74496756-00a3-4d52-9e45-b53b8660c2ed-4.js (sourcemap at edge-runtime-webpack.js.map, debug id 74496756-00a3-4d52-9e45-b53b8660c2ed)
    ~/7f189de2-3b5f-4ad1-8a15-704a32821342-7.js (sourcemap at _app.js.map, debug id 7f189de2-3b5f-4ad1-8a15-704a32821342)
    ~/888fef21-f8a7-41af-b23c-18d2869d92f8-13.js (sourcemap at webpack-runtime.js.map, debug id 888fef21-f8a7-41af-b23c-18d2869d92f8)
    ~/c9768282-dc62-48c4-b1af-698bf68ef0ef-9.js (sourcemap at _error.js.map, debug id c9768282-dc62-48c4-b1af-698bf68ef0ef)
    ~/dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a-12.js (sourcemap at webpack-api-runtime.js.map, debug id dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a)
    ~/e55e5078-1a5b-4998-9c4c-bd5d5e6588f8-10.js (sourcemap at calculate.js.map, debug id e55e5078-1a5b-4998-9c4c-bd5d5e6588f8)
    ~/f62e2db7-d47d-4de3-b165-ee640f6791df-11.js (sourcemap at index.js.map, debug id f62e2db7-d47d-4de3-b165-ee640f6791df)
  Source Maps
    ~/09b852f2-09fc-41b1-a8af-c8a3c4a613ef-0.js.map (debug id 09b852f2-09fc-41b1-a8af-c8a3c4a613ef)
    ~/19dc2d67-8c41-4852-99eb-fe70d770ce08-3.js.map (debug id 19dc2d67-8c41-4852-99eb-fe70d770ce08)
    ~/4b6a4114-122d-4c6e-bb85-13cc1a3748aa-1.js.map (debug id 4b6a4114-122d-4c6e-bb85-13cc1a3748aa)
    ~/5d996ee9-31f8-4add-a0b3-6458e58a8650-2.js.map (debug id 5d996ee9-31f8-4add-a0b3-6458e58a8650)
    ~/66083d84-4d70-436c-96fa-7d43d56c08dd-8.js.map (debug id 66083d84-4d70-436c-96fa-7d43d56c08dd)
    ~/6dcad467-3abc-462b-8351-4ecbcccb62e6-5.js.map (debug id 6dcad467-3abc-462b-8351-4ecbcccb62e6)
    ~/74496756-00a3-4d52-9e45-b53b8660c2ed-4.js.map (debug id 74496756-00a3-4d52-9e45-b53b8660c2ed)
    ~/7f189de2-3b5f-4ad1-8a15-704a32821342-7.js.map (debug id 7f189de2-3b5f-4ad1-8a15-704a32821342)
    ~/888fef21-f8a7-41af-b23c-18d2869d92f8-13.js.map (debug id 888fef21-f8a7-41af-b23c-18d2869d92f8)
    ~/c9768282-dc62-48c4-b1af-698bf68ef0ef-9.js.map (debug id c9768282-dc62-48c4-b1af-698bf68ef0ef)
    ~/dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a-12.js.map (debug id dbb8a1e0-f63a-4007-ae61-c8b3d8971e3a)
    ~/e55e5078-1a5b-4998-9c4c-bd5d5e6588f8-10.js.map (debug id e55e5078-1a5b-4998-9c4c-bd5d5e6588f8)
    ~/f62e2db7-d47d-4de3-b165-ee640f6791df-11.js.map (debug id f62e2db7-d47d-4de3-b165-ee640f6791df)
[@sentry/nextjs - Edge] Info: Successfully uploaded source maps to Sentry
[@sentry/nextjs - Client] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
> Found 10 files
> Analyzing 10 sources
> Analyzing completed in 0.023s
> Adding source map references
> Bundling completed in 0.403s
> Bundled 10 files for upload
> Bundle ID: 3998a195-ab08-5e8a-aeba-f3e951e36991
> Optimizing completed in 0.021s
> Uploading completed in 1.921s
> Uploaded files to Sentry
> Processing completed in 0.222s
> File upload complete (processing pending on server)
> Organization: none-rai
> Project: slrc-frontend
> Release: 0CcTdo-bKTOHas9sjJIzz
> Dist: None
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/5b630deb-0f63-4ff4-a25f-2196fabf4338-1.js (sourcemap at 5b630deb-0f63-4ff4-a25f-2196fabf4338-1.js.map, debug id 5b630deb-0f63-4ff4-a25f-2196fabf4338)
    ~/ac5be51e-bfd5-4cea-8393-d720fbf389ed-0.js (sourcemap at ac5be51e-bfd5-4cea-8393-d720fbf389ed-0.js.map, debug id ac5be51e-bfd5-4cea-8393-d720fbf389ed)
    ~/b67b4b28-5f9d-4ef7-bbce-2c3ea1011862-2.js (sourcemap at b67b4b28-5f9d-4ef7-bbce-2c3ea1011862-2.js.map, debug id b67b4b28-5f9d-4ef7-bbce-2c3ea1011862)
    ~/c234e9a2-e653-478a-b9d8-354fa5a27c46-4.js (sourcemap at c234e9a2-e653-478a-b9d8-354fa5a27c46-4.js.map, debug id c234e9a2-e653-478a-b9d8-354fa5a27c46)
    ~/c652d7a4-5e56-4bac-9191-0e84e66cea41-3.js (sourcemap at c652d7a4-5e56-4bac-9191-0e84e66cea41-3.js.map, debug id c652d7a4-5e56-4bac-9191-0e84e66cea41)
  Source Maps
    ~/5b630deb-0f63-4ff4-a25f-2196fabf4338-1.js.map (debug id 5b630deb-0f63-4ff4-a25f-2196fabf4338)
    ~/ac5be51e-bfd5-4cea-8393-d720fbf389ed-0.js.map (debug id ac5be51e-bfd5-4cea-8393-d720fbf389ed)
    ~/b67b4b28-5f9d-4ef7-bbce-2c3ea1011862-2.js.map (debug id b67b4b28-5f9d-4ef7-bbce-2c3ea1011862)
    ~/c234e9a2-e653-478a-b9d8-354fa5a27c46-4.js.map (debug id c234e9a2-e653-478a-b9d8-354fa5a27c46)
    ~/c652d7a4-5e56-4bac-9191-0e84e66cea41-3.js.map (debug id c652d7a4-5e56-4bac-9191-0e84e66cea41)
[@sentry/nextjs - Client] Info: Successfully uploaded source maps to Sentry

Log from uploading with v7:

> Found 18 release files
> Analyzing 18 sources
> Analyzing completed in 0.049s
> Rewriting sources
> Rewriting completed in 0.015s
> Adding source map references
> Bundling files for upload... 
> Bundling completed in 0.031s
> Optimizing completed in 0s
> Uploading completed in 0.652s
> Uploaded release files to Sentry
> Processing completed in 0.218s
> File upload complete (processing pending on server)
> Organization: none-rai
> Project: slrc-frontend
> Release: aNHFRi-wAf3VQc85C68Xk
> Dist: None

Source Map Upload Report
  Minified Scripts
    ~/_next/server/chunks/695.js (sourcemap at 695.js.map)
    ~/_next/server/chunks/859.js (sourcemap at 859.js.map)
    ~/_next/server/pages/_app.js (sourcemap at _app.js.map)
    ~/_next/server/pages/_document.js (sourcemap at _document.js.map)
    ~/_next/server/pages/_error.js (sourcemap at _error.js.map)
    ~/_next/server/pages/api/calculate.js (sourcemap at calculate.js.map)
    ~/_next/server/pages/index.js (sourcemap at index.js.map)
    ~/_next/server/webpack-api-runtime.js (sourcemap at webpack-api-runtime.js.map)
    ~/_next/server/webpack-runtime.js (sourcemap at webpack-runtime.js.map)
  Source Maps
    ~/_next/server/chunks/695.js.map
    ~/_next/server/chunks/859.js.map
    ~/_next/server/pages/_app.js.map
    ~/_next/server/pages/_document.js.map
    ~/_next/server/pages/_error.js.map
    ~/_next/server/pages/api/calculate.js.map
    ~/_next/server/pages/index.js.map
    ~/_next/server/webpack-api-runtime.js.map
    ~/_next/server/webpack-runtime.js.map
> Found 19 release files
> Analyzing 19 sources
> Analyzing completed in 0.06s
> Rewriting sources
> Rewriting completed in 0.017s
> Adding source map references
> Bundling files for upload... 
> Bundling completed in 0.026s
> Optimizing completed in 0.001s
> Uploading completed in 0.574s
> Uploaded release files to Sentry
> Processing completed in 0.212s
> File upload complete (processing pending on server)
> Organization: none-rai
> Project: slrc-frontend
> Release: aNHFRi-wAf3VQc85C68Xk
> Dist: None

Source Map Upload Report
  Scripts
    ~/_next/server/interception-route-rewrite-manifest.js
  Minified Scripts
    ~/_next/server/chunks/695.js (sourcemap at 695.js.map)
    ~/_next/server/chunks/859.js (sourcemap at 859.js.map)
    ~/_next/server/pages/_app.js (sourcemap at _app.js.map)
    ~/_next/server/pages/_document.js (sourcemap at _document.js.map)
    ~/_next/server/pages/_error.js (sourcemap at _error.js.map)
    ~/_next/server/pages/api/calculate.js (sourcemap at calculate.js.map)
    ~/_next/server/pages/index.js (sourcemap at index.js.map)
    ~/_next/server/webpack-api-runtime.js (sourcemap at webpack-api-runtime.js.map)
    ~/_next/server/webpack-runtime.js (sourcemap at webpack-runtime.js.map)
  Source Maps
    ~/_next/server/chunks/695.js.map
    ~/_next/server/chunks/859.js.map
    ~/_next/server/pages/_app.js.map
    ~/_next/server/pages/_document.js.map
    ~/_next/server/pages/_error.js.map
    ~/_next/server/pages/api/calculate.js.map
    ~/_next/server/pages/index.js.map
    ~/_next/server/webpack-api-runtime.js.map
    ~/_next/server/webpack-runtime.js.map
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
> Found 10 release files
> Analyzing 10 sources
> Analyzing completed in 0.156s
> Rewriting sources
> Rewriting completed in 0.206s
> Adding source map references
> Bundling files for upload... ~/_next/static/chunks/555-d441d4fd54bfbe83.js.map
> Bundling completed in 0.265s
> Optimizing completed in 0.007s
> Uploading completed in 1.509s
> Uploaded release files to Sentry
> Processing completed in 0.213s
> File upload complete (processing pending on server)
> Organization: none-rai
> Project: slrc-frontend
> Release: aNHFRi-wAf3VQc85C68Xk
> Dist: None

Source Map Upload Report
  Minified Scripts
    ~/_next/static/chunks/555-d441d4fd54bfbe83.js (sourcemap at 555-d441d4fd54bfbe83.js.map)
    ~/_next/static/chunks/ee8b1517-38715023ed554fd5.js (sourcemap at ee8b1517-38715023ed554fd5.js.map)
    ~/_next/static/chunks/pages/_app-a84bd910364512a7.js (sourcemap at _app-a84bd910364512a7.js.map)
    ~/_next/static/chunks/pages/_error-6b0cfb20a895dd44.js (sourcemap at _error-6b0cfb20a895dd44.js.map)
    ~/_next/static/chunks/pages/index-6f18da4c0cd07658.js (sourcemap at index-6f18da4c0cd07658.js.map)
  Source Maps
    ~/_next/static/chunks/555-d441d4fd54bfbe83.js.map
    ~/_next/static/chunks/ee8b1517-38715023ed554fd5.js.map
    ~/_next/static/chunks/pages/_app-a84bd910364512a7.js.map
    ~/_next/static/chunks/pages/_error-6b0cfb20a895dd44.js.map
    ~/_next/static/chunks/pages/index-6f18da4c0cd07658.js.map

I'm having the same issue in a work related project too so very keen to help get this resolved.

@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Aug 18, 2024
@Lms24
Copy link
Member

Lms24 commented Aug 19, 2024

Hey @benscobie thanks for writing in!

We'll look into your issue Next week as this week is Hackweek at Sentry (see #13421).

@lforst
Copy link
Member

lforst commented Aug 26, 2024

Hi, could you resolve the problem? It looks like new issues are more or less properly source-mapped via Debug IDs. My best guess is that there was a bit of a race condition when unminifying the event.

@benscobie
Copy link
Author

benscobie commented Aug 26, 2024

Hi, could you resolve the problem? It looks like new issues are more or less properly source-mapped via Debug IDs. My best guess is that there was a bit of a race condition when unminifying the event.

No it's unresolved, a new event came in today with the same issue: https://none-rai.sentry.io/issues/5758279792/?alert_rule_id=15089045&alert_timestamp=1724675822245&alert_type=email&environment=production&notification_uuid=f1220281-d10a-486f-ae7c-2f9bc1e07e2c&project=4506994036703232

To be clear I've yet to see any successfully unminified third party code in V8 whereas it always worked in v7.

@lforst
Copy link
Member

lforst commented Aug 26, 2024

I think the problem is that the page throws at the JS parsing stage. In order to unminify errors via debug IDs, the file needs to be parsed and executed (at least the first statement/debug ID snippet). I guess this is a shortcoming of debug IDs.

@benscobie
Copy link
Author

I think the problem is that the page throws at the JS parsing stage. In order to unminify errors via debug IDs, the file needs to be parsed and executed (at least the first statement/debug ID snippet). I guess this is a shortcoming of debug IDs.

That makes sense, though in my case it's also failing the old way (releases) due to a mismatch in the stack frame path which I've detailed in the OP. This seems to have changed since v7 as well.

@hansede
Copy link

hansede commented Aug 26, 2024

I'm seeing the same issue. My sourcemaps fail to unminify for server-side code (client-side sourcemaps work fine), and they fail to unminify even when I call captureException from code that is executed well after the debug ID has been parsed and executed.

I too see the "Stack frame doesn't have Debug IDs" message in Sentry even though I can see debug IDs being generated (e.g. ~/273c0a8e-852d-4fa7-a425-281e5df8b8c7-6.js.map (debug id 273c0a8e-852d-4fa7-a425-281e5df8b8c7)) and debug ID code being executed in each of my source files. My sourcemaps have all been uploaded and linked to issues via release IDs.

I'm using @sentry/nextjs 8.9.1 and next 14.2.6

EDIT: For my particular issue, the problem turned out to be that I was still using ts-node for prod builds, which was not generating debug IDs in traces. I switched to Node for prod builds, which I was meaning to do anyway, and it fixed the problem.

@lforst
Copy link
Member

lforst commented Aug 27, 2024

@hansede that seems like a separate problem. Would you mind opening a new issue with details on your setup? Thanks!

@benscobie
Copy link
Author

@lforst Do you need anything more from me to investigate?

@lforst
Copy link
Member

lforst commented Sep 2, 2024

@benscobie Unfortunately, I don't think there is anything we can do here. In theory it might even be beneficial for you to be pointed to the location inside the minified code because your minified code is the one that is causing a syntax error. <- I see that this is a bit subjective though and intransparent.

The only action item I see right now is to update the docs to explain this.

If you want debug IDs to be able to detect syntax errors check out the TC39 proposal and get involved :) https://github.com/tc39/source-map/blob/main/proposals/debug-id.md

@lforst lforst added Feature: Source Maps and removed Package: nextjs Issues related to the Sentry Nextjs SDK labels Sep 2, 2024
@ben-propflo
Copy link

ben-propflo commented Sep 2, 2024

@benscobie Unfortunately, I don't think there is anything we can do here. In theory it might even be beneficial for you to be pointed to the location inside the minified code because your minified code is the one that is causing a syntax error. <- I see that this is a bit subjective though and intransparent.

The only action item I see right now is to update the docs to explain this.

If you want debug IDs to be able to detect syntax errors check out the TC39 proposal and get involved :) https://github.com/tc39/source-map/blob/main/proposals/debug-id.md

Putting the debug ID issue aside completely, is there not a regression with the stack frame path generation here as the file is correctly identified in v7, but not in v8? Without knowing the original unbundled path I have no idea which library in the generated chunk is causing the error.

v7:
Image

v8:
Image

Image

@lforst
Copy link
Member

lforst commented Sep 2, 2024

I think it is reasonable to say it is a regression, however, we don't have a fix right now and I think it will be a while before we have one. 😕

We will likely also not increase the priority on fixing this right now, as in the world of errors, linters, and transpilers, SyntaxErrors have become a very very very small subset of errors generated. We're happy to re-evaluate if we receive reports of many more people running into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

5 participants