-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source map getting uploaded on sentry but not applying to errors #8772
Comments
@lforst please guide me |
You're doing a lot of custom things that are extremely error-prone. Please follow the guide here or even better, delete your custom logic and run the wizard:
If that doesn't work, feel free to write again. Note that we can more quickly help you out if you properly format your issue and explain why you're doing stuff the way you're doing it. As for:
We'd appreciate it if people don't write comments like these. We already get notifications for every new issue. No need to ping individuals. |
@NestlyS Did you already go through https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js/? |
@lforst , yes, i did. I've got some logs, so here are the screenshots: The result of using the sentry-cli function:
Yeap, they are uploaded in artifact bundles: But there is nothing in release bundles:
The remaining problems absolutely are not suitable for my case. However all of problems are related to errors in loading artifacts, but not with the problem when Sentry is unable to actually connect artifact bundles with the release. |
@NestlyS Do the events in sentry have a Also, are you on self-hosted or SaaS? If you are on saas can you share a link to the event? Thanks! |
@lforst , nope, I don't have any I noticed that I have an old version of the SDK. I will try to update it. And I have an self-hosted version of Sentry. UPD After updating the SDK I finally found debug_meta.
|
@NestlyS cool that you figured out that you had to upgrade your SDK. When you build your app and upload the resulting build artifacts (that contain the debug IDs) to Sentry, you should now see source maps! |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Sorry for being silent. I finally solved my problem: it was on self-hosted sentry side so the Sentry application couldn't find the source maps for a specific release. Sentry version update and npm packages update both helped. Thank you! |
@NestlyS , Could you please elaborate what are the npm packages need to be updated? |
@Hariprakash010501 likely all the packages starting with |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
7.61.0
Framework Version
next 11.1.3
Link to Sentry event
https://...-ai-3o.sentry.io/issues/4383028081/?project=4505550350516224&query=is%3Aunresolved&referrer=issue-stream&stream_index=2
SDK Setup
in app.js i am doing this
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
integrations: [
new BrowserTracing()
],
tracesSampleRate: 0.2,
});
In sentry.client.config.js
import * as Sentry from "@sentry/nextjs";
import { ContextLines } from "@sentry/integrations";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
tracesSampleRate: 0.2,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 0.1,
release: process.env.NEXT_PUBLIC_SENTRY_PROJECT_NAME,
integrations: [
new Sentry.Replay(),
new ContextLines({
frameContextLines: 7,
}),
],
});
In next.config.js
const { withSentryConfig } = require("@sentry/nextjs");
const nextConfig = {
.. nextjs configurations
productionBrowserSourceMaps: true,
};
const sentryWebpackPluginOptions = {
org: process.env.NEXT_PUBLIC_SENTRY_ORG_NAME,
project: process.env.NEXT_PUBLIC_SENTRY_PROJECT_NAME,
authToken: process.env.NEXT_PUBLIC_SENTRY_AUTH_TOKEN,
// silent: true,
};
const sentryOptions = {
widenClientFileUpload: true,
transpileClientSDK: true,
disableLogger: true,
disableServerWebpackPlugin: true,
disableClientWebpackPlugin: true,
};
module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions, sentryOptions);
sentrysourcemap.js
const SentryCli = require('@sentry/cli');
async function uploadSourcemapsAndRelease() {
const release = "...-error-tracking";
if (!release) {
return;
}
const cli = new SentryCli();
try {
console.log('Creating sentry release ' + release);
// creates a new release, in our case its 1.3
await cli.releases.new(release);
} catch (e) {
console.error('uploading failed:', e);
}
}
uploadSourcemapsAndRelease();
I am running sentrysourcemap.js file after build so that sourcemap will get uploaded after build process of next.js willl completed.
also i added .sentryclirc file and added
[defaults]
project=project name
org=org name
[auth]
token=auth token
So by this code souce map getting uploaded in sentry but they are not getting tracked properly and giving error as "We've encountered 1 problem un-minifying your applications source code!
Source Maps not uploaded
Read Guide
It looks like you're creating, but not uploading your source maps. Read our docs for troubleshooting help."
Steps to Reproduce
I added sentry browsertracing in app.js so after getting error event is getting trigered but not showing proper starce on sentry dashboard, i added images of sourcemap getting uploaded and error showing
Expected Result
stack starce should be shown with proper js path and code
Actual Result
stack strace not showing giving error as sourcemap not detected
The text was updated successfully, but these errors were encountered: