Closed Bug 1674781 Opened 5 years ago Closed 5 years ago

An NS_ERROR_UNEXPECTED exception is always thrown while searching in any address book into the "Advanced Address Book Search" dialog

Categories

(Thunderbird :: Address Book, defect)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1668147

People

(Reporter: cmgaudry33, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36

Steps to reproduce:

  • Display the "Advanced Address Book Search" dialog.
  • Select any address book.
  • Enter a search criteria
  • Perform the search

Actual results:

The following exception is always thrown without any result :

	NS_ERROR_UNEXPECTED: Unexpected uri: jsaddrbook://abook-<ADDRESS_BOOK_NUMBER>.sqlite?(and(DisplayName,c,<SEARCH_CRITERIA>))
		init resource:///modules/AddrBookDirectory.jsm:145
		createDirectoryObject resource:///modules/AddrBookManager.jsm:120
		getDirectory resource:///modules/AddrBookManager.jsm:280
		GetDirectoryFromURI chrome://messenger/content/addressbook/abCommon.js:998
		SetAbView chrome://messenger/content/addressbook/abResultsPane.js:84
		onSearch chrome://messenger/content/addressbook/abSearchDialog.js:337
		onSearchButton chrome://messenger/content/addressbook/abSearchDialog.js:343
		oncommand chrome://messenger/content/addressbook/abSearchDialog.xhtml:1

Expected results:

No exception

Pay attention to the patch file, it contains CRLFs instead of LF.

Flags: needinfo?(chris.m.gaudry)
Flags: needinfo?(chris.m.gaudry)

Bug 1668147 likely fixed it. Can you test 78.4.1 when that's out (soon).

I confirm that it is fixed in 78.4.1.

Attachment #9185171 - Attachment is patch: true
Attachment #9185171 - Attachment mime type: text/x-patch → text/plain
Comment on attachment 9185171 [details] [diff] [review] thunderbird_78.4.0_abSearchDialog.js.patch Review of attachment 9185171 [details] [diff] [review]: ----------------------------------------------------------------- Chris, thank you for providing this patch, which was fixing the right spot in the right way code-wise. Nice work! You'll find that the patch on Bug 1668147 (https://phabricator.services.mozilla.com/D91884) also includes your fix in a slight variation. Which unfortunately makes your bug a duplicate of that. ::: comm/mail/components/addrbook/content/abSearchDialog.js @@ +186,5 @@ > > gSearchSession.addDirectoryScopeTerm(GetScopeForDirectoryURI(currentAbURI)); > saveSearchTerms(gSearchSession.searchTerms, gSearchSession); > > + var searchQuery = "?("; We use let for any variables inside functions. Nice renaming of the variable.
Attachment #9185171 - Flags: feedback+

ni?Chris (FYI)

To avoid creating patches for bugs which others have already fixed (or are in the process of fixing):

  • Check if a bug for your problem already exists:
  • Ensure that you're using the "Thunderbird Daily" release channel for fixing bugs. You can still use your preferred method. Note that your patches must apply to "Trunk" (almost same as Daily) anyway.
    • Download Daily from here: https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/
    • Install separately with a separate test profile (should do that automatically) - don't use important production data with Daily.
    • Adjust your Daily start link like this:
      "...\thunderbird.exe" -no-remote -purgecaches -devtools -allow-downgrade
    • Switch off automatic upgrading so that it doesn't get in the way, and decline upgrade requests until you're ready for them.
      ≡ > Options > search for "Updates" > (o) Check for Updates, but let me choose whether to install them.
Flags: needinfo?(chris.m.gaudry)

Resolved duplicate per reporter's comment 3 and per patch content.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Sorry for the inconvenience but I get paid to work on the latest French release.
I will try to format my patch for the daily US version. But I can't really test it which it doesn't really suit me.

Flags: needinfo?(chris.m.gaudry)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: