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.55k stars 269 forks source link

Could not open remote Database using Material Files #1721

Open MarkusTieger opened 9 months ago

MarkusTieger commented 9 months ago

Describe the bug The Database could not been loaded on external file storage in Material Files.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Material Files'
  2. Click on your external file storage
  3. Click on the three dots next do your database file
  4. Click Open With
  5. Select KeePassDX
  6. The error should already appear in the logs

Expected behavior After entering the credentials the database should open. According to the wiki "Material Files" should work fine with KeepassDX -> https://github.com/Kunzisoft/KeePassDX/wiki/File-Manager-and-Sync#file-manager

KeePass Database

KeePassDX:

Android:

Additional context

Logs:

--------- beginning of main
12-24 15:54:30.182 10597 10597 D com.kunzisoft.keepass.autofill.KeeAutofillService: onConnected
12-24 15:54:30.183 10597 10597 D com.kunzisoft.keepass.autofill.KeeAutofillService: Autofill requested in native mode
12-24 15:54:30.183 10597 10597 D com.kunzisoft.keepass.autofill.StructureParser: Autofill applicationId: bitpit.launcher
12-24 15:54:30.183 10597 10597 D com.kunzisoft.keepass.autofill.StructureParser: Autofill username candidate android text type: 0x00004001
12-24 15:54:35.173 10597 13190 W com.kunzisoft.keepass.autofill.KeeAutofillService: Cancel autofill.
12-24 15:54:35.177 10597 10597 D com.kunzisoft.keepass.autofill.KeeAutofillService: onDisconnected
12-24 15:56:53.088 10597 10597 D AppCompatDelegate: Checking for metadata for AppLocalesMetadataHolderService : Service not found
12-24 15:56:53.133 10597 10597 D CompatibilityChangeReporter: Compat change id reported: 210923482; UID 10168; state: ENABLED
12-24 15:56:53.152 10597 10597 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10168; state: ENABLED
12-24 15:56:53.246 10597 10597 W OnBackInvokedCallback: OnBackInvokedCallback is not enabled for the application.
12-24 15:56:53.246 10597 10597 W OnBackInvokedCallback: Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
12-24 15:56:53.257 10597 10597 D CompatibilityChangeReporter: Compat change id reported: 237531167; UID 10168; state: DISABLED
12-24 15:56:53.265 10597 15585 W Parcel  : Expecting binder but got null!
12-24 15:56:53.288 10597 15592 D UriUtil : Take read permission content://me.zhanghai.android.files.file_provider/sftp%253A%252F%252Fmarkustieger%254010.10.0.1%253A2022%252FDatabases%252FPasswords.kdbx
12-24 15:56:53.288 10597 15592 E UriUtil : Unable to take persistable URI permission
12-24 15:56:53.288 10597 15592 E UriUtil : java.lang.SecurityException: No persistable permission grants found for UID 10168 and Uri content://me.zhanghai.android.files.file_provider/...
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.os.Parcel.createExceptionOrNull(Parcel.java:3011)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.os.Parcel.createException(Parcel.java:2995)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.os.Parcel.readException(Parcel.java:2978)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.os.Parcel.readException(Parcel.java:2920)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.app.IUriGrantsManager$Stub$Proxy.takePersistableUriPermission(IUriGrantsManager.java:275)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.content.ContentResolver.takePersistableUriPermission(ContentResolver.java:2936)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.utils.UriUtil.persistUriPermission(UriUtil.kt:105)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.utils.UriUtil.takeUriPermission(UriUtil.kt:132)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.utils.UriUtil.takeUriPermission$default(UriUtil.kt:130)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.viewmodels.FileDatabaseInfo.init(FileDatabaseInfo.kt:54)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.viewmodels.FileDatabaseInfo.<init>(FileDatabaseInfo.kt:43)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.app.database.FileDatabaseHistoryAction$getDatabaseFile$1.invoke(FileDatabaseHistoryAction.kt:45)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.app.database.FileDatabaseHistoryAction$getDatabaseFile$1.invoke(FileDatabaseHistoryAction.kt:63)
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.kunzisoft.keepass.utils.IOActionTask$execute$1$1$asyncResult$1.invokeSuspend(IOActionTask.kt:38)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
12-24 15:56:53.288 10597 15592 E UriUtil :  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
12-24 15:56:53.288 10597 15592 E UriUtil : Caused by: android.os.RemoteException: Remote stack trace:
12-24 15:56:53.288 10597 15592 E UriUtil :  at com.android.server.uri.UriGrantsManagerService.takePersistableUriPermission(UriGrantsManagerService.java:378)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.app.IUriGrantsManager$Stub.onTransact(IUriGrantsManager.java:147)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.os.Binder.execTransactInternal(Binder.java:1280)
12-24 15:56:53.288 10597 15592 E UriUtil :  at android.os.Binder.execTransact(Binder.java:1244)
12-24 15:56:53.288 10597 15592 E UriUtil :