tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6.02k stars 518 forks source link

Can't search while offline #6305

Open murilopereirame opened 9 months ago

murilopereirame commented 9 months ago

Describe the bug When you create the search index online, log out, log in again and try to search for some email the app asks you to enable the search feature and create the search index. Don't matter how many times you confirm the dialog it will not execute the search

To Reproduce Steps to reproduce the behavior:

  1. Log in saving credentials
  2. Try to search for something to create the search index
  3. Go offline
  4. Logout
  5. Log in again with the same account
  6. Try to search
  7. See the problem

Expected behavior The user is able to search while offline

rezbyte commented 6 months ago

Fixing this requires initializing the Indexer during partial login, which is not currently possible as the userGroupKey needed to encrypt and decrypt the userEncDbKey is only available during full login. As partial login but not full login occurs during offline usage, searching while offline is not possible yet. The solution involves a near total rewrite (according to @ganthern) of the Indexer which I will need to study deeper how it works first.

ganthern commented 5 months ago

this currently seems to still be an issue on mobile even with the mitigation in 457a1fd98863220ff13d05b553eef5a0a163db58