Closed Bug 1720917 Opened 4 years ago Closed 4 years ago

Javascript component does not have a method named: "getBinaryValues" when calling method: [nsILDAPMessage::getBinaryValues]

Categories

(MailNews Core :: LDAP Integration, defect)

Thunderbird 91
x86
Windows 7
defect

Tracking

(thunderbird_esr78 unaffected, thunderbird91 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird91 --- fixed

People

(Reporter: cmgaudry33, Assigned: rnons)

References

(Regression)

Details

Attachments

(2 files)

Hi,

I'm trying to migrate all my customization from Thunderbird 78 to Thunderbird 91 but I got an issue with the nsILDAPMessage::getBinaryValues method.
While processing the aMessage object, if I call the getBinaryValues I got the following exception :

17:20:41:490 [ERROR] [XXXXXXXXXX] [certFetchingStatusOverride.js] onLDAPMessage(?) throws exception [Exception... "JavaScript component does not have a method named: "getBinaryValues"'JavaScript component does not have a method named: "getBinaryValues"' when calling method: [nsILDAPMessage::getBinaryValues]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "JS frame :: chrome://messenger-smime/content/certFetchingStatus.js :: ldapMessageListener.prototype.onLDAPMessage :: line 288" data: no]
ldapMessageListener.prototype.onLDAPMessage@chrome://messenger-smime/content/certFetchingStatus.js:288:69
searchExt/this._messageId<@resource:///modules/LDAPOperation.jsm:76:26
_onData@resource:///modules/LDAPClient.jsm:169:17
fetchMissingCertificates@chrome://XXXXXXXXXX/content/messenger-smime/msgCompSecurityInfoOverlay.js:136:13
onLoad@chrome://XXXXXXXXXX/content/messenger-smime/msgCompSecurityInfoOverlay.js:52:2
onload@chrome://messenger-smime/content/msgCompSecurityInfo.xhtml:1:1
showMessageComposeSecurityStatus@chrome://messenger/content/messengercompose/MsgComposeCommands.js:1808:12
onSecurityChoice@chrome://messenger/content/messengercompose/MsgComposeCommands.js:4354:7
oncommand@chrome://messenger/content/messengercompose/messengercompose.xhtml:1:17

Some traces tell me that :

  • the aMessage object has the nsILDAPMessage interface ;
  • the aMessage object has a "userCertificate;binary" attribute (the only one) ;
  • the aMessage object has a function named "getBinaryValues" ;
    But when I call aMessage.getBinaryValues("userCertificate;binary") I get this exception.

My code is working great with Thunderbird 78.12.0 and 88.0b1, but not in 91.0b1.

After comparing some source code (into comm/ldap/xpcom), I really don't understand what is happening with this beta version.

Thanks in advance to have a look to this issue.

Regards,

Chris

Hi Chris, ldap was rewritten in JS in bug 1696625. I missed out the getBinaryValues function, will fix it this week.

Assignee: nobody → remotenonsense
Regressed by: ldap-js

Hi,

Thank you so much.

I saw all new modules and I think something is missing in the LDAPOperation.jsm module.

nsILDAPMessage.getBinaryValues can be used to get values of binary attributes.

Status: NEW → ASSIGNED
Target Milestone: --- → 92 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/79b547ca2cfa
Implement getBinaryValues in callback of searchExt in LDAPOperation.jsm. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Because AbLDAPAttributeMap.jsm uses lowercased attribute name to get attribute value.

Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/437d53fc8255 Return lowercased attribute name in searchExt in LDAPOperation.jsm. r=darktrojan

Comment on attachment 9232564 [details]
Bug 1720917 - Return lowercased attribute name in searchExt in LDAPOperation.jsm. r=darktrojan

[Approval Request Comment]
Request for uplifting two patches.
The first patch fixed a missing getBinaryValues interface. The second patch fixed LDAP attribute name, so that attributes are correctly mapped to address book contact properties.

Attachment #9232564 - Flags: approval-comm-beta?

Comment on attachment 9232564 [details]
Bug 1720917 - Return lowercased attribute name in searchExt in LDAPOperation.jsm. r=darktrojan

[Triage Comment]
Approved for beta

Attachment #9232564 - Flags: approval-comm-beta? → approval-comm-beta+
Depends on: 1722712
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: