TypeError: Cannot read properties of undefined (reading '_sentryTransaction')
See original GitHub issueIs 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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.14.0
Framework Version
12.3.0
Link to Sentry event
Steps to Reproduce
- Installed Sentry for Next.JS using the instructions at https://docs.sentry.io/platforms/javascript/guides/nextjs/
- Used the setup wizard, as per instructions
- Wrapped my API routes, as per instructions
- Ran my app, visited the homepage, immediately get the error
TypeError: Cannot read properties of undefined (reading '_sentryTransaction')
Expected Result
No error
Actual Result
Uncaught TypeError: Cannot read properties of undefined (reading '_sentryTransaction')
at getTransactionFromRequest(node_modules/@sentry/nextjs/cjs/config/wrappers/wrapperUtils.js:17:14)
at <unknown>(node_modules/@sentry/nextjs/cjs/config/wrappers/wrapperUtils.js:67:30)
at bound(node:domain:421:15)
at runBound(node:domain:432:12)
at Object.callTracedServerSideDataFetcher(node_modules/@sentry/nextjs/cjs/config/wrappers/wrapperUtils.js:128:5)
at Function.getInitialProps(node_modules/@sentry/nextjs/cjs/config/wrappers/withSentryServerSideDocumentGetInitialProps.js:33:27)
at Object.<anonymous>(node_modules/next/dist/shared/lib/utils.js:75:33)
at Generator.next(<anonymous>)
at asyncGeneratorStep(node_modules/@swc/helpers/lib/_async_to_generator.js:23:28)
at _next(node_modules/@swc/helpers/lib/_async_to_generator.js:12:17)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
React Sentry TypeError: Cannot read properties of ...
The actual error without the ErrorBoundry component should be TypeError: Cannot read properties of undefined (reading '0').
Read more >Resolving TypeError: Cannot Read Property of Undefined ...
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >cannot read properties of undefined (reading 'includes'
Here's an example of a JavaScript TypeError: Cannot read property of undefined thrown when a property is attempted to be read on an...
Read more >Cannot read property 'type' of undefined
Hi, I've just added Sentry to one of our apps and we're getting a lot of these errors: Cannot read property 'type' of...
Read more >{solved} TypeError: Cannot read property 'firstname' of ...
{solved} TypeError: Cannot read property 'firstname' of undefined. I'm having like no clue whats wrong with the code.. I've checked the Q&A Forum...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We released a patch that should fix this error. Let me know if you encounter any more problems!
Hi everybody. Thanks for reporting this issue! This bug is caused by a pretty new feature we only roll out per default when installing the SDK via the
@sentry/wizard
.In the meanwhile and to get your apps working again you can simply set the
autoInstrumentServerFunctions
option tofalse
in your Next.js config.We’ll try to get a fix out for this asap.