-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[NUXT / CLOUDFLARE] index.js fail symbolication with js_invalid_sourcemap_location #20051
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nuxt
SDK Version
@sentry/nuxt@10.46.0 (Runtime SDK from event: sentry.javascript.cloudflare@10.46.0)
Framework Version
nuxt@4.4.2 (nitro 2.13.1, vite 7.3.1)
Link to Sentry event
Reproduction Example/SDK Setup
You can find the repo we are working from at https://github.com/onderwijsin/regional-site-menu
On this branch we tried a post deploy upload of the final build output.
// sentry.client.config.ts
import * as Sentry from '@sentry/nuxt'
const runtimeConfig = useRuntimeConfig()
Sentry.init({
dsn: runtimeConfig.public.sentry?.dsn,
release: runtimeConfig.public.sentry?.release,
environment: runtimeConfig.public.sentry?.environment,
debug: runtimeConfig.public.mode.isDebug,
sampleRate: 1.0,
sendDefaultPii: true,
enhanceFetchErrorMessages: 'report-only',
integrations: [
Sentry.replayIntegration(),
Sentry.zodErrorsIntegration(),
Sentry.httpClientIntegration()
],
tracesSampleRate: 1.0,
replaysSessionSampleRate: 0.2,
replaysOnErrorSampleRate: 1.0
})// server/plugins/sentry-cloudflare-plugin.ts
import * as Sentry from '@sentry/nuxt'
import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins'
export default defineNitroPlugin(
sentryCloudflareNitroPlugin(() => {
const runtimeConfig = useRuntimeConfig()
return {
dsn: runtimeConfig.public.sentry?.dsn,
release: runtimeConfig.public.sentry?.release,
environment: runtimeConfig.public.sentry?.environment,
debug: runtimeConfig.public.mode.isDebug,
sampleRate: 1.0,
tracesSampleRate: 1.0,
integrations: [Sentry.zodErrorsIntegration()]
}
})
)Nuxt config relevant bits:
modules: ['@sentry/nuxt/module']sourcemap: { client: 'hidden' }sentry.sourcemaps.disable = process.env.SENTRY_UPLOAD_SOURCE_MAPS !== 'true'
Steps to Reproduce
- Configure Nuxt + Cloudflare per docs (@sentry/nuxt/module + sentryCloudflareNitroPlugin).
- Build and deploy to Cloudflare Workers preview (nitro.preset=cloudflare_module).
- Trigger a server error via a test route (GET /api/_sentry/test).
- Open event JSON in Sentry.
Expected Result
Server-side stack traces are symbolicated with source context (like client-side), no sourcemap-location errors.
Actual Result
Server-side event remains unsymbolicated with:
abs_path: "/index.js"errors[].type = "js_invalid_sourcemap_location"symbolicator_type = "invalid_location"
Latest event JSON shows:
debug_meta.images[0].code_file = "/index.js"debug_meta.images[0].debug_id = "7291620e-42c4-4937-a5a9-da6200edff2f"
Additional Context
From CI logs for the same release (8e4b06b51f0d5342381499ad722c66aa4ac91a33):
- Sentry Nuxt build-time uploads include chunk artifact with debug ID:
7291620e-42c4-4937-a5a9-da6200edff2f->test.get.mjs.map
- Final Wrangler bundle upload (custom step) includes:
~/index.js (sourcemap at index.js.map, debug id a6c0872b-5194-5c5c-b067-5bf082cdc965)
So runtime frames are /index.js, but event debug ID still points to a pre-Wrangler chunk debug ID, and symbolication fails with js_invalid_sourcemap_location.
Questions:
- For Nuxt Cloudflare (
cloudflare_module), should@sentry/nuxtsupport final Worker bundle sourcemaps out-of-the-box? - Is
/index.jsexpected to be valid for symbolication in this setup, or is additional path normalization required? - What is the recommended official CI flow to ensure deployed Worker code and uploaded sourcemaps/debug IDs are guaranteed to match?
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Fields
Give feedbackProjects
Status