Closed Bug 1695297 Opened 5 years ago Closed 5 years ago

messenger.contacts.quickSearch fails if it finds a maillist (Add-ons API)

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(thunderbird_esr78 wontfix, thunderbird88 affected)

RESOLVED FIXED
88 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird88 --- affected

People

(Reporter: G.Gersdorf, Assigned: TbSync)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

  • In addressbook create a maillist (e.g. 'aList')
  • Debug an add-on (e.g. 'Simple Mail Redirect') with the addressBooks permission
  • In the debugger window enter
    await messenger.contacts.quickSearch(null, 'aList');

Actual results:

NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAbDirSearchListener.onSearchFoundCard] 3 AddrBookDirectory.jsm:716
search resource:///modules/AddrBookDirectory.jsm:716
quickSearch chrome://messenger/content/parent/ext-addressBook.js:559
quickSearch chrome://messenger/content/parent/ext-addressBook.js:558
quickSearch self-hosted:844
result resource://gre/modules/ExtensionParent.jsm:996
withPendingBrowser resource://gre/modules/ExtensionParent.jsm:602
result resource://gre/modules/ExtensionParent.jsm:996
callAndLog resource://gre/modules/ExtensionParent.jsm:958
recvAPICall resource://gre/modules/ExtensionParent.jsm:995
AsyncFunctionNext self-hosted:693
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIAbDirSearchListener.onSearchFoundCard]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource:///modules/AddrBookDirectory.jsm :: search :: line 716" data: no] AddrBookDirectory.jsm:716:16
search resource:///modules/AddrBookDirectory.jsm:716
quickSearch chrome://messenger/content/parent/ext-addressBook.js:559
quickSearch chrome://messenger/content/parent/ext-addressBook.js:558
quickSearch self-hosted:844
result resource://gre/modules/ExtensionParent.jsm:996
withPendingBrowser resource://gre/modules/ExtensionParent.jsm:602
result resource://gre/modules/ExtensionParent.jsm:996
callAndLog resource://gre/modules/ExtensionParent.jsm:958
recvAPICall resource://gre/modules/ExtensionParent.jsm:995
AsyncFunctionNext self-hosted:693
Uncaught (in promise) Error: An unexpected error occurred undefined

Expected results:

return an array of contacts, probably empty

Hallo Günter, dankeschön!
From your well-formed description, looks like a bug...
I've cc'ed John and Geoff for more insight.

Component: Untriaged → Add-Ons: Extensions API
Summary: messenger.contacts.quickSearch fails if it finds a maillist → messenger.contacts.quickSearch fails if it finds a maillist (Add-ons API)

Bug 1645361 is similar.

See Also: → 1645361
Status: UNCONFIRMED → NEW
Ever confirmed: true

addressBookCache.findContactById(contact.UID, book) fails when the contact is a mailing list card.

@Geoff: What is the expected behavior, skip mailing list contacts?

Flags: needinfo?(geoff)
Flags: needinfo?(geoff)
Assignee: nobody → john
Status: NEW → ASSIGNED
Target Milestone: --- → 88 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/fdd04a886ee5
contacts.quickSearch should return only contacts. r=darktrojan

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

Comment on attachment 9207251 [details]
Bug 1695297 - contacts.quickSearch should return only contacts. r=darktrojan

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky):
I am evaluating.

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

Attachment

General

Created:
Updated:
Size: