You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently not sure if this is a bug or a feature, but I guess that this is more likely a feature.
Problem
When a JavaScript bundle is built through multiple build tools (each generating their own sourcemaps), Symbolicator currently cannot follow the full sourcemap chain when Debug IDs are present in intermediate artifacts. In this case this is mandatory for running frameworks on Cloudflare, as there is the first build step for the framework itself, and then another one for Cloudflare Workers (that is bundling again, but everything into 1 file).
Since the Cloudflare usage is increasing quite heavily, and Cloudflare itself is also pushing to move frameworks to their platform, it would make sense to support this.
Current Behavior
Pipeline of the reproduction repo
flowchart LR
subgraph Original["Original Source"]
A["server/api/error.ts"]
end
subgraph Nuxt["Nuxt Build"]
B[".output/server/chunks/*"]
B1["+ debug ID #1"]
B2["+ sourcemap → original"]
end
subgraph Cloudflare["Wrangler Build"]
C["dist/index.js"]
C1["+ debug ID #2"]
C2["+ sourcemap → .output files"]
end
A --> B
B --> C
Loading
Upload Nuxt and Cloudflare sourcemaps
When sourcemaps of both builds are uploaded to Sentry then the original source code is not shown and it looks like this:
When only the final (Cloudflare) sourcemap is uploaded (assuming that the first bundle never got injected with debug ids) then the Cloudflare errors are shown correctly, but the SSR issues won't render correctly, as the sourcemaps are missing:
(original issue: getsentry/sentry-javascript#20051)
I'm currently not sure if this is a bug or a feature, but I guess that this is more likely a feature.
Problem
When a JavaScript bundle is built through multiple build tools (each generating their own sourcemaps), Symbolicator currently cannot follow the full sourcemap chain when Debug IDs are present in intermediate artifacts. In this case this is mandatory for running frameworks on Cloudflare, as there is the first build step for the framework itself, and then another one for Cloudflare Workers (that is bundling again, but everything into 1 file).
Since the Cloudflare usage is increasing quite heavily, and Cloudflare itself is also pushing to move frameworks to their platform, it would make sense to support this.
Current Behavior
Pipeline of the reproduction repo
flowchart LR subgraph Original["Original Source"] A["server/api/error.ts"] end subgraph Nuxt["Nuxt Build"] B[".output/server/chunks/*"] B1["+ debug ID #1"] B2["+ sourcemap → original"] end subgraph Cloudflare["Wrangler Build"] C["dist/index.js"] C1["+ debug ID #2"] C2["+ sourcemap → .output files"] end A --> B B --> CUpload Nuxt and Cloudflare sourcemaps
When sourcemaps of both builds are uploaded to Sentry then the original source code is not shown and it looks like this:
Comparable errors
Upload only Cloudflare sourcemaps
When only the final (Cloudflare) sourcemap is uploaded (assuming that the first bundle never got injected with debug ids) then the Cloudflare errors are shown correctly, but the SSR issues won't render correctly, as the sourcemaps are missing:
Comparable errors
Expected Behavior
The actual source code should be visible on errors when the sourcemaps of both builds are uploaded.
Reproduction
The current reproduction of this behavior done by following the guide in the following repo: https://github.com/JPeer264/temp-symbolicator-nuxt-wrangler
Example Sentry issues:
dist/index.js:13425:14server/api/error.ts:2:1