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
But when there is a server error, the frame path does not match anything Sentry knows:
For instance, my source file is src/pages/dashboard/test/index.tsx, which gets transpiled to .next/server/pages/dashboard/test.js. Yet, if there is an exception (server side), I see that Sentry does not find the source:
❯ sentry-cli sourcemaps explain a1f3aa52e9974fbd965af5721e35dc5d
✔ Fetched data for event: a1f3aa52e9974fbd965af5721e35dc5d
✔ Event has release name: S3lQP8VcjBwu7RhoY0CJj
✔ Event has a valid exception present
✔ Event has a valid stacktrace present
✖ Uploaded artifacts do not include entry: ~/_next/server/pages/dashboard/webpack:/package-name/src/pages/dashboard/test/index.tsx
However source maps are properly uploaded to Sentry:
I cannot really make sense of the stack trace filename in two parts, and I am not sure where to dig next. I have tried to use the RewriteFrame integration to override the prefix (with ~/next/server) but it does not work, as the directory structure seems to disappear (notice that src/pages/dashboard/test is gone):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I have a Next.js + Typescript + Webpack Obfuscator project and I am trying to get the source displayed in Sentry when there is an error.
I have configured TS (tsconfig.json) to create source maps:
I have configured WebpackObfuscator to output the source maps:
I also added
productionBrowserSourceMaps: true,
to Next configuration in next.config.js and that's how I configured Sentry:But when there is a server error, the frame path does not match anything Sentry knows:
For instance, my source file is
src/pages/dashboard/test/index.tsx
, which gets transpiled to.next/server/pages/dashboard/test.js
. Yet, if there is an exception (server side), I see that Sentry does not find the source:However source maps are properly uploaded to Sentry:
I cannot really make sense of the stack trace filename in two parts, and I am not sure where to dig next. I have tried to use the RewriteFrame integration to override the prefix (with
~/next/server
) but it does not work, as the directory structure seems to disappear (notice thatsrc/pages/dashboard/test
is gone):Any clue would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions