Title: Sourcemaps and events with debug ids are not matching · Issue #14247 · getsentry/sentry-javascript · GitHub
Open Graph Title: Sourcemaps and events with debug ids are not matching · Issue #14247 · getsentry/sentry-javascript
X Title: Sourcemaps and events with debug ids are not matching · Issue #14247 · getsentry/sentry-javascript
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/...
Open Graph 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 th...
X 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 th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/14247
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sourcemaps and events with debug ids are not matching","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/nuxt\n\n### SDK Version\n\n8.37.1\n\n### Framework Version\n\nNuxt 3.14.159\n\n### Link to Sentry event\n\nhttps://leadsbridge.sentry.io/share/issue/ff633cd9ac384faf9b54fa7832ab5e8b/\n\n### Reproduction Example/SDK Setup\n\n```typescript\n// sentry.client.config.ts\n\nimport * as Sentry from '@sentry/nuxt'\nconst config = useRuntimeConfig()\n\nSentry.init({\n enabled: !import.meta.dev,\n\n dsn: config.public.sentryDsn,\n environment: config.public.sentryEnvironment,\n tracesSampleRate: 0.2,\n\n integrations: [\n Sentry.piniaIntegration(usePinia())\n ],\n\n normalizeDepth: 10,\n\n trackComponents: true,\n\n replaysSessionSampleRate: 0,\n replaysOnErrorSampleRate: 0.5\n})\n\n```\n\n```typescript\n// nuxt.config.ts (minimal)\n\nexport default defineNuxtConfig({\n future: {\n compatibilityVersion: 4,\n },\n\n modules: [\n '@sentry/nuxt/module',\n ...\n ],\n\n srcDir: 'app',\n\n runtimeConfig: {\n sentryAuthToken: process.env.SENTRY_AUTH_TOKEN,\n public: {\n sentryDsn: process.env.SENTRY_DSN || '',\n sentryEnvironment: process.env.SENTRY_ENVIRONMENT || ''\n }\n },\n\n // server side rendering mode\n ssr: false,\n\n // https://nuxt.com/docs/getting-started/configuration#environment-overrides\n $production: { \n nitro: {\n sourceMap: true,\n rollupConfig: {\n output: {\n sourcemap: true\n }\n },\n\n awsAmplify: { // https://nitro.build/deploy/providers/aws-amplify\n // catchAllStaticFallback: true,\n // imageOptimization: { \"/_image\", cacheControl: \"public, max-age=3600, immutable\" },\n // imageSettings: { ... },\n }\n },\n\n sourcemap: {\n client: true,\n server: true\n },\n\n /** @type {import('@sentry/nuxt/module').ModuleOptions} */\n sentry: {\n debug: true,\n sourceMapsUploadOptions: {\n enabled: process.env.NODE_ENV === 'production',\n org: 'example-org',\n project: 'example-project',\n authToken: process.env.SENTRY_AUTH_TOKEN,\n sourcemaps: {\n filesToDeleteAfterUpload: ['.*/**/*.map']\n }\n }\n },\n\n vite: {\n build: {\n sourcemap: true\n },\n esbuild: {\n charset: 'ascii'\n }\n },\n },\n})\n\n```\n\n### Steps to Reproduce\n\nWe installed the latest version of `@sentry/nuxt` (version **8.37.1**) in our Nuxt project, which is also updated to the latest version (**3.14.159**). We use nuxt in full SPA mode, as we have the `ssr` option switched off.\n\nWe added the required configuration in the `nuxt.config.ts` file to enable sourcemap uploads and created the `sentry.client.config.ts` file.\n\nTo deploy our application, we use **AWS Amplify** - in particular, we use the Nitro preset for this provider: https://nitro.build/deploy/providers/aws-amplify . It works similarly to other platforms, with the particularity that the dist directory is called `.amplify-hosting`.\n\nOur `amplify.yml` file is very simple, and it's the same one as described in the official docs. The only difference is that we use Yarn:\n```yaml\nversion: 1\nfrontend:\n phases:\n preBuild:\n commands:\n - nvm use 18 && node --version\n - corepack enable && npx --yes nypm install\n build:\n commands:\n - yarn build\n artifacts:\n baseDirectory: .amplify-hosting\n files:\n - \"**/*\"\n```\n\nIn the Amplify logs, we can see that the build process was successful and that the source maps were uploaded to Sentry.\n\n\n\nIn Sentry, under **Settings > Organization > Project > Source Maps**, the source maps are listed correctly.\n\n\n\n\n### Expected Result\n\nWhen an error occurs, we expect Sentry to display the original, unminified source code with the correct line numbers, leveraging the uploaded source maps.\n\nIn Issue #13997 there is a similar problem, which was resolved recently by PR #14020.\nAlso, Issue #14029 discusses the compatibility of the Sentry Nuxt SDK with various deployment platforms. \n\nSince I saw both an active and recent development on this subject, I thought opening a new issue might be relevant, especially since we use AWS Amplify. Please let me know if I missed anything important, and thanks for the amazing work 🙏 \n\n### Actual Result\n\nThe error is shown in Sentry, but the code remains minified:\n\n\n\n When we click on **Unminify Code**, it appears that a matching Debug ID is found correctly:\n\n\n","author":{"url":"https://github.com/oddouu","@type":"Person","name":"oddouu"},"datePublished":"2024-11-12T18:50:38Z","url":"https://github.com/getsentry/sentry-javascript/issues/14247"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:39cdb1ae-c15e-766b-16f9-4e291abecf6e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C8C:3C5464:6FC1BC:979FC1:6B04CD86 |
| html-safe-nonce | 6ed41c5bed25ea3d81568ec9e79fbaf750c339f1f6a649155e9889c93fa20ea3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzhDOjNDNTQ2NDo2RkMxQkM6OTc5RkMxOjZCMDRDRDg2IiwidmlzaXRvcl9pZCI6IjYwOTE3ODQxODc2ODAxODE2MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a7400b1bfcff6548a8f73ca109ce367f05fccbf9a293dc66013628926539568a |
| hovercard-subject-tag | issue:2653043542 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/14247/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b6365727d62166c35ed561319f4af6ae3507fbc7f91058a9288a923f5a106cd/getsentry/sentry-javascript/issues/14247 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b6365727d62166c35ed561319f4af6ae3507fbc7f91058a9288a923f5a106cd/getsentry/sentry-javascript/issues/14247 |
| og:image:alt | 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 th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | oddouu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27ed421e5c2dac040a37529b5b9191edcc4a3de70521471e81fb4b4d9dc2aa7d |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63dc19014c621c67306d7899c04c78dcd0d95803 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width