Search Refresh Bugs

Hi,

Expected Result

Entering a search string into the popup’s search box displays matching results below.

Actual Result

When typing into the search box, typed-in characters will often disappear after they are entered, resulting in an almost unusable search function unless one types incredibly slowly. Additionally, this appearing-disappearing will sometimes get caught in an endless loop that continues even when closing and re-opening the pop-up. See here for an example of this (I had stopped typing).

There is no console output with the logging level set to debugging.

Versions

This has been happening to me ever since KeeFox became Kee, so across quite a few versions. My current Kee version is 3.6.27, on Firefox 84.0.2 (and using a KeePass 2.45 database with KeePassRPC 1.14.0.0 on Ubuntu 20.10).

Steps to Reproduce

I’ve not been able to identify the steps to reproduce the issue yet.

Additional Notes

Based on the fact that this never happened with KeeFox, which IIRC didn’t attempt to search for entries until you finished typing, I assume the live-search function in Kee is the culprit.

I will update this post if I identify how to trigger the issue.

Thanks for posting your findings so far. I have a distant memory of seeing something similar when developing a change to Kee around 18 months ago but could never identify any feasible cause within Kee itself. Since the problem was so fleeting and illogical, I thought the most likely explanation is a bug in the Firefox extensions messaging code or one of the hundreds of bugs that occur when a Firefox update has been downloaded in the background and is pending a restart.

That doesn’t definitively mean that there isn’t something Kee could do differently to reduce the chance of it happening but it’s been so long since I came across the issue that I’ll definitely need some more information about how to reproduce the problem before being able to spend more time investigating.

On the off-chance that you’re motivated and capable to go into more technical detail than I have been able to, my least-worst hypothesis is that the Firefox messaging API between the Kee popup and WebExtensions background process is resending a message occasionally (this could cause the state of the Kee popup to get out of sync). I’m rather clutching at straws though without much deeper knowledge of how Firefox works internally.