Skip to content
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

isOlderThan is not a function #12155

Closed
jd-carroll opened this issue May 22, 2024 · 5 comments · Fixed by #12206
Closed

isOlderThan is not a function #12155

jd-carroll opened this issue May 22, 2024 · 5 comments · Fixed by #12206
Labels
Package: node Issues related to the Sentry Node SDK Type: Bug

Comments

@jd-carroll
Copy link

jd-carroll commented May 22, 2024

Cross posting here, as I'm starting to believe the issue is in @sentry/core

Original Ticket: getsentry/sentry-javascript-bundler-plugins#533
Probably Related: #12151

Environment

    "@sentry/esbuild-plugin": "^2.16.1",

Actual Result

Still investigating, but my builds are all failing with:

  "message": "getHubFromCarrier(...).isOlderThan is not a function",
  "stack": [
    "TypeError: getHubFromCarrier(...).isOlderThan is not a function",
    "    at getGlobalHub (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:6631:33)",
    "    at getCurrentHub (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:6612:10)",
    "    at getClient (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:4967:10)",
    "    at hasTracingEnabled (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:6843:18)",
    "    at sampleTransaction (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:7938:8)",
    "    at Hub._startTransaction (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:8095:17)",
    "    at Hub._callExtensionMethod (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:6555:40)",
    "    at Hub.startTransaction (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:6423:25)",
    "    at _callee$ (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:14342:25)",
    "    at tryCatch (file:///home/runner/work/monorepo/monorepo/node_modules/@sentry/bundler-plugin-core/dist/esm/index.mjs:90:17)"
  ]
@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label May 22, 2024
@jd-carroll
Copy link
Author

I'll also note: If I remove the esbuild plugin integration for sourcemaps, there is no issue. However, I have not been able to fully validate a deployed lambda yet. --> So I don't know if there is also an issue at runtime.

This is the last step of a full ESM migration 🎊

@Lms24
Copy link
Member

Lms24 commented May 23, 2024

We have an idea how to fix issues like this one, where multiple Sentry versions compete for the global.__SENTRY__ object. I'm working on this at the moment and will open a PR once it's in a good state.

@luckylooke
Copy link

I'm still hitting this in version 8.5.0, tried downgrading and I have found working version 7.115.0, so it seems that this was introduced in v8

@mydea
Copy link
Member

mydea commented May 28, 2024

This PR: #12206 (or something similar) will hopefully resolve this issue for good!

@AbhiPrasad
Copy link
Member

Fix released with https://github.com/getsentry/sentry-javascript/releases/tag/8.7.0 - please give it a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK Type: Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants