Facing issue while upgrading the version for "@sentry/browser": "^5.26.0" to "^7.12.0" #8605
Unanswered
sshekhar89
asked this question in
Q&A
Replies: 1 comment
-
Hey @sshekhar89, can you make sure that all your sentry dependencies are using the last version? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to upgrade the "@sentry/browser": "^5.26.0" to "^7.12.0".
Before:
`
import * as Sentry from '@sentry/browser';
import { GlobalHandlers } from '@sentry/browser/esm/integrations';
import { ExtraErrorData } from '@sentry/integrations';
import { BrowserTracing } from '@sentry/tracing/esm/browser';
/**
*/
export function initializeAndConfigureSentry(dsn = process.env.REACT_APP_SENTRY_ALERTS, ignoreErrors = []) {
// Don't initialize the sentry for dev environment
if (process.env.NODE_ENV === 'local' || process.env.NODE_ENV === 'development') {
return;
}
Sentry.init({
dsn: dsn,
environment: process.env.REACT_APP_ANALYTICS_ENV,
ignoreErrors: ignoreErrors,
integrations: [
new ExtraErrorData(),
new GlobalHandlers({
onerror: false,
onunhandledrejection: false,
}),
new BrowserTracing(),
],
});
}
**After:**
import * as Sentry from '@sentry/browser';
import { ExtraErrorData } from '@sentry/integrations';
/**
*/
export function initializeAndConfigureSentry(dsn = process.env.REACT_APP_SENTRY_ALERTS, ignoreErrors = []) {
// Don't initialize the sentry for dev environment
if (process.env.NODE_ENV === 'local' || process.env.NODE_ENV === 'development') {
return;
}
Sentry.init({
dsn: dsn,
environment: process.env.REACT_APP_ANALYTICS_ENV,
ignoreErrors: ignoreErrors,
integrations: [
new ExtraErrorData(),
new Sentry.GlobalHandlers({
onerror: false,
onunhandledrejection: false,
}),
new Sentry.BrowserTracing(),
],
});
}
`
Getting the following error:
Sentry Logger [log]: [Tracing] Transaction: internal_error -> Global error occured ****.9ef24ee0.js:1 Uncaught TypeError: y.setPropagationContext is not a function at e.value (****.9ef24ee0.js:1:2355058) at ****.9ef24ee0.js:1:2353130 at routingInstrumentation (****.9ef24ee0.js:1:2350220) at e.value (****.9ef24ee0.js:1:2353108) at k (****.9ef24ee0.js:1:2206435) at ***.9ef24ee0.js:1:2242598 at Array.forEach (<anonymous>) at ****.9ef24ee0.js:1:2242575 at a.value (****.9ef24ee0.js:1:2242609) at f.bindClient (hub.ts:123:14) at ****.9ef24ee0.js:1:2297246 at lo (****.9ef24ee0.js:1:2297260) at Object.ji (****.9ef24ee0.js:1:2359744) at Module.<anonymous> (****.9ef24ee0.js:1:5694726) at r (****.9ef24ee0.js:1:110) at ****.9ef24ee0.js:1:950 at ****.9ef24ee0.js:1:962
It is not able to install the BrowserTracing..
Any help would be highly appreciated !
Beta Was this translation helpful? Give feedback.
All reactions