-
Notifications
You must be signed in to change notification settings - Fork 435
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
GM.xmlHttpRequest.onerror
causes uncaught exception when logging error
#2158
Comments
I fixed the throwing by updating function consoleErr(label, msg) {
console.error( `${config.appSymbol} ${config.appName} » ${
typeof label == 'object' ? JSON.stringify(label) : label }${ msg ? `: ${msg}` : ''}`)
} ... but it's still nice how VM auto-converts, also for some reason their obj is much more detailed TM: VM: |
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/amazongpt`]
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/googlegpt`]
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/duckduckgpt`]
…s in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/bravegpt`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/duckduckgpt`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/amazongpt`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/bravegpt`]
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps/googlegpt`]
Will be fixed at the next BETA version. Thanks for reporting. Out of curiosity, the following test script is always logging
|
What's no browser or script manager mean? Also the code in FF TM shows the original TypeError to me |
You said "in Violentmonkey it does not throw + properly logs the err obj". What does "properly" mean? I only get the string |
Also my code is: onerror: err => { log.err(err)
if (!config.proxyAPIenabled) appAlert(!config.openAIkey ? 'login' : ['openAInotWorking', 'suggestProxy'])
else if (get.reply.status != 'done') api.tryNew(get.reply)
} ... and I notice on error, it logs only, the next 2 lines don't run When I simplify the onerror to just api.tryNew(get.reply) it works though |
I figured it out, the stream is considered done by the reader on error so i removed the condition |
Should be fixed at 5.3.6209 (crx|xpi in review) Please download the crx file linked above and drag and drop it to the extensions page For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version. |
(Please fill out the issue template with your details)
Expected Behavior
Log the error, do not throw
Actual Behavior
Uncaught TypeError: can't convert label to string
Specifications
Script
(Please give an example of the script if applicable.)
The above on error will throw unless
err
is wrapped inJSON.stringify()
(In Violentmonkey it does not throw + properly logs the
err
obj and script healthily keeps on running)Maybe related to #1877
The text was updated successfully, but these errors were encountered: