[Maildev] nsIPrefBranch.setComplexValue failing in TB 58.0b1

Jonathan Kamens jik at kamens.us
Sat Dec 9 15:59:33 EST 2017


With Thunderbird 58.0b1, many of the add-ons I have installed, including
some of the add-ons I wrote and maintain, are erroring on startup like this:

    1512852280822    addons.xpi    WARN    Exception running bootstrap
    method startup on remote-content-by-folder at kamens.us: [Exception...
    "Component returned failure code: 0x80004002 (NS_NOINTERFACE)
    [nsIPrefBranch.setComplexValue]"  nsresult: "0x80004002
    (NS_NOINTERFACE)"  location: "JS frame ::
    chrome://remote-content-by-folder/content/defaultPreferencesLoader.jsm
    :: pref :: line 99"  data: no] Stack trace:
    pref()@defaultPreferencesLoader.jsm:99 <
    remote-content-by-folder.js:7 <
    parseDirectory/<()@defaultPreferencesLoader.jsm:75 <
    parseDirectory()@defaultPreferencesLoader.jsm:74 <
    loadDefaultPreferences()@resource://gre/modules/addons/XPIProvider.jsm
    -> file:///home/jik/src/remote-content-by-folder/bootstrap.js:170 <
    startup()@resource://gre/modules/addons/XPIProvider.jsm ->
    file:///home/jik/src/remote-content-by-folder/bootstrap.js:111 <
    callBootstrapMethod()@resource://gre/modules/addons/XPIProvider.jsm:4404
    < startup()@resource://gre/modules/addons/XPIProvider.jsm:2230 <
    callProvider()@resource://gre/modules/AddonManager.jsm:263 <
    _startProvider()@resource://gre/modules/AddonManager.jsm:730 <
    startup()@resource://gre/modules/AddonManager.jsm:897 <
    startup()@resource://gre/modules/AddonManager.jsm:3082 <
    observe()@jar:file:///home/jik/bin/thunderbird-58.0b1/omni.ja!/components/addonManager.js:65

Note that this is a bootstrapped add-on, not an overlay add-on, and that
I'm not relying on Thunderbird to load my default preferences
automatically -- that has never been supported in bootstrapped add-ons,
so I've always had code in this add-on to load the default preferences,
and that code is what's failing here.

I know there has been email going back and forth about various things
changing and becoming incompatible, but I don't recall whether
nsIPrefBranch in general or nsIPrefBranch.setComplexValue in particular
was mentioned as having changed in an incompatible way.

I've searched to see if I can find out more about this failure, but by
Google-fu apparently is not good enough to find anything, or it's just
not out there, I don't know which.

Is this failure expected? If so, then what's the fix for it? I.e., how
do I store UTF-8 strings in preferences?

FYI, the code that's failing in the error shown above can be found here
<https://github.com/jikamens/remote-content-by-folder/blob/master/content/defaultPreferencesLoader.jsm#L99>.

Thanks,

Jonathan Kamens


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thunderbird.net/pipermail/maildev_lists.thunderbird.net/attachments/20171209/e89952d0/attachment-0001.html>


More information about the Maildev mailing list