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

UnhandledRejection: Non-Error promise rejection captured with value: Timeout #2514

Closed
Undistraction opened this issue Mar 25, 2020 · 16 comments

Comments

@Undistraction
Copy link

Package + Version

@sentry/browser@5.13.0

Description

We are receiving a high volume of exceptions that follow the same signature. They occur across all pages, and in all sorts of places with seemingly no discernible pattern. It occurs across all browsers with frequency roughly the same as usage.

UnhandledRejection
Non-Error promise rejection captured with value: Timeout

In all cases the Exception is missing. There is no stack trace or additional information.

I'm pretty certain this is originating from third-party code, but without more information to go on I've been unable to pin this down.

I'm opening this as a bug because it feels like Sentry should be reporting additional information to help pinpoint the source of the error.

There is an existing issue for this that has been closed without any resolution: #2210

@JustFly1984
Copy link

We had multiple issues like this and pinned it down to google recaptcha code. It is very flaky, so we got rid of recaptcha and errors disappeared

@Undistraction
Copy link
Author

@JustFly1984 Thanks for the confirmation. Recaptcha is my prime suspect. Unfortunately we cannot remove it. Looks like it maybe doesn't unmount properly. Still feels like we should be able to get more info from the exception though.

@JustFly1984
Copy link

I’ve failed an issue in google bug tracker, but they don’t give a sheet

@Undistraction
Copy link
Author

@JustFly1984 Yep. That's Google for for you. No sheets given.

@kamilogorek
Copy link
Contributor

kamilogorek commented Mar 25, 2020

The issue lies exactly there: https://www.gstatic.com/recaptcha/releases/P6KLRNy7h3K160ZmYNUOAce7/recaptcha__en.js

c.reject("Timeout ("+y+")")

or

H((vn.delete(P),"Timeout")

tl;dr - they reject with a primitive value, but should with new Error("timeout").

In this case, your best solution until they fix it is to ignore this kind of errors.

Sentry.init({
  beforeSend(event, hint) {
    if (hint.originalException === "Timeout") return null;
    return event;
  }
});

@Undistraction
Copy link
Author

@kamilogorek Thanks. Interested why you would filter this out in beforeSend on the client rather than just ignoring in the dashboard?

@kamilogorek
Copy link
Contributor

Because this error is too generic. Too easy to get a false positive match.
Also, I've never seen this exact Timeout error before :D

@Undistraction
Copy link
Author

Undistraction commented Mar 30, 2020

@kamilogorek Yeah. I guess my concern is that filtering it out on the client might end up masking important errors. At least if you ignore it on the dashboard you still have the data stored.

@kamilogorek
Copy link
Contributor

kamilogorek commented Mar 30, 2020

@Undistraction filtered events are dropped for the end user. Otherwise, they'd count toward quota.

@Undistraction
Copy link
Author

@kamilogorek Ah. I hadn't considered quota. Thanks for clarifying.

@malykhinvi
Copy link

malykhinvi commented May 12, 2020

Does anybody know how this timeout affects end users?

@kamilogorek
Copy link
Contributor

Closing the issue, as it seems like the original issue has been partially resolved or there is a working solution. I'd prefer someone to create a new issue with a fresh description if it's still an issue.
Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it.
Cheers!

@vjorasb
Copy link

vjorasb commented Sep 15, 2020

@kamilogorek so this timeout issue is not affected to end users and it is good solution to ignore this one?

@kamilogorek
Copy link
Contributor

It depends on how your codebase is tied to the ReCaptcha SDK, but I'd say that in general, in most cases yes, it shouldn't affect the end outcome.

@ChetSocio
Copy link

In this case, your best solution until they fix it is to ignore this kind of errors.

Sentry.init({
beforeSend(event, hint) {
if (hint.originalException === "Timeout") return null;
return event;
}
});

There is some risk too. It will not capture other timeout errors in whole project. Is there any way to ignore that specific error in sentry dashboard itself ?

@ChetSocio
Copy link

Also the sentry seems to capture it once user clicks on recaptcha and doesnot perform any submit action that causes timeout ("Verification expired. Check the checkbox again.") in captcha and sentry catches that timeout error. Not a serious issue in my Nextjs side but still needs some fixing in sentry side. My question to sentry devs: Can we ignore this specific message ("UnhandledRejection: Non-Error promise rejection captured with value: Timeout ") from specific files using sentry config ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants