Closed Bug 1711558 Opened 4 years ago Closed 4 years ago

Global search is triggered prematurely by just typing search words into Quick Filter [involving Add-on: CardBook]

Categories

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

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: helder, Unassigned)

References

()

Details

(Whiteboard: [Addon: CardBook][dupetome])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

On Thunderbird 78.8.0 I start filtering messages (ctrl-shift-k) but, as I'm typing, Thunderbird does a global search (ctrl-k) - sometimes not even letting me finish writing the filter word. To me this is a recent behavior I can reproduce this on Debian testing and windows (in three different machines and also using different accounts, however these three machines connect to two cyrus servers).

I have these gifs to illustrate the problem:

https://i.imgur.com/lkhHGmf.gif
https://i.imgur.com/HxMZVCr.gif

Actual results:

As soon as the keyword I'm typing on the message filter (ctrl-shift-k) returns an empty result thunderbird does a global search with the keyword I've used.

Expected results:

If the filter returns no results and empty result list should be displayed. Only if I type "Enter" should the global search be made.

wfm on 78.10.1 (32-bit)

Helder, can you try with ≡ > Help > Restart with Addons Disabled…?

Flags: needinfo?(helder)
Whiteboard: [Addon?]

(In reply to Thomas D. (:thomas8) from comment #1)

Helder, can you try with ≡ > Help > Restart with Addons Disabled…?

I did as asked and the problem went away. Next I tried removing each of the addons in turn (had to restart Thunderbird, just disabling was not enough), the culprit was CardBook.

Thank you for your suggestion!

I'm closing this ticket.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(helder)
Resolution: --- → INVALID

Thanks Helder for reporting back!
I've filed this as a bug against CardBook:
https://gitlab.com/CardBook/CardBook/-/issues/1259
You can try to assist the addon author there to nail this down by providing CardBook Log and TB Error Console outputs if any.

What's your CardBook version? Is it updated?

Summary: Global searching being triggered from the "filter search" → Global search is triggered prematurely by just typing search words into Quick Filter [caused by Add-on: CardBook]
Whiteboard: [Addon?] → [Addon: CardBook]

I've filed this as a bug against CardBook

Nice, I was going to report that myself. I'll add what I have.

What's your CardBook version? Is it updated?

It was 58.9, I've updated to 59.0 but the behaviour is the same.

I've learned that a bug which only occurs with an add-on can still be a bug in Thunderbird's add-on API.

John, CardBook seems to hook into the Quick Filter somehow, then in the middle of typing a quick filter search it will suddenly go to global search (which should normally only happen when there are no results and user presses Enter again to go to global search).

Anything which springs to mind where our API might be involved in this unwanted behaviour?

I have already filed this against the add-on:
https://gitlab.com/CardBook/CardBook/-/issues/1259

Component: Untriaged → Add-Ons: Extensions API
Flags: needinfo?(john)
Summary: Global search is triggered prematurely by just typing search words into Quick Filter [caused by Add-on: CardBook] → Global search is triggered prematurely by just typing search words into Quick Filter [involving Add-on: CardBook]

Hi Thomas, whenever an add-on is using one of the WebExtension APIs provided by Thunderbird and something goes wrong, this is a bug in Thunderbird. Using WebExtension APIs should actually make sure, that an add-on cannot break Thunderbird.

On the other hand, we still have a lot of add-ons, which use "legacy" code which they load from Experiment APIs shipped with their add-ons. If those Experiment APIs do stuff that break Thunderbird, it is the add-ons fault. It is not always easy to see which is which. The simple case is: The add-on does not include Experiments and something breaks -> bug in Thunderbird. If it does include Experiments, it needs a full stack trace to see where the error happens. The stack trace provide in the GitLab bug is too short, to see anything. But from my own experience with CardBook, I think the developer is not yet using any WebExtension API which is related to that area (which would be https://webextension-api.thunderbird.net/en/latest/mailTabs.html).

I think closing this is fine. I will check with the author of CardBook if we can find out what is going on.

Flags: needinfo?(john)

(In reply to John Bieling (:TbSync) from comment #6)
Awesome. Thanks much John for the explanation and following up on the matter!

See Also: → 1712343
See Also: → 1712273
Whiteboard: [Addon: CardBook] → [Addon: CardBook][dupetome]
You need to log in before you can comment on or make changes to this bug.