Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.49k stars 266 forks source link

app crashes while open database #1111

Closed Micha-Btz closed 2 years ago

Micha-Btz commented 2 years ago

Hey, on my LOS 18.1 Pixel 5 the app crashes while open the database. [09-14 14:16:30.312 9442:24302 D/UriUtil]

Check URI permission : UriPermission {uri=content://com.android.externalstorage.documents/document/primary%3Asyncthing%2Ffiles%2Fsysiphus.kdbx, modeFlags=3, persistedTime=1624715955190}

[09-14 14:16:30.330 1759:1847 W/system_server]
Insufficient pre-allocated space to mmap vdex.

[09-14 14:16:30.355 5104:5104 I/GoogleInputMethodService]
GoogleInputMethodService.onFinishInput():3446

[09-14 14:16:30.356 5104:5104 I/GoogleInputMethodService]
GoogleInputMethodService.onStartInput():2028

[09-14 14:16:30.356 24308:24331 E/DatabaseUtils]
Writing exception to parcel
java.lang.SecurityException: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary%3Akeepass%2Fkeepassxc-file from pid=9442, uid=10208 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:820)
at com.android.externalstorage.ExternalStorageProvider.enforceReadPermissionInner(ExternalStorageProvider.java:147)
at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:684)
at android.content.ContentProvider$Transport.query(ContentProvider.java:239)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:106)
at android.os.Binder.execTransactInternal(Binder.java:1154)
at android.os.Binder.execTransact(Binder.java:1123)

[09-14 14:16:30.356 9442:9442 W/DocumentFile]
Failed query: java.lang.SecurityException: Permission Denial: reading com.android.externalstorage.ExternalStorageProvider uri content://com.android.externalstorage.documents/document/primary%3Akeepass%2Fkeepassxc-file from pid=9442, uid=10208 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs

[09-14 14:16:30.357 5104:5104 I/DeviceUnlockedTag]
DeviceUnlockedTag.notifyDeviceLockStatusChanged():38 Notify device unlocked.

[09-14 14:16:30.357 5104:5104 E/IncognitoEntryAccessPointProvider]
IncognitoEntryAccessPointProvider.onAccessPointsClosed():81 onAccessPointsClosed is called when incognitoModeEnabled=true, accessPointsShowing=false.

Version 3.0 from fdroid. I have Root Explorer and the file explorer delivered with los installed. Tested restore from backup Version 2.10.5 is the last working for me.

Android (please complete the following information):

J-Jamet commented 2 years ago

The java.lang.SecurityException: Permission Denial exception should not cause the app to crash but just display an error, what I find odd is that I did not receive a crash report for this issue on the Play Store.

Do you use a key file for your database?

Can you describe when exactly the crash occurs (e.g. when the "Open" button is pressed or when the database is selected in the history list)?

Linked to #1066 #1067 #1071 #1094 https://github.com/Kunzisoft/KeePassDX/issues/1096

Micha-Btz commented 2 years ago

Yes, I use a key file and you are right, the app itself didn't crash, it shows a permission denied.

Maybe an problem just with an updated app. A clean install from fdroid works. Strange.

Or i did a mistake, hm will close this.

J-Jamet commented 2 years ago

Okay, that's because there was a bug fixed, just reselecting your files in the stable version 3.0.0 solves the problem.