PhilippC / keepass2android

Password manager app for Android
https://play.google.com/store/apps/details?id=keepass2android.keepass2android
GNU General Public License v3.0
4.73k stars 382 forks source link

[BUG] "Path is too long" error occur if reopen local onedrive database #2354

Open scruel opened 1 year ago

scruel commented 1 year ago

Checks

Describe the bug you encountered:

(I don't want to use the OAuth way)

Path is too long. Path /data/data/keepass2android.keepass2android/no_backup/contentcom.microsoft.skydrive.content.StorageAccessProviderdocumentcontent%3A%2F%2Fcom.microsoft.skydrive.content.metadata...

Describe what you expected to happen:

No response

What version of Keepass2Android are you using?

1.09e-r7

Which version of Android are you on?

Android 13, Android 12

jiucenglou commented 9 months ago

I encountered same error here

milloenchen commented 8 months ago

Same here. Is there a workaround?

PhilippC commented 8 months ago

I cannot reproduce this. When you are on the password screen or in the list of recent files, how does the filename look like? For me it's something like "content://database.kdbx". Is it longer for you?

milloenchen commented 8 months ago

There's a message about the path which is too long. The path looks like this: Screenshot_20240116_085634~3

PhilippC commented 8 months ago

hmm, for me that looks very different... In order to open files from Onedrive, I first had to install the OneDrive app (https://play.google.com/store/apps/details?id=com.microsoft.skydrive&hl=de&gl=US). Is this what you have as well, or are you using something else?

milloenchen commented 8 months ago

Yes, I have the same app installed. Is it because the kdbx file is not in OneDrive's root folder? It's in like the third? level folder: Files > Documents > keepass.

milloenchen commented 8 months ago

@PhilippC the issue is solved it seems. I disabled the automatic battery optimisation in Android for the OneDrive app and now it works! So it was probably an issue with the app authorisation / battery optimisation. Thank you. 😊

scruel commented 5 months ago

@PhilippC Sorry for the late reply, I can't take screenshot on this page, but comment https://github.com/PhilippC/keepass2android/issues/2354#issuecomment-1893788066 had already provided it, and the filename is similar.

@PhilippC the issue is solved it seems. I disabled the automatic battery optimisation in Android for the OneDrive app and now it works! So it was probably an issue with the app authorisation / battery optimisation.

Interesting, I already switched to using OneDrive OAuth method, but still tried it again, currently on my side, this issue will still occur even after I disabled the automatic battery optimization, I don't think it is related, it should be the problem caused by local copy reading when OneDrive APP is unconnectable.