Closed Bug 1708748 Opened 4 years ago Closed 3 years ago

`BackgroundUpdate.jsm` triggers `NS_ERROR_FILE_UNRECOGNIZED_PATH` in `L10nRegistry.jsm`

Categories

(Toolkit :: Application Update, defect)

defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: nalexander, Unassigned)

References

(Blocks 1 open bug)

Details

When I toggle "When Firefox is not running", I see the following exception in the browser console:

[Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXPCComponents_Utils.readUTF8URI]"  nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS frame :: resource://gre/modules/L10nRegistry.jsm :: L10nRegistry.loadSync :: line 692"  data: no] L10nRegistry.jsm:692:19
    loadSync resource://gre/modules/L10nRegistry.jsm:692
    fetchFile resource://gre/modules/L10nRegistry.jsm:607
    generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:512
    map self-hosted:222
    generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:507
    generateResourceSetsForLocaleSync resource://gre/modules/L10nRegistry.jsm:449
    next self-hosted:1431
    generateResourceSetsForLocaleSync resource://gre/modules/L10nRegistry.jsm:458
    next self-hosted:1431
    generateBundlesSync resource://gre/modules/L10nRegistry.jsm:186
    next self-hosted:1431
    touchNext resource://gre/modules/Localization.jsm:167
    generateBundles resource://gre/modules/Localization.jsm:473
    <anonymous> resource://gre/modules/BackgroundUpdate.jsm:38
    get resource://gre/modules/XPCOMUtils.jsm:62
    _registerBackgroundUpdateTask resource://gre/modules/BackgroundUpdate.jsm:253
    maybeScheduleBackgroundUpdateTask resource://gre/modules/BackgroundUpdate.jsm:462
    InterpretGeneratorResume self-hosted:1483
    AsyncFunctionNext self-hosted:693

I think this is an error, internal to the L10n mechanism, that is leaking out, 'cuz it's also triggered by about:preferences:

[Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXPCComponents_Utils.readUTF8URI]"  nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS frame :: resource://gre/modules/L10nRegistry.jsm :: L10nRegistry.loadSync :: line 692"  data: no] L10nRegistry.jsm:692:19
    loadSync resource://gre/modules/L10nRegistry.jsm:692
    fetchFile resource://gre/modules/L10nRegistry.jsm:607
    generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:512
    map self-hosted:222
    generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:507
    generateResourceSetsForLocaleSync resource://gre/modules/L10nRegistry.jsm:449
    InterpretGeneratorResume self-hosted:1483
    next self-hosted:1431
    generateBundlesSync resource://gre/modules/L10nRegistry.jsm:186
    InterpretGeneratorResume self-hosted:1483
    next self-hosted:1431
    touchNext resource://gre/modules/Localization.jsm:167
    generateBundles resource://gre/modules/Localization.jsm:473
    getRegionDisplayNames resource://gre/modules/mozIntl.jsm:814
    getLocaleDisplayNames resource://gre/modules/mozIntl.jsm:874
    map self-hosted:222
    getLocaleDisplayNames resource://gre/modules/mozIntl.jsm:844
    displayUseSystemLocale chrome://browser/content/preferences/main.js:1402
    init chrome://browser/content/preferences/main.js:370
    init chrome://browser/content/preferences/preferences.js:105
    AsyncFunctionNext self-hosted:693

Maybe this is "just" Bug 1659239? We should address it in some way.

:zbraniecki, is this a thing that your team could handle?

Flags: needinfo?(zbraniecki)

We're addressing it by getting rid of the L10nRegistry.jsm in bug 1660392

Flags: needinfo?(zbraniecki)

Zibi, could you also review the usage of L10nRegistry.jsm at https://searchfox.org/mozilla-central/rev/1ed1bb14eed9b3f27a94513387608436ea74c247/toolkit/mozapps/update/BackgroundUpdate.jsm#37? I culted that from other identical patterns in the tree, namely https://searchfox.org/mozilla-central/rev/1ed1bb14eed9b3f27a94513387608436ea74c247/browser/components/preferences/privacy.js#32. But maybe both of these invocations aren't correct, and they're the ones that cause the exception above?

You set the second param to true which makes Localization sync. But then you call it async, so you may swap to false to keep it async which is preferred!

I get the following in my Thunderbird "error console":

[Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIXPCComponents_Utils.readUTF8URI]" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: resource://gre/modules/L10nRegistry.jsm :: L10nRegistry.loadSync :: line 658" data: no] L10nRegistry.jsm:658:19
loadSync resource://gre/modules/L10nRegistry.jsm:658
fetchFile resource://gre/modules/L10nRegistry.jsm:573
generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:478
map self-hosted:240
generateResourceSetSync resource://gre/modules/L10nRegistry.jsm:473
generateResourceSetsForLocaleSync resource://gre/modules/L10nRegistry.jsm:415
InterpretGeneratorResume self-hosted:1151
next self-hosted:1099
generateBundlesSync resource://gre/modules/L10nRegistry.jsm:177
InterpretGeneratorResume self-hosted:1151
next self-hosted:1099
touchNext resource://gre/modules/Localization.jsm:167
regenerateBundles resource://gre/modules/Localization.jsm:552
activate resource://gre/modules/Localization.jsm:243
<anonymous> chrome://openpgp/content/modules/trust.jsm:11
<anonymous> chrome://openpgp/content/modules/keyRing.jsm:17
<anonymous> chrome://openpgp/content/modules/windows.jsm:19
loader chrome://openpgp/content/modules/lazy.jsm:20
getService chrome://openpgp/content/modules/core.jsm:427
getService chrome://openpgp/content/modules/core.jsm:184
init chrome://openpgp/content/BondOpenPGP.jsm:104
InterpretGeneratorResume self-hosted:1151
AsyncFunctionNext self-hosted:693

Not sure if this is related or not. I think I have another similar bug open on this, but cannot find it.

I would love to some day have no errors in my "error console".

This was fixed by bug 1660392.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Depends on: 1660392
Target Milestone: --- → 92 Branch
You need to log in before you can comment on or make changes to this bug.