Frequent OneDrive authorization request
Since version 1.08 (pre3), it is necessary to confirm authorization on OneDrive almost every time I want to open it.
https://i.ibb.co/nr91Bc1/x-Screenshot-Nov-13-2019-3-11-49-PM.png
Same issue here with version 1.07b-r0.
I use Microsoft authenticator, maybe that is the reason.
Pablo
I have the same or a similar problem - Every time when the app is started fresh and it tries to access the database on Onedrive for Business I get an Onedrive Authentication Message "Pick an account" (I use different O365 accounts for different purposes). Then I select the account where my keepass DB ist stored, Next I get a message "Are you trying to sign in to Keepass2Anfroid?" (this seems to be the same screen as wombat01 posted above) and I click "Continue". Then the sync works (I do not hae to selected the databse again). However these authentication dialogs keep coming back every time the app is restarted.
Already described the problem when the offline access bug was fixed: here There is also a log file.
For me this pops up about one time a day.
Since the last update 1.08b-r0, everything seems to be fine.
I am using 1.08b-r1 and I get inconsistent behavior. The only scenario I am able to reproduce is the following: The authorization window pops up every time if 1) the app has been stopped forcefully and 2) there is an internet connection when opening the app.
However I have also experienced that I could not access my database without an internet connection at all because the app tried to authorize onedrive access.
Like @J-O-P I have 2 OneDrive accounts, and I often get a prompt when opening the database asking me which account I want to use. (The 2nd account is not on my Android device, has never been used in the app.) I speculate that this is being triggered by Microsoft, which knows that I have more than one account from my desktop activity.
Just switched from Dropbox to Onedrive sync and also having this issue with 1.08b-r1.
Since my earlier comment I've paid more attention to this problem, and it seems to be related to the quality of my Internet connection. It never seems to happen on a solid Internet connection, just when I'm on a bad connection with poor speed and high latency. And when the issue occurs, I can open my database without new authorization by backing up and trying again. My guess is that authentication is timing out, and that the app assumes it's an authentication error, so opens a new unnecessary authorization. That would seem to be a possible bug or at least poor error recovery.
I've also noticed that I can just back up and try again, successfully opening the database. I assumed that I was just working with local cache, but what you're saying makes sense @JNavas2.
Video showing unnecessary OneDrive authorization: [DELETED, SEE NEW VIDEO BELOW]
I enabled logging, and reproduced the problem. Log file attached (OneDrive details deleted). Keepass2Android.log
Video showing issue: https://youtu.be/jGcLJiKc77I Starts with fingerprint (not captured) opening of database. App opens database [see capture below], but displays OneDrive authorization screen. Single back touch then displays open database.

a user noted that the authorization request happens after updating the file from the Windows client. this might help diagonising this.
It happens for me even when the local android device was the last to update the file.
This is very strange behavior. Even if you just close this dialog, file is still synchronized correctly. The re-auth is just unnecessary.
@PhilippC
a user noted that the authorization request happens after updating the file from the Windows client. this might help diagonising this.
See my video and log. The behavior was not after a Windows update of the file.
I'm not saying this is the only option how to produce this, but in my previous tests I wasn't able to reproduce this behavior (which makes it very difficult to fix), so I thought this might be a good hint for me when fixing.
@PhilippC It can be hard to reproduce, but the problem appears to entirely be a function of what's happening on the phone, not anything external. How I reproduce it (how I got the log file and video I posted):
- Reboot the phone
- Wait a few minutes until the reboot dust has settled
- Open the database on OneDrive.
I just did it again to confirm that it does reproduce the problem.
Since my earlier comment I've paid more attention to this problem, and it seems to be related to the quality of my Internet connection. It never seems to happen on a solid Internet connection, just when I'm on a bad connection with poor speed and high latency. And when the issue occurs, I can open my database without new authorization by backing up and trying again. My guess is that authentication is timing out, and that the app assumes it's an authentication error, so opens a new unnecessary authorization. That would seem to be a possible bug or at least poor error recovery.
@JNavas2's hypothesis from a couple of weeks ago^ fits my observations as well. Is there no reason to think that a premature authentication timeout might be the culprit? @PhilippC