Title: Problem with Server Sourcemaps in SvelteKit · Issue #8218 · getsentry/sentry-javascript · GitHub
Open Graph Title: Problem with Server Sourcemaps in SvelteKit · Issue #8218 · getsentry/sentry-javascript
X Title: Problem with Server Sourcemaps in SvelteKit · Issue #8218 · 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/8218
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Problem with Server Sourcemaps in SvelteKit","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/sveltekit\n\n### SDK Version\n\n7.53.1\n\n### Framework Version\n\n1.18.0\n\n### Link to Sentry event\n\nhttps://eintrittskartenio.sentry.io/issues/4208536907/?environment=development&project=1422627&query=is%3Aunresolved&referrer=issue-stream&stream_index=0\n\n### SDK Setup\n\n```js\r\nSentry.init({\r\n dsn: config.SENTRY,\r\n tracesSampleRate: 0.05,\r\n environment: 'development',\r\n release: 'c52cb50081964beca7ba61bcd8c113d7',\r\n})\r\n```\n\n### Steps to Reproduce\n\n1. I ran `npx @sentry/wizard@latest -i sveltekit` to automatically add Sentry to my SvelteKit Application\r\n2. I manually put `build: { sourcemaps: true }` in my vite.config.js, because I want sourcemaps for the server\r\n3. I built my app (`vite build`), started it (`node ./build`) and triggered an error locally\r\n4. I noticed that Sentry stopped showing any code at all in the traces:\r\n\r\n\r\n\r\n5. I dug as deep as I could and noticed that the relative paths in the sourcemaps are slightly wrong. They go one level too far up. For example, it would show `../../../../src/routes/+page.svelte`, but relative to `build/server/chunks`, this is outside of my project folder. So I checked where these paths get set, and ended up creating this bug report in the SvelteKit repo: https://github.com/sveltejs/kit/issues/10040\r\n6. I worked around the bug locally, but I also noticed that the directories of the files are now omitted (instead it prepends `app://`), showing only the filename. In a typical SvelteKit app, many many files are called `+page` or `+layout`, so this is less than ideal. :D\n\n### Expected Result\n\nThe full path to the file should be shown.\n\n### Actual Result\n\n\r\n\r\nPreviously, when I didn't use sourcemaps, it showed the whole filepath:\r\n\r\n\u003cimg width=\"570\" alt=\"Screenshot 2023-05-26 00 43 48@2x\" src=\"https://github.com/getsentry/sentry-javascript/assets/2098462/de9efc90-8f3f-42e8-a280-88db5c5a4af5\">\r\n","author":{"url":"https://github.com/danieldiekmeier","@type":"Person","name":"danieldiekmeier"},"datePublished":"2023-05-25T22:45:27Z","url":"https://github.com/getsentry/sentry-javascript/issues/8218"}
| 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:5197101b-0190-2192-6647-44ecae40ae86 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80E2:2F022B:6BBC0E:9662E4:6B044C21 |
| html-safe-nonce | c6bb3ab182f5ca83e2efd41ca50e34856187715f852454ea666e0aab9e79ba9b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEUyOjJGMDIyQjo2QkJDMEU6OTY2MkU0OjZCMDQ0QzIxIiwidmlzaXRvcl9pZCI6IjQzMjAzMzAzNTA5ODg2NDMzNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 726e7f0a84b250f90c8828a3864e7aca289e82bf6f3d12a1d6ef93aa629ba722 |
| hovercard-subject-tag | issue:1726577424 |
| 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/8218/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5580ae40c784c598c49f7417ae47706491067419cc3d1f386711e42cf777f78b/getsentry/sentry-javascript/issues/8218 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5580ae40c784c598c49f7417ae47706491067419cc3d1f386711e42cf777f78b/getsentry/sentry-javascript/issues/8218 |
| 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 | danieldiekmeier |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| 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 | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| 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