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

Sentry floods Sentry with "antifingerprint not defined yet. will try and handle event after its ready..." #9143

Closed
3 tasks done
nordhagen opened this issue Sep 29, 2023 · 18 comments
Labels
Package: nextjs Issues related to the Sentry Nextjs SDK Type: Bug

Comments

@nordhagen
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

7.68.0

Framework Version

7.68.0

Link to Sentry event

https://hjemmelegene.sentry.io/issues/4496677982

SDK Setup

Sentry.init({
dsn: 'https://93f5f63cb2514405a700053731ef67a6@o518563.ingest.sentry.io/5627822',
beforeSend,
// Replay may only be enabled for the client-side
integrations: [new Sentry.Replay()],

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 0.1,

// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,

// ...

// Note: if you want to override the automatic release value, do not set a
// release value here - use the environment variable SENTRY_RELEASE, so
// that it will also get attached to your source maps
})

Steps to Reproduce

  1. Installed Sentry as per the modification suggested by the Sentry team over at Nx fix(nx): fix Sentry example in plugin docs nrwl/nx#19338
  2. Deployed to production

Expected Result

Sentry not introducing its own errors

Actual Result

Stack Trace

antifingerprint not defined yet. will try and handle event after its ready...

Crashed in non-app: ./node_modules/@sentry/integrations/esm/captureconsole.js in callback

Show 2 more frames

about:blank in generalAddEventListenerLogic at line 36:21
In App
about:blank in HTMLDivElement.Element.addEventListener at line 49:5
In App
Called from: ./node_modules/react-dom/cjs/react-dom.production.min.js in af

Show 2 more frames

in Set.forEach
In App
Called from: ./node_modules/react-dom/cjs/react-dom.production.min.js in cf

@github-actions github-actions bot added the Package: nextjs Issues related to the Sentry Nextjs SDK label Sep 29, 2023
@lforst
Copy link
Member

lforst commented Sep 29, 2023

You seem to have the CaptureConsole integration active. As the name suggests, this integration captures console messages as events. "antifingerprint not defined yet..." is a log message that seems to be logged on your website.

@nordhagen
Copy link
Author

Thanks. In that case isn't the stack trace a little misleading? It says it crashed in Sentry's code
image

And this error message is not part of any app code of ours. Nor can I find it or any parts of in while searching through every file in node_modules and the only mention of this error message I can find on Google is at this issue for a package we are not using rainbow-me/rainbowkit#1374

@lforst
Copy link
Member

lforst commented Sep 29, 2023

@nordhagen The stacktrace can definitely be improved. Ideally it points to the location of the console.log call. Maybe this regressed somehow. We should look into it.

The message itself we cannot do anything about. This is the behavior of your own website and anything that runs on it. It can be any third party script, browser extension, ...

I also searched for the message but didn't find anything on github: https://github.com/search?type=code&q=%22antifingerprint+not+defined+yet%22

@AbhiPrasad
Copy link
Member

@nordhagen IMO the best way to debug this is to set up Sentry Session Replay for your project and try to get a more detailed reproduction. This will help you see what exactly was happening before the error occured.

@nordhagen
Copy link
Author

@AbhiPrasad thanks. We have that enabled, but this is coming from all over the place, so it's not very helpful.

@mydea
Copy link
Member

mydea commented Oct 2, 2023

Can you try enabling this options:

Sentry.init({
  // ...
  attachStacktrace: true,
});

This should opt in to attach stacktraces to pure messages/logs captured. Also I'd recommend to update to the latest SDK version, as there may have been improvements in the meanwhile to these things!

@nordhagen
Copy link
Author

Can you try enabling this options:

Sentry.init({
  // ...
  attachStacktrace: true,
});

This should opt in to attach stacktraces to pure messages/logs captured. Also I'd recommend to update to the latest SDK version, as there may have been improvements in the meanwhile to these things!

I've done this but it doesn't really help anything. I'm also running the latest SDK. At this point I'm just randomly upgrading stuff to see if it helps. It's definitely not coming from our code and I have no idea what antifingerprinting is.

Could it be related to this? https://docs.sentry.io/product/data-management-settings/event-grouping/fingerprint-rules/?original_referrer=https%3A%2F%2Fwww.google.com%2F

The problem is the number of issues this is creating. It's eating up our Sentry quota, blocking our own important issues. I think this is still relevant on this repo because of how the issue is being parsed and rendered.

@lforst
Copy link
Member

lforst commented Oct 11, 2023

@nordhagen Fingerprinting in Sentry is definitely not related to this.

You have multiple ways of filtering out events: https://docs.sentry.io/platforms/javascript/configuration/filtering/

@buren
Copy link

buren commented Oct 24, 2023

Just to add another data point I've gotten this error a few times as well and looking at the IP-addresses all of them are from Cloudflare data centers 🤔 One in Warsaw, Poland and the other New York.

I'm running the default Sentry settings for a Next.js app (created with the Sentry wizard).

Can't see any replays, currently rate-limited for those. Happy to provide additional information if needed.

@lforst
Copy link
Member

lforst commented Oct 25, 2023

This is very unlikely an issue with the sentry SDK. If you don't see any user impact from these errors/issues we recommend ignoring them in Sentry.

@felixgenicio
Copy link

We've statted to received this message from some recent time, and the only thing that we see from this events is that all the IPs generating the event are from Microsoft Corporation:
image

@lforst
Copy link
Member

lforst commented Nov 3, 2023

I am gonna close this issue because it is unrelated to the SDK. If you find that the generated issues are unactionable, the recommendation is to ignore them or filter them using the SDK options: docs.sentry.io/platforms/javascript/configuration/filtering

@lforst lforst closed this as completed Nov 3, 2023
@Ollymid
Copy link

Ollymid commented Nov 6, 2023

We've statted to received this message from some recent time, and the only thing that we see from this events is that all the IPs generating the event are from Microsoft Corporation: image

Same here - only on browsers on Windows 10

@shustariov-andrey
Copy link

That sounds quite interesting - we are getting traffic from those IPs as well. Came across this issue trying to identify issue with the same message and turns out that some IPs match as well. Could it be some privacy extension, which works over some service which is deployed on Azure?..

@Ollymid, did you figure out by any chance who or what was behind those requests?

@jasonHooten
Copy link

I've been debugging this issue recently as well... there seems to be a correlation to running ad-blockers but I can't pin it on that yet.

@nordhagen
Copy link
Author

I've been debugging this issue recently as well... there seems to be a correlation to running ad-blockers but I can't pin it on that yet.

Thanks Jason. I don't use at blockers and I still get these though.

@s-palmer
Copy link

s-palmer commented Feb 28, 2024

@nordhagen @jasonHooten Having a similar issue, noticed that the requests all had query params set pointing to the Honey Chrome extension. Did you see anything similar?

@alextreppass
Copy link

For anyone else experiencing this, it looks related to Outlook safelink scanning: #3440 (comment)

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
Development

No branches or pull requests