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

[offline] database is not closed if you only do partial login #4116

Closed
johnbotris opened this issue May 10, 2022 · 1 comment
Closed

[offline] database is not closed if you only do partial login #4116

johnbotris opened this issue May 10, 2022 · 1 comment
Labels
dev bug unpublished bugs, found during our development/test cycle (excluded from release notes) state:tested We tested it and are about to release it
Milestone

Comments

@johnbotris
Copy link
Contributor

to reproduce

  • do offline login
  • logout without going online
  • see that the database hasn't been closed*

* try deleting credentials from the login screen - it will fail due to an existing database connection being open


the database should be closed at logout with this basic chain of events:

WindowFacade.reload -> NativeSystemApp.reloadNative -> ApplicationWindow.reload -> ApplicationWindow.closeDb -> OfflineDbFacade.closeDatabaseForUser

however closeDb only calls closeDatabaseForUser when _userInfo has been set on the ApplicationWindow. This currently only happens after we complete fulll login, when we set up push identifiers (see the "getPushIdentifier" case in IPC._invokeMethod).

We need to make sure the user info is set in the native side even during partial login.

It may also be problematic to rely on the db being closed in the native part here as well, we might want to have an explicit call in the web part, since we might have to take care of this in Android and iOS too? (just a thought)

@johnbotris johnbotris added the dev bug unpublished bugs, found during our development/test cycle (excluded from release notes) label May 10, 2022
johnbotris added a commit that referenced this issue May 10, 2022
johnbotris added a commit that referenced this issue May 10, 2022
@johnbotris johnbotris added this to the Offline login milestone May 13, 2022
@johnbotris
Copy link
Contributor Author

johnbotris commented May 16, 2022

Test notes

  • follow reproduction steps, it works as expected

ganthern pushed a commit that referenced this issue May 17, 2022
@ganthern ganthern added the state:tested We tested it and are about to release it label May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev bug unpublished bugs, found during our development/test cycle (excluded from release notes) state:tested We tested it and are about to release it
Projects
None yet
Development

No branches or pull requests

2 participants