Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

TypeError: browser.addressBooks.quickSearch is not a function

  • 1 reply
  • 1 has this problem
  • 4 views
  • Last reply by Matt

more options

Trying to write an add-on, one of the things it needs to do is scan through the address book looking for a contact with a specified phone number.

The API documentation says I can do this with .quickSearch([parentId], queryInfo)

Here's my code:

/* ---------------- */ let r = browser.addressBooks.quickSearch("5551112222"); console.log(r); /* ---------------- */

Expected output should be a list of contacts matching that string, but instead the console just outputs "uncaught exception: Object"

If I try manually typing:

   browser.addressBooks.quickSearch("5551112222")

....into the console, the console's predictive typing analysis pre-fills the output line with:

   "TypeError: browser.addressBooks.quickSearch is not a function"

Have I made a mistake in my code somewhere, or is the documentation wrong?

EDIT: I've also tried with:

   browser.addressBooks.quickSearch({searchString: '5551112222'})

...but that just produces the same result.

Trying to write an add-on, one of the things it needs to do is scan through the address book looking for a contact with a specified phone number. The API documentation says I can do this with .quickSearch([parentId], queryInfo) Here's my code: /* ---------------- */ let r = browser.addressBooks.quickSearch("5551112222"); console.log(r); /* ---------------- */ Expected output should be a list of contacts matching that string, but instead the console just outputs "uncaught exception: Object" If I try manually typing: browser.addressBooks.quickSearch("5551112222") ....into the console, the console's predictive typing analysis pre-fills the output line with: "TypeError: browser.addressBooks.quickSearch is not a function" Have I made a mistake in my code somewhere, or is the documentation wrong? EDIT: I've also tried with: browser.addressBooks.quickSearch({searchString: '5551112222'}) ...but that just produces the same result.

Modified by scott144

All Replies (1)

more options

As you have now been advised this is not a support forum for addon development. Please do not post further questions about development issues in this forum.

Addon development support/discussion is managed through topicbox. https://thunderbird.topicbox.com/groups/addons