Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Learn More

Firefox generates uncaught exception NS_ERROR_XPC_BAD_CONVERT_JS when loading scripts with long lines

  • 3 Antworten
  • 4 haben dieses Problem
  • 22 Aufrufe
  • Letzte Antwort von dzeller

more options

I have an application that dynamically loads Javascript files via XMLHttpRequest when needed. Firefox is generating the following error when trying to load one of the files: Error: uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"

The file it is trying to load has one really long line in it that is part of a library to display gauges. The line is 100920 characters long. If this single line is removed, the script will load properly without generating the error (but, of course, nothing works properly). The error also occurs when loading the script in the HTML "head" section as opposed to loading it dynamically in Javascript. This has been working fine in Firefox up until the latest update I did. I am currently running V12.0. Internet Explorer also works fine with no issues and is what I am having to currently use to access my application since it is now broken with Firefox.

I have an application that dynamically loads Javascript files via XMLHttpRequest when needed. Firefox is generating the following error when trying to load one of the files: Error: uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" The file it is trying to load has one really long line in it that is part of a library to display gauges. The line is 100920 characters long. If this single line is removed, the script will load properly without generating the error (but, of course, nothing works properly). The error also occurs when loading the script in the HTML "head" section as opposed to loading it dynamically in Javascript. This has been working fine in Firefox up until the latest update I did. I am currently running V12.0. Internet Explorer also works fine with no issues and is what I am having to currently use to access my application since it is now broken with Firefox.

Ausgewählte Lösung

The following line in the library was causing the error in Firefox 11+ (specifically "HTMLElement.prototype.outerHTML"):

noNativeOuterHTML:typeof HTMLElement !="undefined"&& typeof HTMLElement.prototype.outerHTML=="undefined",

This was replaced with: typeof HTMLElement.outerHTML=="undefined" and now the library works properly with Firefox 11+.

Diese Antwort im Kontext lesen 👍 2

Alle Antworten (3)

more options

There are a lot of packed JavaScripts around that do not have any line breaks in it, so I can't imagine that such a change would have passed unnoticed.


Start Firefox in Diagnose Firefox issues using Troubleshoot Mode to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).

more options

Safe mode did not resolve the issue. I still get the error message. The library I am using is all packed on a single line. Unfortunately, I honed in on that as being the obvious issue since removing it make the error go away. Apparently there is actually an issue in the library itself that is causing this error, but the error message Firefox is presenting is pretty cryptic and doesn't help much in determining where the problem is. For now, I have gone back to Firefox V10 and everything is working again. It is very frustrating to have something that has worked fine for many years through versions of Firefox since V3 and IE since V7 and have it suddenly stop working with a browser update. I'll have to get with the vendor and see if it can be determined what is causing Firefox V11 and up to be having an issue with the code.

more options

Ausgewählte Lösung

The following line in the library was causing the error in Firefox 11+ (specifically "HTMLElement.prototype.outerHTML"):

noNativeOuterHTML:typeof HTMLElement !="undefined"&& typeof HTMLElement.prototype.outerHTML=="undefined",

This was replaced with: typeof HTMLElement.outerHTML=="undefined" and now the library works properly with Firefox 11+.