LDAP lookup during address autocomplete not working (TB 68) - 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAbDirectoryQuery.doQuery] nsAbLDAPAutoCompleteSearch.js:261
Categories
(MailNews Core :: LDAP Integration, defect, P1)
Tracking
(Not tracked)
People
(Reporter: jorgk-bmo, Assigned: aleca)
References
(Regression)
Details
(Keywords: regression)
Preparation:
Configure an LDAP server:
Options, Composition, Addressing:
Click "Directory Server", Edit Directories, and Add "Adams":
Name: Adams, Hostname: ldap.adams.edu, Base DN: ou=people,dc=adams,dc=edu
One can now go to the address book, click on Adams on the left, and search for Alvarez. "Alvarez, Leslie" comes up. Close the address book.
STR:
Open a Write window. Enter Alvarez as address. It's not found. On the error console we get:
NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAbDirectoryQuery.doQuery] nsAbLDAPAutoCompleteSearch.js:261
I asked Alice to look at it and Alice reported it working on TB 68 and TB 70. But we had a prior report in bug 1574248 comment #4.
Reporter | ||
Comment 1•5 years ago
|
||
Fails for me on TB 68 and 69. I'll try a new profile.
Comment 2•5 years ago
|
||
After adding Directory Server, I should select "Adams" in dropdown of "Directory Server:"
Then, I can reproduce the issue.
Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=d33c9556acd4b06908a89c36fbe15c2e7b6398a9&tochange=87de40d001ca77e92342b9f1e6b5fc1f98fc4c45
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7e40e33da3da2640e965a153254594a234231f76&tochange=7e40e33da3da2640e965a153254594a234231f76
Reporter | ||
Comment 3•5 years ago
|
||
Thank you so much, Alice!!
Alex, looks like you broke this, too :-(
We can't ship TB 68 with this regression since enterprise users are using LDAP. Not being able to enter recipients from a corporate address book is a killer.
Reporter | ||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
It works again in Tb70.0a1, if about:config manually set
ldap_2.autoComplete.directoryServer = "ldap_2.servers.Adams"
instead of
ldap_2.autoComplete.directoryServer = "moz-abldapdirectory://ldap_2.servers.Adams"
Comment 5•5 years ago
|
||
So I suppose the part that is not working is that if you edit/add a new directory, the saved pref is wrong?
Looking at the changes and existing code, perhaps related to "dirPrefId"? But couldn't see how, and perhaps value="dirPrefId" is dead code?
Comment 6•5 years ago
|
||
After add LDAP server and select "Adams" in the dropdown of "Directory Server:".
DOM and prefs.js comparison before and after Bug 1534913.
Before Bug 1534913:
<menulist xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="directoriesList" flex="1" aria-labelledby="autocompleteLDAP" preference="ldap_2.autoComplete.directoryServer" value="ldap_2.servers.Adams" label="Adams">
<hbox class="menulist-label-box" flex="1" role="none">
<image class="menulist-icon" role="none"/>
<label class="menulist-label" crop="right" flex="1" role="none" value="Adams"/>
<label class="menulist-highlightable-label" crop="right" flex="1" role="none">Adams</label>
</hbox>
<dropmarker class="menulist-dropmarker" type="menu" role="none"><image class="dropmarker-icon"/></dropmarker>
<menupopup id="directoriesListPopup" class="addrbooksPopup" none="None" remoteonly="true" value="dirPrefId" hasbeenopened="true">
<menuitem label="None" value="" class="menuitem-iconic abMenuItem" IsNone="true"/>
<menuitem label="Adams" value="ldap_2.servers.Adams" class="menuitem-iconic abMenuItem" AddrBook="true" IsRemote="true" selected="true"/>
</menupopup>
</menulist>
user_pref("ldap_2.autoComplete.directoryServer", "ldap_2.servers.Adams");
user_pref("ldap_2.autoComplete.useDirectory", true);
user_pref("ldap_2.servers.Adams.auth.dn", "");
user_pref("ldap_2.servers.Adams.auth.saslmech", "");
user_pref("ldap_2.servers.Adams.description", "Adams");
user_pref("ldap_2.servers.Adams.filename", "ldap.mab");
user_pref("ldap_2.servers.Adams.maxHits", 100);
user_pref("ldap_2.servers.Adams.uri", "ldap://ldap.adams.edu/ou=people,dc=adams,dc=edu??sub?(objectclass=*)");
After Bug 1534913:
<menulist xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" is="menulist-addrbooks" id="directoriesList" aria-labelledby="autocompleteLDAP" preference="ldap_2.autoComplete.directoryServer" none="None" remoteonly="true" flex="1" value="moz-abldapdirectory://ldap_2.servers.Adams" label="Adams">
<hbox class="menulist-label-box" flex="1" role="none">
<image class="menulist-icon" role="none"/>
<label class="menulist-label" crop="right" flex="1" role="none" value="Adams"/>
<label class="menulist-highlightable-label" crop="right" flex="1" role="none">Adams</label>
</hbox>
<dropmarker class="menulist-dropmarker" type="menu" role="none">
<image class="dropmarker-icon"/>
</dropmarker>
<menupopup hasbeenopened="true">
<menuitem label="None" value="" class="menuitem-iconic abMenuItem" IsNone="true"/>
<menuitem label="Adams" value="moz-abldapdirectory://ldap_2.servers.Adams" class="menuitem-iconic abMenuItem" AddrBook="true" IsRemote="true" selected="true"/>
</menupopup>
</menulist>
user_pref("ldap_2.autoComplete.directoryServer", "moz-abldapdirectory://ldap_2.servers.Adams");
user_pref("ldap_2.autoComplete.useDirectory", true);
user_pref("ldap_2.servers.Adams.auth.dn", "");
user_pref("ldap_2.servers.Adams.auth.saslmech", "");
user_pref("ldap_2.servers.Adams.description", "Adams");
user_pref("ldap_2.servers.Adams.filename", "ldap.mab");
user_pref("ldap_2.servers.Adams.maxHits", 100);
user_pref("ldap_2.servers.Adams.uri", "ldap://ldap.adams.edu/ou=people,dc=adams,dc=edu??sub?(objectclass=*)");
Reporter | ||
Comment 7•5 years ago
|
||
Thanks for looking into this further. Yes, removing moz-abldapdirectory:// from pref ldap_2.autoComplete.directoryServer makes the auto-complete work again. Then of course you lose the value in the UI, like in bug 1574590. So "de-selected" actually means working since then the pref has the right value.
It must have gone wrong somewhere in https://hg.mozilla.org/comm-central/rev/0b4ea11f26f8983529311b4f728753eb31868395 so that the menulist values now have the scheme moz-abldapdirectory:// in them when they shouldn't. We also see this in the DOM comparison: Before: value="ldap_2.servers.Adams", after: value="moz-abldapdirectory://ldap_2.servers.Adams".
I think there bug is here:
https://hg.mozilla.org/comm-central/rev/0b4ea11f26f8983529311b4f728753eb31868395#l11.157
new: let listItem = this.appendItem(ab.dirName, ab.URI);
https://hg.mozilla.org/comm-central/rev/0b4ea11f26f8983529311b4f728753eb31868395#l15.109
old: let listItem = menulist.appendItem(ab.dirName, ab[value]);
Reporter | ||
Comment 8•5 years ago
|
||
BTW, the default startup directory also doesn't show properly in the UI.
Reporter | ||
Comment 9•5 years ago
|
||
For the record: Taking moz-abldapdirectory:// out of the pref value fixes the auto-complete and the search in the address book still works.
I considered backing out bug 1542711, but then bug 1549257 (2 changesets), bug 1560751 and bug 1563931 would have to be backed out, too. Anyway, the latter ones come out cleanly, but bug 1542711 itself doesn't since it touches too many files, including some changed in bug 1498332. So going forward is better than going backward here.
Assignee | ||
Comment 10•5 years ago
|
||
100% my fault.
I uploaded a patch for bug 1574590 that should fix also this one.
I also started a try run here: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=93bf219a8ac27c4bfcbb550d3be100181a9bed8b
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 11•5 years ago
|
||
Will be fixed by bug 1574590. Let's close this one not to carry two bugs around.
Description
•