Biometric unlock opens twice and blocks entire phone

Hi again,

Sorry to post a new issue but I just got a new phone (Xiaomi Mi Note 10 Lite) with Android 10 and in-screen fingerprint sensor.
It appears that with Cryptomator v1.5.9 under some circumstances the biometric unlock dialogue is opened twice in a row and only the second one reads the fingerprint and unlocks the Vault but the first one stays open and blocks the entire phone. This is what this looks like:

When that happens I have to restart the phone as no other actions are possible any more.

I cannot reliably reproduce it but it seems to happen something like 1 in 5 times or so…

I use OneDrive as the cloud provider.

I hope this issue can be fixed as quickly as the last one and let me know if you need any more details…

Many thanks again!

Is there nobody that can help with this? I’m having to restart the phone several times a day due to this issue and would really appreciate it if this could be fixed.
I have several apps like Keepass2Android or banking apps that use biometric login and none of them have this problem…

@SailReal could you please have a look at this issue?

Many thanks!

Hmm that’s very weird. In fact, in Onedrive we display the auth dialog, then close it for Onedrive authentication and display it again after authentication, but theoretically this shouldn’t cause any problems, we’ll have another look, thanks for reporting!

1 Like

@SailReal thanks for replying :grin:
If I can provide any more info please let me know.

I noticed that this issue does not appear to happen if I unlock the Vault using the Share function in Android. Maybe that’s of help?

No this is “normal” and is due to the fact that during the normal unlock of a vault from the vault list, we load the masterkey file from the cloud in the background while entering the password or biometric credentials. As already described in the other thread, this first request will refresh the token of Onedrive, which requires UI and which is why we have to close the biometric auth dialog again. Somehow your device has a problem with closing the biometric auth dialog. Is it possible sometimes or never to unlock the vault (I mean directly after the fresh start, if Cryptomator has already communicated with Onedrive it is possible in any case…)?
We do not load the masterkey file in the background unlocking while “sharing” with Cryptomator and therefore the problem does not occur in this scenario.

Not sure I understand the question correctly… Basically sometimes it works and sometimes it doesn’t, even after a fresh restart of the phone.

Just now I had the issue again… I used the app last night with the sharing function which was fine. The phone was on charge, switched on, the whole night. This morning I tried to unlock the vault and the issue happened. After restarting the phone I tried to unlock the vault again but it happened again. After another restart it worked finally. After it worked I can unlock fine for a while, similar to the last issue, until probably OneDrive is locked again or so…

Another thing I noticed is that the biometric dialog is sometimes black and other times white. I think the first unlock after restart is always a black dialog. No idea if that’s anything useful but I’m using a dark theme…

Hope this helps?

@SailReal I just sent a log after switching on Debug Logging. Though I had to restart the phone after the issue happened so not sure if there’s anything useful in it…

@bluezed thanks for your log file. It seems like there was no crash when the debug mode was activated, is that possible? If so, it would be great if you could activate it again and send us the log file as soon as it occurs again while debug mode active.

@SailReal thanks for looking at the log.
When I had debug mode on the issue did happen. But since I have to restart the phone in order to access actually send the log maybe it got wiped in the process? Or is the log kept after a restart as well?
In any case I can try sending one again this evening…

It is :slight_smile: .
We don’t see the crash itself but we can see what was done just before it, maybe that helps.

@SailReal ok, just created a new log, rebooted and sent it. Hope there’s something useful in there… Though the steps were the same as with the last log.

Thanks for the log.
Hmm, it looks pretty good, it always follows this pattern:

I	20200909175022.375	App	Cryptomator v1.5.9 (1986) "Google Play Edition" started on android 10 / API29 using a Mi Note 10 Lite
D	20200909175038.110	MSAAuthAndroidAdapter	Authenticating request,
E	20200909175038.112	MSAAuthAndroidAdapter	Unable to get access token, No active account found Unable to get access token, No active account found
D	20200909175038.113	PrepareUnlockUseCase	failed
E	20200909175038.178	BiometricAuthentication	Authentication error: Fingerabdruckvorgang abgebrochen errorCode=5
D	20200909175038.191	ActivityLifecycle	onCreate org.cryptomator.presentation.ui.activity.AuthenticateCloudActivity
D	20200909175038.209	MSAAuthAndroidAdapter	Login started
D	20200909175038.990	MSAAuthAndroidAdapter	Login completed
D	20200909175039.328	ActivityLifecycle	finish org.cryptomator.presentation.ui.activity.AuthenticateCloudActivity
D	20200909175039.350	BiometricAuthentication	Show biometric auth prompt
D	20200909175039.351	PrepareUnlockUseCase	started
D	20200909175039.353	MSAAuthAndroidAdapter	Found account information
D	20200909175041.599	PrepareUnlockUseCase	finished
D	20200909175041.600	UnlockVaultUseCase	started
D	20200909175042.400	UnlockVaultUseCase	finished
D	20200909175042.402	GetRootFolderUseCase	started
D	20200909175042.403	GetRootFolderUseCase	finished
  1. Start app
  2. Check if the authentication token is still valid
  3. Token is stale, need to refresh because of this, abort PrepareUnlockUseCase and cancel BiometricAuthentication
  4. Request refresh token
  5. Show BiometricAuthentication again and restart PrepareUnlockUseCase
  6. Unlock vault and show root folder

When exactly did the app crashes?

The app as such never crashes. It seems to run behind the first biometric unlock dialog. But that dialog is blocking everything so the phone cannot be used. It’s blocking the screen from being used because I cannot dismiss it myself.
I can use the phone navigation buttons and switch to different apps but the unlock dialog stays in the foreground.

Thanks for the clarification.

It seems that closing the biometric auth dialogue silently failes sometimes on your device. Unfortunately, we can’t do more than asking the OS to close it. The only thing we could do is to optionally disable the prepare unlock via the settings so that when it is deactivated, it first authenticates via biometrics and when finished we communicate with onedrive. But that’s not really nice either because the unlock will take longer and we have to implement this extra, but the way it is right now it seems to be really broken on your device.

Thanks for the info. I wouldn’t mind having to authenticate twice or wait longer as long as I can actually unlock it reliably. As it is right now it’s like a lottery and too often I loose and have to restart the phone. And that takes way longer! :grimacing:

The workaround is implemented and will be available in the next release.

1 Like
© 2020 Skymatic GmbH • Privacy Policy • Impressum