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.12k stars 528 forks source link

Unexpected error: Cannot login after updating to v244.240828.0 with paid offline account #7464

Open vaf-hub opened 3 months ago

vaf-hub commented 3 months ago
Feedback v244.240828.0 - Error - UNKNOWN - linux

 Client: linux
 Type: UNKNOWN
 Tutanota version: 244.240828.0
 Timestamp (UTC): Wed, 28 Aug 2024 13:08:14 GMT
 User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop-debug/244.240828.0 Chrome/126.0.6478.185 Electron/31.3.1 Safari/537.36
Error
 Error message: AssertNotNull failed : null
Stacktrace: 
Error: AssertNotNull failed : null
    at assertNotNull (asset://app/app.js:2041:11)
    at LoginController.getUserController (asset://app/app.js:152163:16)
    at ContactModel.entityEventsReceived (asset://app/app.js:171454:38)
    at asset://app/app.js:146757:19

Output in the console:

 LoginIncompleteError: Trying to do a network request with encrypted entity but is not fully logged in yet, type: UserSettingsGroupRoot
    at EntityRestClient._validateAndPrepareRestRequest (asset://app/worker.js:126417:17)
    at async EntityRestClient.load (asset://app/worker.js:126153:59)
    at async DefaultEntityRestCache.load (asset://app/worker.js:125653:26)

Describe the bug Cannot login with paid offline account after migration to tutanota model version 75.

To Reproduce Steps to reproduce the behavior:

  1. Login with an older desktop client using a paid account.
  2. Update the desktop client to the latest version.
  3. Log in again with the stored credentials.
  4. See error

Expected behavior The login should work.

Potential fixes

The UserSettingsGroupRoot are deleted in the migration and make the async offline login fail, because we do not wait for the login to complete before trying to load the instance.

We could just delete the User from the offline db and thus prevent the async login from being executed at all.

charlag commented 3 months ago

Is this fixed by #7463?