sentry-javascript: Upgrading to 7.91.0 breaks applications using @sentry/next `transaction.end is not a function`
Is 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 SDK are you using?
SDK Version
7.91.0
Framework Version
13.3.4
Link to Sentry event
No response
SDK Setup
const config = {
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
release: process.env.NEXT_PUBLIC_SENTRY_RELEASE,
environment: publicRuntimeConfig.sentryEnvironment,
};
Sentry.init(config);
Steps to Reproduce
Upgrade to 7.91.0 from 7.88.0
Expected Result
Application continues to work as it has.
Actual Result
Application crashes with transaction.end is not a function.
This occurred across all our routes, example above.
Reverting fixes.
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Reactions: 2
- Comments: 28 (10 by maintainers)
@PierrickP make sure your sentry library versions resolved via transitive dependencies are all the same. I believe
@sentry/tracingwill be the problem.npm why @sentry/tracingwill give you info on it.This is the issue I was describing above, where upgrading the main sentry library doesn’t trigger an update of dependencies and causes runtime errors.
on new installation of sentry 7.101.1 i followed the instructions and used the npx thing (until it stuck because i don’t have yarn) i am getting this error which not allow my sveltekit application to work
Doing this resolved the issue for me
@Cluster2a Thanks for sharing this. To me, this screams like either a caching issue or a stale dependency like I described. This is not something that is really fixable from our side I believe. If all the versions are aligned, like we require them to have, everything should work as expected.
To anybody stumbling onto this: Please first check your lockfile for diverging Sentry dependencies. Next, clear your node_modules, and package manager caches (like pnpm store), and reinstall your dependencies.
I was unable to reproduce the error in a new project (also mentioned in https://github.com/getsentry/sentry-javascript/issues/9979).
I fixed the problem by running the following commands.
rm -r node_modules/rm -r .pnpm-store/rm -r .svelte-kit/rm pnpm-lock.yamlSomething seems to be stuck after updating the dependencies.
@lforst, i just checked and I am able the reproduce the issue in my existing repo
ncu -u && pnpm install-> update to 7.91.0rm -r node_modules/ && rm -r .pnpm-store/ && rm -r .svelte-kit/ && rm pnpm-lock.yamland restarting fixes the issueUsually this way of updating a dependency (
ncu -u && pnpm install) is not a problem at all - not sure what is causing this problem.Got the same issue with @sentry/sveltekit 7.91.0. No other sentry-dependencies involved.