More descriptive messages on failures would have been helpful, so I added some more. https://searchfox.org/comm-central/rev/8253c3f8bc4f81226f04a66678c13a782b697958/mail/base/modules/DisplayNameUtils.jsm#36 -> https://searchfox.org/comm-central/rev/8253c3f8bc4f81226f04a66678c13a782b697958/mailnews/addrbook/jsaddrbook/AddrBookManager.jsm#173 Before sorting the directories ensureInitialized https://searchfox.org/comm-central/rev/8253c3f8bc4f81226f04a66678c13a782b697958/mailnews/addrbook/jsaddrbook/AddrBookManager.jsm#95 is called and that breaks since there is no _prefBranch for the invalid directory I think the main problem here is in createDirectoryObject. If the uri was invalid we'd throw in init(), but we store the directory before we know that, so there's an invalid in the store and that breaks everything. Not sure the this._prefBranch check I added are needed after that is now fixed.
Bug 1653234 Comment 19 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
More descriptive messages on failures would have been helpful, so I added some more. https://searchfox.org/comm-central/rev/8253c3f8bc4f81226f04a66678c13a782b697958/mail/base/modules/DisplayNameUtils.jsm#36 -> https://searchfox.org/comm-central/rev/8253c3f8bc4f81226f04a66678c13a782b697958/mailnews/addrbook/jsaddrbook/AddrBookManager.jsm#173 When sorting the directories it breaks since there is no _prefBranch for the invalid directory. I think the main problem here is in createDirectoryObject. If the uri was invalid we'd throw in init(), but we store the directory before we know that, so there's an invalid in the store and that breaks everything. Not sure the this._prefBranch check I added are needed after that is now fixed.