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: CustomEvent captured as promise rejection #1913

Open
sentry-io bot opened this issue Aug 14, 2023 · 5 comments
Open

Sentry: CustomEvent captured as promise rejection #1913

sentry-io bot opened this issue Aug 14, 2023 · 5 comments
Labels
0 bug Something isn't working Store Team

Comments

@sentry-io
Copy link

sentry-io bot commented Aug 14, 2023

We may not be able to do anything about this, but let's figure that out. It started recently, maybe we can stop it?

Sentry Issue: REACT-COMMERCE-30M

CustomEvent: Event `CustomEvent` (type=unhandledrejection) captured as promise rejection
@danielbeardsley danielbeardsley changed the title <unknown> Sentry: CustomEvent captured as promise rejection Aug 17, 2023
@sterlinghirsh sterlinghirsh added the 0 bug Something isn't working label Aug 22, 2023
@rickisXP rickisXP self-assigned this Aug 28, 2023
@rickisXP
Copy link
Contributor

I'm having trouble reproducing the error, so I'm going to unassign myself. I'll post some notes below:

  • Most recent events have occured on Safari, mostly mobile browser
  • In all events I looked at, Sentry noted the navigation as having the same from and to link. Ex below:
    { from: /products/macbook-air-13-late-2010-2017-replacement-battery, to: /products/macbook-air-13-late-2010-2017-replacement-battery }

@rickisXP rickisXP removed their assignment Aug 29, 2023
@masonmcelvain
Copy link
Contributor

The first Sentry event happened on Aug 1, 2023 10:51:32 PDT.

#1865 (small styling change) and #1849 (update Nextjs to 13.4.12) were merged within an hour before that event.

Several unknown promise rejections stopped happening around Aug 1. This event could be a new bucket for those kinds of errors due to the framework update.

@jensbodal
Copy link

Probably related to getsentry/sentry-javascript#424

You can reproduce errors like this and have them show up in Sentry by doing something like the following in the browser console

let src = new Error({lady: 'bug'}); new Promise((resolve, reject) => {
  const script = document.createElement('script');
  script.src = src;
  script.onload = resolve;
  script.onerror = reject;
  document.body.appendChild(script);
});

I'm not familiar with your project but for issues I've seen related to this it's due to browser extensions in user's browsers.

@masonmcelvain
Copy link
Contributor

Thanks for the link @jensbodal! That's a clever way to trigger Sentry events from the console, TIL.

We'll see if anything changes when we upgrade to Next.js 14, but I vote we start filtering out these errors since they chip away at our Sentry budget and they don't seem to indicate a fixable problem.

@danielcliu-ifixit danielcliu-ifixit removed their assignment Nov 10, 2023
@jensbodal
Copy link

jensbodal commented Nov 17, 2023

The problem seems to be it's not possible to filter them out in all cases: getsentry/sentry-javascript#9589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 bug Something isn't working Store Team
Projects
None yet
Development

No branches or pull requests

6 participants