strongbox-password-safe / Strongbox

A KeePass/Password Safe Client for iOS and OS X
https://strongboxsafe.com
GNU Affero General Public License v3.0
1.29k stars 100 forks source link

Face ID failed - Caller is not running foreground #702

Open EdJoPaTo opened 1 year ago

EdJoPaTo commented 1 year ago

I have a fast auto lock time on my phone. in 30 seconds it's locked automatically. Having Strongbox open and letting the device auto-lock, then unlocking the device again) ends up with Strongbox with the following error message open:

Face ID Failed
Face ID has failed: Error
Domain=com.apple.LocalAuthentica-
tion Code=-1004 "Caller is not running
foreground." UserInfo={NSDebugDe-
scription=Caller is not running
foreground.,
NSLocalizedDescription=User
interaction required.}. You must now
enter your password manually to open
the database.

OK

Then I always press OK, cancel the manual password type window, select the database and use Face ID again.

It would be nice to 1) have a try again button for this kind of error messages and 2) wait for being in the foreground before attempting the FaceID request like it seems to be done currently?

strongbox-mark commented 1 year ago

What version of iOS are running there?

We don't control this message, it comes from the system, but a slightly longer delay might work.

EdJoPaTo commented 1 year ago

I do not use an iOS Beta currently and its up to date with the following version: iOS 16.4.1 (a) (20E772520a) Its also that way for some time so I had earlier versions with the same behaviour too.

I suspect that when activating the system and unlocking it the app is already triggered while the system is still unlocking the device / showing the unlocking animation or something like that. And while the animation is still running the app can't request for FaceID. Having a delay in there would be dependent on the system configuration which might change with a next release so it feels somehow like a less good solution.

Being forced to type in the password manually seems like the most annoying thing here so allowing for a retry of FaceID especially when some time passed by between the error and the click on the Ok button.

To explain the last case: Having Strongbox open and the device locks itself. Then I pick up the phone later and unlock it. Strongbox is still open but now with the error message. As I want to do something else I just swipe up to the home screen leaving the Error message there. Later when I want to use Strongbox again the error message is still open when opening Strongbox so I have to hit OK and am forced to type my password in manually. (Then I cancel that and hit the container again to trigger FaceID again.)

strongbox-mark commented 7 months ago

Hi @EdJoPaTo - Are you still seeing this much?

EdJoPaTo commented 7 months ago

Just tried to recreate the situation: it does not error anymore and just reopens the database. On the downside the entry selected before isnt open anymore as the database reopens on the main view. That would be nice to have but its already way better than having to handle the error / retype password dialog.

strongbox-mark commented 7 months ago

OK, thanks @EdJoPaTo

EdJoPaTo commented 6 months ago

It still seems to happen sometimes but I cant really pinpoint why. I assume keeping it open and then ignoring the device for quite some time. But thats only a guess. Nothing I tried to recreate. But it's already way less often so its already better.