LDAP search shows no result after TB 91 update - for autoconfig
Categories
(Thunderbird :: Address Book, defect)
Tracking
(thunderbird_esr91+ fixed, thunderbird92 wontfix, thunderbird93+ fixed)
People
(Reporter: martin.vallanzasca, Assigned: rnons)
References
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr91+
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
Updated Thunderbird from 78 to 91.0.3
Actual results:
LDAP search does not give any result.
Errors in console (not sure if linked, but triggers every time i make a search) :
NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getComplexValue] AddrBookDirectory.jsm:646
getLocalizedStringValue resource:///modules/AddrBookDirectory.jsm:646
get dirName resource:///modules/AddrBookDirectory.jsm:155
getText chrome://messenger/content/addressbook/abTrees.js:34
getCellText chrome://messenger/content/jsTreeView.js:44
Uncaught
Exception { name: "NS_ERROR_UNEXPECTED", message: "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getComplexValue]", result: 2147549183, filename: "resource:///modules/AddrBookDirectory.jsm", lineNumber: 646, columnNumber: 0, data: null, stack: "getLocalizedStringValue@resource:///modules/AddrBookDirectory.jsm:646:29\nget dirName@resource:///modules/AddrBookDirectory.jsm:155:28\ngetText@chrome://messenger/content/addressbook/abTrees.js:34:5\ngetCellText@chrome://messenger/content/jsTreeView.js:44:31\n", location: XPCWrappedNative_NoHelper }
columnNumber: 0
data: null
filename: "resource:///modules/AddrBookDirectory.jsm"
lineNumber: 646
location: XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), filename: Getter, name: Getter, … }
QueryInterface: function QueryInterface()
asyncCaller: null
asyncCause: null
caller: XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), filename: , name: , … }
columnNumber: 29
filename: "resource:///modules/AddrBookDirectory.jsm"
formattedStack: "getLocalizedStringValue@resource:///modules/AddrBookDirectory.jsm:646:29\nget dirName@resource:///modules/AddrBookDirectory.jsm:155:28\ngetText@chrome://messenger/content/addressbook/abTrees.js:34:5\ngetCellText@chrome://messenger/content/jsTreeView.js:44:31\n"
lineNumber: 646
name: "getLocalizedStringValue"
nativeSavedFrame: SavedFrame { source: "resource:///modules/AddrBookDirectory.jsm", sourceId: 53, line: 646, … }
sourceId: 53
sourceLine: ""
toString: function toString()
<get asyncCaller()>: function asyncCaller()
<get asyncCause()>: function asyncCause()
<get caller()>: function caller()
<get columnNumber()>: function columnNumber()
<get filename()>: function filename()
<get formattedStack()>: function formattedStack()
<get lineNumber()>: function lineNumber()
<get name()>: function name()
<get nativeSavedFrame()>: function nativeSavedFrame()
<get sourceId()>: function sourceId()
<get sourceLine()>: function sourceLine()
<prototype>: Object { … }
message: "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getComplexValue]"
name: "NS_ERROR_UNEXPECTED"
result: 2147549183
stack: "getLocalizedStringValue@resource:///modules/AddrBookDirectory.jsm:646:29\nget dirName@resource:///modules/AddrBookDirectory.jsm:155:28\ngetText@chrome://messenger/content/addressbook/abTrees.js:34:5\ngetCellText@chrome://messenger/content/jsTreeView.js:44:31\n"
<prototype>: ExceptionPrototype { toString: toString(), name: Getter, message: Getter, … }
columnNumber:
data:
filename:
lineNumber:
location:
message:
name:
result:
stack:
toString: function toString()
Symbol(Symbol.toStringTag): "Exception"
<get columnNumber()>: function columnNumber()
<get data()>: function data()
<get filename()>: function filename()
<get lineNumber()>: function lineNumber()
<get location()>: function location()
<get message()>: function message()
<get name()>: function name()
<get result()>: function result()
<get stack()>: function stack()
<set stack()>: function stack()
<prototype>: Object { … }
AddrBookDirectory.jsm:646
getLocalizedStringValue resource:///modules/AddrBookDirectory.jsm:646
get dirName resource:///modules/AddrBookDirectory.jsm:155
getText chrome://messenger/content/addressbook/abTrees.js:34
getCellText chrome://messenger/content/jsTreeView.js:44
Expected results:
Show results.
Rolling back to old ldap system by setting mailnews.ldap.jsmodule to false makes it work again.
Assignee | ||
Comment 1•3 years ago
|
||
Interesting, do you have any special chars in the address book name?
Why is getComplexValue
used to get the description, AString
should become normal js string. Geoff do you have some ideas about this?
No special chars in the addressbook name, here is the ldap config in prefs.js :
user_pref("ldap_2.autoComplete.directoryServer", "ldap_2.servers.ACGre");
user_pref("ldap_2.autoComplete.useDirectory", true);
user_pref("ldap_2.servers.ACGre.auth.dn", "");
user_pref("ldap_2.servers.ACGre.auth.saslmech", "");
user_pref("ldap_2.servers.ACGre.description", "AC Gre");
user_pref("ldap_2.servers.ACGre.filename", "ldap.sqlite");
user_pref("ldap_2.servers.ACGre.maxHits", 100);
user_pref("ldap_2.servers.ACGre.uid", "b918d476-ad66-4451-91a0-f99b7f060166");
user_pref("ldap_2.servers.ACGre.uri", "ldap://ldap.REDACTED/ou=ac-grenoble,ou=education,o=gouv,c=fr??sub?(objectclass=*)");
Comment 3•3 years ago
|
||
getComplexValue
is used because the built-in address books have localised names. See how they're stored in the preferences. It's weird that it's throwing NS_ERROR_UNEXPECTED
which typically means the preference is missing, but it's not according to comment 2.
Assignee | ||
Comment 4•3 years ago
|
||
Can you run the following in the DevTools and tell me the result?
Services.prefs.getComplexValue('ldap_2.servers.ACGre.description', Ci.nsIPrefLocalizedString).data
Services.prefs.getComplexValue('ldap_2.servers.ACGre.description', Ci.nsIPrefLocalizedString).data
"AC Gre"
I dont get it, after setting mailnews.ldap.jsmodule to false then back to true it seems to be working...
Kinda weird, but as we have autoconf and some other tweaks it might be related, ill take a look closer into this and if i reproduce ill let you know..
Anyway thank you for your hints, ill close the bug report
Ok, it is linked to autoconf, i am able to reproduce the issue (made a confusion between profiles)
With a new profile, and an autoconf.js file in TBFolder/default/prefs containing this :
pref("ldap_2.autoComplete.useDirectory", true);
pref("ldap_2.servers.AcadmieGrenoble.auth.dn", "");
pref("ldap_2.servers.AcadmieGrenoble.auth.saslmech", "");
pref("ldap_2.servers.AcadmieGrenoble.description", "AC Gre");
pref("ldap_2.servers.AcadmieGrenoble.filename", "ldap.sqlite");
pref("ldap_2.servers.AcadmieGrenoble.maxHits", 100);
pref("ldap_2.servers.AcadmieGrenoble.uri", "ldap://ldap.redacted/ou=ac-grenoble,ou=education,o=gouv,c=fr??sub?(objectclass=*)");
pref("ldap_2.autoComplete.directoryServer", "ldap_2.servers.AcadmieGrenoble");
It shows an empty addressbook, and triggers the errors.
Setting mailnews.ldap.jsmodule to false it works
View here : https://i.imgur.com/ePiDeI4.png
Assignee | ||
Comment 8•3 years ago
|
||
The problem is getComplexValue doesn't work with autoconfig, don't know why, but I guess it's related to autoconfig runs all prefs in a sandboxed js context.
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/6313f8d1360d
Fix address book initialized by autoconfig prefs. r=darktrojan
Updated•3 years ago
|
Assignee | ||
Comment 10•3 years ago
|
||
Comment on attachment 9239723 [details]
Bug 1729254 - Fix address book initialized by autoconfig prefs. r=darktrojan
[Approval Request Comment]
Regression caused by (bug #): bug 1696625
User impact if declined: Autoconfiged addressbooks don't work, not only ldap books
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): low
Comment 11•3 years ago
|
||
Comment on attachment 9239723 [details]
Bug 1729254 - Fix address book initialized by autoconfig prefs. r=darktrojan
[Triage Comment]
Approved for beta
Comment 12•3 years ago
|
||
bugherder uplift |
Thunderbird 93.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/229e62187202
Comment 13•3 years ago
|
||
Comment on attachment 9239723 [details]
Bug 1729254 - Fix address book initialized by autoconfig prefs. r=darktrojan
[Triage Comment]
Approved for esr91
Comment 14•3 years ago
|
||
bugherder uplift |
Thunderbird 91.1.1:
https://hg.mozilla.org/releases/comm-esr91/rev/97c3a17659fd
Description
•