[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 ::
    :: 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 <
    -> 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 <
    < 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 <

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


Jonathan Kamens

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

More information about the Maildev mailing list