admin管理员组文章数量:1387459
Trying to deploy a nextjs website with Sentry monitoring on hostinger. Sentry works when running locally, and the site doesnt crash, but it errors out and crashes when deployed on hostinger: console error screenshot
512-fd82f752a414c660.js:525 TypeError: Cannot read properties of undefined (reading 'sentry')
at 164.1b37e5fe1265aae3.js:1:21471
at Array.reduce (<anonymous>)
at q (164.1b37e5fe1265aae3.js:1:21456)
at n (164.1b37e5fe1265aae3.js:1:34922)
at 164.1b37e5fe1265aae3.js:17:64552
at oO (164.1b37e5fe1265aae3.js:17:67668)
at oA (164.1b37e5fe1265aae3.js:17:63598)
at 164.1b37e5fe1265aae3.js:17:63405
at oP (164.1b37e5fe1265aae3.js:17:63412)
at ov (164.1b37e5fe1265aae3.js:17:60278)
at og (164.1b37e5fe1265aae3.js:17:58850)
at S (164.1b37e5fe1265aae3.js:25:1364)
at MessagePort.T (164.1b37e5fe1265aae3.js:25:1894)
nowhere in my code is .sentry
called on any object. This is what my sentry.client.config.ts looks like
Sentry.init({
dsn: "https://c14ecceb9e4b2cb37fcf625c50cb91db@o4508458061332480.ingest.us.sentry.io/4508458063233024",
integrations: [
Sentry.replayIntegration(),
Sentry.feedbackIntegration({
// Additional SDK configuration goes in here, for example:
colorScheme: "dark",
}),
],
production, or use tracesSampler for greater control.
tracesSampleRate: 1,
while
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
debug: false,
});
screenshot for at 164.1b37e5fe1265aae3.js:1:21471
in dev tools sources
Trying to deploy a nextjs website with Sentry monitoring on hostinger. Sentry works when running locally, and the site doesnt crash, but it errors out and crashes when deployed on hostinger: console error screenshot
512-fd82f752a414c660.js:525 TypeError: Cannot read properties of undefined (reading 'sentry')
at 164.1b37e5fe1265aae3.js:1:21471
at Array.reduce (<anonymous>)
at q (164.1b37e5fe1265aae3.js:1:21456)
at n (164.1b37e5fe1265aae3.js:1:34922)
at 164.1b37e5fe1265aae3.js:17:64552
at oO (164.1b37e5fe1265aae3.js:17:67668)
at oA (164.1b37e5fe1265aae3.js:17:63598)
at 164.1b37e5fe1265aae3.js:17:63405
at oP (164.1b37e5fe1265aae3.js:17:63412)
at ov (164.1b37e5fe1265aae3.js:17:60278)
at og (164.1b37e5fe1265aae3.js:17:58850)
at S (164.1b37e5fe1265aae3.js:25:1364)
at MessagePort.T (164.1b37e5fe1265aae3.js:25:1894)
nowhere in my code is .sentry
called on any object. This is what my sentry.client.config.ts looks like
Sentry.init({
dsn: "https://c14ecceb9e4b2cb37fcf625c50cb91db@o4508458061332480.ingest.us.sentry.io/4508458063233024",
integrations: [
Sentry.replayIntegration(),
Sentry.feedbackIntegration({
// Additional SDK configuration goes in here, for example:
colorScheme: "dark",
}),
],
production, or use tracesSampler for greater control.
tracesSampleRate: 1,
while
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
debug: false,
});
screenshot for at 164.1b37e5fe1265aae3.js:1:21471
in dev tools sources
1 Answer
Reset to default 0This is potentially caused by the reactComponentAnnotation
option of the Sentry SDK in your next.config.js
. It appends properties to components and if the properties are iterated either by a library or your own code it may sometimes lead to errors.
本文标签:
版权声明:本文标题:TypeError: Cannot read properties of undefined (reading 'sentry') for Next.js site with Sentry - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744575505a2613600.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
.sentry
in your source code and past the result here. For example, if you findobj.sentry
in your code, this error is caused by the variableobj
beingundefined
. – Gusi Gao Commented Mar 17 at 7:32at 164.1b37e5fe1265aae3.js:1:21471
)? – Gusi Gao Commented Mar 17 at 7:45