Keepass2android: Cannot open Keepass with no connection (e.g. flight mode) - database stored in onedrive

Created on 29 Apr 2019  Â·  16Comments  Â·  Source: PhilippC/keepass2android

When in airplane mode or with no signal, it is possible to get to a situation with a permanent spinning loading wheel with no way to fix until you get signal again.

I cleared the app data and started fresh and found that the behaviour when cannot sync has change and does seem better (i.e. don't need to explicitly open a backup), however presumably this expires after some time or is unreliable, as in airplane mode I would expect the same behaviour. This is using onedrive logged in via keepass2android.

Most helpful comment

Should be fixed now. Please switch to beta and install 1.07b-pre2 (just published to beta, see https://play.google.com/apps/testing/keepass2android.keepass2android). Please click "Change database" (on the password screen), then "Open database", "One Drive", "All files and shared files" (or something else if appropriate) and browse to your file again. This will then use the new implementation. (If you don't re-open the database like this, the old implementation will be used).
Please re-open (or comment) if the issue persists for some reason.

All 16 comments

Did you set database caching to true in the settings? If not, try it.

Did you set database caching to true in the settings? If not, try it.

Hi, it is enabled by default and I have checked it is enabled.

I believe I have just worked out the cause. If you "clear junk files" i.e. cache via google files app, this flushes the cached copy, but Keepass isnt programmed to handle this, and just hangs indefinitely.

edit: still doesn't seem to be a sure thing, i can go out, get connection, open the database, close it, come back inside with no signal, and face the indefinite spinning loading...

I have the same problem using version 1.07-r1 with kdbx file stored in OneDrive

I think my problem is related. My Keepass2Android will not open anymore. It hangs immediately. Have tried closing app, force stopping app, reinstalling app. It simply refuses to start, it freezes with a blank white screen when you try to start it. I am pretty sure this started after i did an automated "clean up" because of low storage on my phone. I host my kdbx file on OneDrive also.

I tried to send my kdbx file from OneDrive to KP2A. This promptly froze both applications completely. I simply don't know what to do, apart from installing another app instead.

Edit: I let the application sit in the hanged state for some time, and after some 15 minutes it finally started up, and now seems to be working ok. During this time I synced the OneDrive kdbx file to my phone. I don't know if this affected the process.

I have the same problem.
Scenario: Using the app with a cloud storage location as default location and having no internet connectoin at startup.
When opening the database while having no internet connection, the app first shows a white screen then the file selection screen and then hangs with a permanent spinning loading wheel. Also connecting to the internet while the app is "loading" does not make it possible to log in. It is needed to close the app and reopen the app with an internet connection.

But: After opening the app with internet and successful getting to the "unlock database" screen, internet connection can be interrupted. It is then still possible to open the file (assuming a cached copy).

Version: 1.07-r1
Android version: 9
Password file: Cloud storage

I have the same issue on a Galaxy A3 2017 with Android 8.0. The database is stored on Onedrive. Caching is enabled. When I start Keepass without internet connection it immediatly hangs on a white screen with a spinning loading circle. Even before the password entry screen. Clearing the cache didn't help. Is there any solution for that? For me it‘s very important to have access to my passwords at any time, even when I‘m offline.

Yes, this remains unsolved. Very irritating to have the app freeze on you, especially since when you need your passwords and sensitive personal data you are often in some kind of hurry.

Should be fixed now. Please switch to beta and install 1.07b-pre2 (just published to beta, see https://play.google.com/apps/testing/keepass2android.keepass2android). Please click "Change database" (on the password screen), then "Open database", "One Drive", "All files and shared files" (or something else if appropriate) and browse to your file again. This will then use the new implementation. (If you don't re-open the database like this, the old implementation will be used).
Please re-open (or comment) if the issue persists for some reason.

Works perfectly now. Thank you.

Thanks for the fix. It only seems to work if you tick "work on internal cache only", however before it used to work in read-only mode if you left it unticked.

@cjk28 did you re-select the database file ("Change database", "Open file") after upgrading?

@PhilippC yep, my path is "onedrive2_myfiles//......" - assume this means its the new implementation

hmm, I thought it should work then. What's happening if you try without the "work on internal cache" checked?

After I reselected the database it opens when I'm offline. But when I'm online I often get redirected to the microsoft login page, although I have already granted access. This happens after unlocking the database and only if the app was newly opened. Also without logging in again and just closing the window everything seems to be working.

(I am using the option OneDrive (My files))

@towadroid can you try to collect a log of this (with logcat or the built-in logging)?

@PhilippC This is the log file I got using the built-in logging


Log file

30/10/2019 14:06:12:947 -- AppSettingsActivity.OnPause
30/10/2019 14:06:12:994 -- PasswordActivity.OnStart
30/10/2019 14:06:12:995 -- PasswordActivity.OnResume
30/10/2019 14:06:12:995 -- DB null
30/10/2019 14:06:12:996 -- starting: True, Finishing: False, _performingLoad: False
30/10/2019 14:06:13:13 -- FP: Create FingerprintDecryption
30/10/2019 14:06:13:14 -- FP: Init for Dec
30/10/2019 14:06:13:58 -- FP: StartListening
30/10/2019 14:06:13:636 -- AppSettingsActivity.OnStop
30/10/2019 14:06:13:638 -- AppSettingsActivity.OnDestroyTrue
30/10/2019 14:06:14:604 -- FP: OnAuthenticationSucceeded
30/10/2019 14:06:14:604 -- FP: StopListening
30/10/2019 14:06:14:608 -- FP: Decrypting
30/10/2019 14:06:15:215 -- PasswordActivity.OnPause
30/10/2019 14:06:15:243 -- FSSA.OnCreate
30/10/2019 14:06:15:784 -- LockingActivity: OnActivityResult
30/10/2019 14:06:15:785 -- PasswordActivity.OnActivityResult 874348/1000
30/10/2019 14:06:15:797 -- PasswordActivity.OnResume
30/10/2019 14:06:15:797 -- DB null
30/10/2019 14:06:15:798 -- starting: False, Finishing: False, _performingLoad: True
30/10/2019 14:06:15:803 -- FP: Create FingerprintDecryption
30/10/2019 14:06:15:804 -- FP: Init for Dec
30/10/2019 14:06:15:834 -- FP: StartListening
30/10/2019 14:06:15:873 -- status message: Initializing...
30/10/2019 14:06:15:874 -- status submessage:
30/10/2019 14:06:15:911 -- status message: Loading database…
30/10/2019 14:06:15:918 -- CFS: OpenWhenNoLocalChanges
30/10/2019 14:06:15:918 -- CFS: hashing cached version
30/10/2019 14:06:16:65 -- found 80 in 81
30/10/2019 14:06:16:155 -- FP: StopListening
30/10/2019 14:06:16:156 -- PasswordActivity.OnPause
30/10/2019 14:06:16:171 -- FP: OnAuthenticationError: Fingerprint operation cancelled., True
30/10/2019 14:06:17:162 -- PasswordActivity.OnStop
30/10/2019 14:06:17:618 -- CFS: Files in Sync
30/10/2019 14:06:17:700 -- status submessage: Transforming master key…
30/10/2019 14:06:18:665 -- status submessage: Decoding database…
30/10/2019 14:06:18:670 -- status submessage: Decoding database…
30/10/2019 14:06:18:675 -- status submessage: Parsing database…
30/10/2019 14:06:18:792 -- ReadXmlStreamed: 115ms
30/10/2019 14:06:18:808 -- status submessage:
30/10/2019 14:06:18:813 -- status message: Updating local backup...
30/10/2019 14:06:18:843 -- LoadDB OK
30/10/2019 14:06:18:847 -- Starting/Updating OngoingNotificationsService. Database Unlocked
30/10/2019 14:06:18:962 -- PasswordActivity.OnDestroyTrue
30/10/2019 14:06:20:728 -- StackBaseActivity.OnActivityResult Ok/1
30/10/2019 14:06:20:729 -- No AppTask in OnActivityResult
30/10/2019 14:06:20:823 -- GroupActivity.OnCreate
30/10/2019 14:06:20:824 -- GroupActivity:apptask=
30/10/2019 14:06:20:826 -- Loaded task keepass2android.NullTask
30/10/2019 14:06:20:883 -- GroupActivity.OnStart
30/10/2019 14:06:20:885 -- GroupActivity.OnResume
30/10/2019 14:06:20:885 -- DatabaseIsUnlocked=True
30/10/2019 14:06:20:886 -- Timeout cancel
30/10/2019 14:06:26:271 -- Locking database
30/10/2019 14:06:26:291 -- OngoingNotificationsService.OnDestroy
30/10/2019 14:06:26:296 -- Finishing md5b85ab5ea2545156b0f09600c184a5178.GroupActivity due to database lock
30/10/2019 14:06:26:300 -- GroupActivity.OnPause
30/10/2019 14:06:26:313 -- StackBaseActivity.OnActivityResult 2/0
30/10/2019 14:06:26:313 -- TryGetFromActivityResult: no data
30/10/2019 14:06:26:346 -- FileSelect.OnCreate
30/10/2019 14:06:26:377 -- FileSelect.OnStart
30/10/2019 14:06:26:405 -- PasswordActivity.OnCreate
30/10/2019 14:06:26:406 -- PasswordActivity:apptask=
30/10/2019 14:06:26:465 -- PasswordActivity.OnStart
30/10/2019 14:06:26:468 -- PasswordActivity.OnResume
30/10/2019 14:06:26:468 -- DB null
30/10/2019 14:06:26:469 -- starting: True, Finishing: False, _performingLoad: False
30/10/2019 14:06:26:508 -- PasswordActivity.OnPause
30/10/2019 14:06:26:587 -- PasswordActivity.OnResume
30/10/2019 14:06:26:587 -- DB null
30/10/2019 14:06:26:587 -- starting: False, Finishing: False, _performingLoad: False
30/10/2019 14:06:26:589 -- FP: Create FingerprintDecryption
30/10/2019 14:06:26:590 -- FP: Init for Dec
30/10/2019 14:06:26:620 -- FP: StartListening
30/10/2019 14:06:26:761 -- found 80 in 81
30/10/2019 14:06:26:892 -- FileSelect.OnStop
30/10/2019 14:06:26:940 -- FileSelect.OnDestroyTrue
30/10/2019 14:06:26:942 -- GroupActivity.OnStop
30/10/2019 14:06:26:943 -- GroupActivity.OnDestroyTrue
30/10/2019 14:06:28:498 -- FP: StopListening
30/10/2019 14:06:28:500 -- PasswordActivity.OnPause
30/10/2019 14:06:28:518 -- FP: OnAuthenticationError: Fingerprint operation cancelled., True
30/10/2019 14:06:28:523 -- AppSettingsActivity.OnCreate
30/10/2019 14:06:28:524 -- AppSettingsActivity:apptask=
30/10/2019 14:06:28:569 -- AppSettingsActivity.OnStart
30/10/2019 14:06:28:570 -- AppSettingsActivity.OnResume
30/10/2019 14:06:28:570 -- DB null
30/10/2019 14:06:29:84 -- PasswordActivity.OnStop

Was this page helpful?
0 / 5 - 0 ratings