2

I installed the Drift widget on my website, as per instructions.

However, when it crashes, the error doesn't get captured by Sentry.

It is not filtered out in Sentry, nothing gets sent to Sentry from the front-end.

I tried to search for a solution, but surprisingly it seems people usually have the opposite problem: they are seeing errors from the Intercom widget in their own Sentry dashboard.

Any idea what might be wrong?

NEW ELEMENT: it seems that Sentry IS catching that error when it occurs in another type of browser. So far I was only reproducing it in Chrome on iOS 9, thus based on webkit, and Sentry was not capturing it. But I got an alert from Sentry from a Chrome browser on Windows, for the same error. Thus weirdly it seems that Sentry not capturing it depends on the browser

Vic Seedoubleyew
  • 9,888
  • 6
  • 55
  • 76
  • 1) what error do you get from Drif? Full stacktrace would be nice to locate the spot. 2) How are you sending this error to sentry using `Sentry.captureException(err)`? 3) If [this](https://docs.sentry.io/product/sentry-basics/integrate-backend/capturing-errors/#unhandled-errors) is not working then you can [intercept all the errors](https://stackoverflow.com/a/10556743/15273968) and using stracktrace figure out the origin(eg Drift) and send it to sentry yourself. – the Hutt Feb 12 '22 at 14:46
  • would be good to see your Sentry configuration on FE – YEVY Feb 13 '22 at 11:16
  • Thanks for the comments. To clarify: 1) I have the stacktrace from the Drift widget, but the point is not to fix it, the point is to be alerted next time the Drift widget crashes for another reason. I have already spotted this error, but by coincidence. I would like that in the future, I am alerted when that happens, since the Drift product is so bad. – Vic Seedoubleyew Feb 14 '22 at 10:12
  • 2) and 3) I am just using Sentry's default lazy-loader: https://docs.sentry.io/platforms/javascript/install/lazy-load-sentry/, thus I am not calling the SDK. And I am pretty sure that by default it is supposed to send all unhandled exceptions – Vic Seedoubleyew Feb 14 '22 at 10:12
  • @VicSeedoubleyew I wanted to know more about location of the error, and not the bug itself. Is it happening before Sentry loads? Is Sentry CDN script tag after the Drift's script tag in the html? I mean if Drift script throws error before Sentry – the Hutt Feb 14 '22 at 10:24
  • Thanks for the comment. The Sentry CDN Script tag is first, before Drift's script tag. – Vic Seedoubleyew Feb 15 '22 at 11:38
  • Can you provide link to your website? Or reproducible on codesandbox? – the Hutt Feb 15 '22 at 13:29
  • It doesn't crash all the time, only in specific browsers. Do you at least confirm that it is not normal that Sentry is not capturing this crash? – Vic Seedoubleyew Feb 17 '22 at 10:06
  • Was Drift's error captured in browsers' logs? Which framework/library did you use for FE development? – Nick Vu Mar 05 '22 at 16:02
  • Yes, Drift's error appeared in browser's logs, when I reproduce it locally. I use a framework indeed, but I don't see how that relates, since the Sentry code is loaded first, and Drift code is loaded separately – Vic Seedoubleyew Mar 07 '22 at 16:28
  • New information though: it seems that Sentry IS catching that error when it occurs in another type of browser. So far I was only reproducing it in Chrome on iOS 9, thus based on webkit, and Sentry was not capturing it. But I got an alert from Sentry from a Chrome browser on Windows, for the same error. Thus weirdly it seems that Sentry not capturing it depends on the browser – Vic Seedoubleyew Mar 07 '22 at 16:29

1 Answers1

-3

Best JavaScript code snippets using @sentry/node.captureException

  async report (error) {
  Sentry.init({
   dsn: Config.get('services.sentry.dsn')
  })

  Sentry.captureException(error)
 }

More on tabnine

Umesh Thapa
  • 195
  • 1
  • 7