Repository navigation
Commit 40e26c6
fix(browser-utils): Handle NS_ERROR_NOT_INITIALIZED from setTimeout in Firefox (#25024)
Replay calls our `setTimeout` from `@sentry/browser-utils`. When
`window.setTimeout` is wrapped (by default it is, by our own
`browserApiErrors` integration), that `setTimeout` comes from a sandbox
iframe that is removed right away. In rare cases Firefox throws
`NS_ERROR_NOT_INITIALIZED` when it is called, which shows up as an
unhandled rejection from Replay's `afterSendEvent` handler. This catches
the error, falls back to `window.setTimeout` and caches it.
---------
Co-authored-by: Sergiy Dybskiy <sergical@users.noreply.github.com>
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 3a7ad4b commit 40e26c6
2 files changed
Lines changed: 64 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
123 | 133 | | |
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments