1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-07 23:00:54 +00:00
* Fixed: Add compatibility code for Twitch's own automatic error reporting. Namely: Shove their error handler to the back of the stack so ours still gets called.
* Fixed: Blacklist `InvalidStateError` exceptions which, without fail, never have any substance to the reports.
This commit is contained in:
SirStendec 2019-12-13 22:12:18 -05:00
parent 7370db2f54
commit 11346b61bb
2 changed files with 24 additions and 1 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "frankerfacez", "name": "frankerfacez",
"author": "Dan Salvato LLC", "author": "Dan Salvato LLC",
"version": "4.17.8", "version": "4.17.9",
"description": "FrankerFaceZ is a Twitch enhancement suite.", "description": "FrankerFaceZ is a Twitch enhancement suite.",
"license": "Apache-2.0", "license": "Apache-2.0",
"scripts": { "scripts": {

View file

@ -123,6 +123,28 @@ export default class RavenLogger extends Module {
}); });
}); });
// Twitch is greedy and preventDefault()s on errors... we don't like that.
this.twitch_logger = null;
this.once('site:enabled', () => {
const munch = this.resolve('site.web_munch');
if ( munch )
munch.getRequire().then(() => {
const site = this.resolve('site'),
core = site.getCore(),
logger = core?.logger;
if ( logger && ! logger.rootLogger ) {
this.twitch_logger = logger;
if ( logger.windowErrorListenerAdded ) {
// Move their event listener to the end, so Raven runs.
window.removeEventListener('error', logger.onWindowError);
window.addEventListener('error', logger.onWindowError);
}
}
})
});
this.raven = Raven; this.raven = Raven;
const raven_config = { const raven_config = {
@ -133,6 +155,7 @@ export default class RavenLogger extends Module {
environment: DEBUG ? 'development' : 'production', environment: DEBUG ? 'development' : 'production',
captureUnhandledRejections: false, captureUnhandledRejections: false,
ignoreErrors: [ ignoreErrors: [
'InvalidStateError',
'InvalidAccessError', 'InvalidAccessError',
'out of memory', 'out of memory',
'Access is denied.', 'Access is denied.',