diff --git a/src/glov/client/error_report.js b/src/glov/client/error_report.js index 39f28b74..1a5be82b 100644 --- a/src/glov/client/error_report.js +++ b/src/glov/client/error_report.js @@ -85,12 +85,38 @@ export function glovErrorReportSetCrashCB(cb) { } // Errors from plugins that we don't want to get reported to us, or show the user! -// The exact phrase "Script error.\n at (0:0)" comes from our bootstap.js when we -// receive the message 'Script Error.' and no stack. This happens on the Mi Browser on Redmi phones -// and doesn't seem to be indicative of any actual problem. -// Ignoring null at null for similar reasons and because we get nothing useful from the reports. -// eslint-disable-next-line no-regex-spaces -let filtered_errors = /avast_submit|vc_request_action|^Error: Script error\.$|^Error: Script error\.\n at \(0:0\)$|^Error: null$|^Error: null\n at null\(null:null\)$|getElementsByTagName\('video'\)|document\.getElementById\("search"\)|change_ua|chrome-extension|setConnectedRobot|Failed to (?:start|stop) the audio device|zaloJSV2|getCookie is not defined|originalPrompt|_AutofillCallbackHandler|sytaxError|bannerNight|privateSpecialRepair|__gCrWeb|\$wrap is not/; +let filtered_errors = new RegExp([ + // Generic error that shows up with no context, not useful, and probably coming from internal or extension scripts + '^Error: Script error\\.$', + // The exact phrase "Script error.\n at (0:0)" comes from our bootstap.js when we + // receive the message 'Script Error.' and no stack. This happens on the Mi Browser on Redmi phones + // and doesn't seem to be indicative of any actual problem. + '^Error: Script error\\.\n at \\(0:0\\)$', + '^Error: null$', + // Ignoring null at null for similar reasons and because we get nothing useful from the reports. + '^Error: null\n at null\\(null:null\\)$', + 'avast_submit', + 'vc_request_action', + 'getElementsByTagName\\(\'video\'\\)', + 'document\\.getElementById\\("search"\\)', + 'change_ua', + 'chrome-extension', + 'setConnectedRobot', + 'Failed to (?:start|stop) the audio device', + 'zaloJSV2', + 'getCookie is not defined', + 'originalPrompt', + '_AutofillCallbackHandler', + 'sytaxError', + 'bannerNight', + 'privateSpecialRepair', + '__gCrWeb', + '\\$wrap is not', + 'wsWhitelisted', + '#darkcss', + 'chrome://userjs', +].join('|')); + export function glovErrorReport(is_fatal, msg, file, line, col) { console.error(msg); if (on_crash_cb) {