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

this._flushOutcomes is not a function #13083

Closed
3 tasks done
Tobi-mmt opened this issue Jul 29, 2024 · 7 comments
Closed
3 tasks done

this._flushOutcomes is not a function #13083

Tobi-mmt opened this issue Jul 29, 2024 · 7 comments
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Bug

Comments

@Tobi-mmt
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

8.20.0

Framework Version

next 14.2.5

Link to Sentry event

https://farbenmeer.sentry.io/issues/5644981656/?environment=vercel-production&project=4504966587547648&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=14d&stream_index=0

Reproduction Example/SDK Setup

No response

Steps to Reproduce

The renovate bot updated the sentry/nextjs package 4 days ago. Exactly with that merge in our sentry issue overview an issue started and is now eskalating. Error is this._flushOutcomes is not a function. it comes from the sentry package.

What have we done?

  1. upgrade existing app from 8.19.0 to 8.20.0
  2. see error is sentry issue overview

Expected Result

no errors inside an sentry package

Actual Result

1.800 errors affecting +300 users.

Image

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jul 29, 2024
@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Jul 29, 2024
@mydea
Copy link
Member

mydea commented Jul 29, 2024

hey, can you make sure that all Sentry packages are in sync in your lockfile - are all of the @sentry/xxx packages at v8.20.0?

@Tobi-mmt
Copy link
Author

The package which is used in our code looks like that in the lockfile:

Image

All that listed dependencies are pinned and so do point to the mentioned version 8.20. e.g. this one here:

Image

There are of course also other packages which use sentry and they point to other versions, e.g. like lighthouse:

Image

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jul 29, 2024
@mydea
Copy link
Member

mydea commented Jul 29, 2024

I think this is a depdendency resolution issue with the v6 version of Sentry that lighthouse pulls in, probably 🤔 I opened GoogleChrome/lighthouse#16131 to update this there.

For the time being, could you try to add a resolution for this to v8, something like this, in your package.json:

"overrides": {
     "@sentry/node: "^8.20.0"
   }

@lforst
Copy link
Member

lforst commented Jul 29, 2024

Hi, I just opened #13085 which would "fix" this and effectively ignore the error at hand. I think I am gonna hold off on merging this though, because of multiple reasons:

  • This is an actual error in the Sentry setup so it would technically make sense that it is reported as it should likely be fixed.
  • "Fixing" the error would prevent users from knowing that their setup has issues.
  • The error shouldn't do any harm to your page.

I am a bit on the fence about this though 🤔. I guess it depends a bit on how difficult it is to fix the setup. @Tobi-mmt can you try to align your SDK versions and report back whether that fixed it?

@Tobi-mmt
Copy link
Author

Hey, i can try the overrides in the package.json file and let's see if that resolves the issue.


I reversed to sentry 8.19.0 one hour ago and since then no issues where seen on the new release
One thing I don't get is: why does the version 8.19.0 does not throw that error even if the piece of code in #13085 was not touched for 2 years?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jul 29, 2024
@lforst
Copy link
Member

lforst commented Jul 29, 2024

@Tobi-mmt it didn't throw for exactly that reason. Your setup is broken but it never really surfaced because we did very little changes to the API of the base client over the years. Now we made one, the problem just surfaced.

@Tobi-mmt
Copy link
Author

I think this is a depdendency resolution issue with the v6 version of Sentry that lighthouse pulls in, probably 🤔 I opened GoogleChrome/lighthouse#16131 to update this there.

For the time being, could you try to add a resolution for this to v8, something like this, in your package.json:

"overrides": {
"@sentry/node: "^8.20.0"
}

This resolved that bug. Thank you @lforst and @mydea for the quick help 😌

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