Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgrammingError at signup for paid subscription in desktop client #4559

Closed
armhub opened this issue Sep 6, 2022 · 1 comment · Fixed by #4562
Closed

ProgrammingError at signup for paid subscription in desktop client #4559

armhub opened this issue Sep 6, 2022 · 1 comment · Fixed by #4562
Labels
bug broken functionality, usability problems, unexpected errors state:done meets our definition of done state:tested We tested it and are about to release it
Milestone

Comments

@armhub
Copy link
Contributor

armhub commented Sep 6, 2022

Reproduced in Linux desktop and Android clients:

  1. Sign up in desktop client for a paid account with paypal as payment method
  2. Click on the "Buy" button as last step
    -> Feedback v3.100.0 - ProgrammingError - UNKNOWN - linux (error might be only shortly visible before switching to login view or stay)

The error is also reproducible in the previous version. The error does neither occur in the web client nor when signing up for a Free account. It looks like we try to access the local storage although it is not initialized yet. It could be related to the background login for saving the payment data or receiving a websocket event while the local storage is not initialized (any more). This is the call stack:

Client: linux
Type: UNKNOWN
Tutanota version: 3.100.0
Timestamp (UTC): Tue, 06 Sep 2022 09:33:55 GMT
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) tutanota-desktop-test/3.100.0 Chrome/102.0.5005.167 Electron/19.0.14 Safari/537.36
ProgrammingError
Error message: Cache storage is not initialized
Stacktrace:
ProgrammingError: Cache storage is not initialized
at get inner [as inner] (asset://app/worker.js:12:136392)
at Sl.getLastUpdateTime (asset://app/worker.js:12:137260)
at asset://app/common-d62b1623.js:1:12805
at Object.handleMessage (asset://app/common-d62b1623.js:1:16295)
at asset://app/common-d62b1623.js:1:15548
at _worker.onmessage (asset://app/common-d62b1623.js:1:15117)

@armhub armhub added the bug broken functionality, usability problems, unexpected errors label Sep 6, 2022
@charlag
Copy link
Contributor

charlag commented Sep 7, 2022

happens here

const lastUpdate = await this.cacheStorage!.getLastUpdateTime()

charlag added a commit that referenced this issue Sep 7, 2022
The first issue is attempting to get last update time in
OfflineIndicatorViewModel. It was trying to wait for partial login but
unfortunately temporary login is also partial login.

We didn't want to just return null in this case as it might get
interpreted incorrectly and instead we returned a sum type with the
exact case and ignore uninitialized storage in this case.

The other issue was with LoginController and LoginListener not properly
resetting themselves on logout (e.g. after temporary login) and giving
incorrect results.

The third issue was with PostLoginActions initializing MailModel for
temporary login. If a real login into another account is attempted
afterwards it would lead to more errors.

To fully solve the problem we should rethink how temporary login affects
the rest of the app and perhaps skip most of the things that happen
during normal login.

fix #4559
@vitoreiji vitoreiji assigned charlag and vitoreiji and unassigned charlag and vitoreiji Sep 8, 2022
@charlag charlag added the state:done meets our definition of done label Sep 14, 2022
@charlag charlag added this to the 3.100.1 milestone Sep 15, 2022
@charlag charlag removed their assignment Sep 15, 2022
charlag added a commit that referenced this issue Sep 16, 2022
The first issue is attempting to get last update time in
OfflineIndicatorViewModel. It was trying to wait for partial login but
unfortunately temporary login is also partial login.

We didn't want to just return null in this case as it might get
interpreted incorrectly and instead we returned a sum type with the
exact case and ignore uninitialized storage in this case.

The other issue was with LoginController and LoginListener not properly
resetting themselves on logout (e.g. after temporary login) and giving
incorrect results.

The third issue was with PostLoginActions initializing MailModel for
temporary login. If a real login into another account is attempted
afterwards it would lead to more errors.

To fully solve the problem we should rethink how temporary login affects
the rest of the app and perhaps skip most of the things that happen
during normal login.

fix #4559
@vitoreiji vitoreiji self-assigned this Sep 20, 2022
@vitoreiji vitoreiji added the state:tested We tested it and are about to release it label Sep 20, 2022
@vitoreiji vitoreiji removed their assignment Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug broken functionality, usability problems, unexpected errors state:done meets our definition of done state:tested We tested it and are about to release it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants