-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect if op
fails to talk to the 1Password desktop app
#209
Comments
We'll need to scrape an error message. It should be something like:
|
I've seen two different but similar errors:
and:
When I do the equivalent of One theory is that in the first attempt 1Password is still shutting down, and on the second attempt it is already gone down. Perhaps the IPC (XPC/mach in my case since I'm on macOS) behaves differently in the two cases. In any case, what this means for this issue is that when |
@jchan-legendpower apologies this has taken a while. I have a working solution in the I've detected connection failure with the desktop app, and now raise There's an example under The example first kills all 1Password-related processes, then attempts to sign in with |
Is there a need to kill everything and reauth? I've been using my polling workaround and it seems to always eventually succeed, would rather not incur a second auth confirmation. Behaviour might also be different between Windows and MacOS |
Absolutely not! Sorry I wasn't clear...killing all 1Password process in the example script was just to simulate 1Password dying or becoming unresponsive. This forces a connection failure with the desktop app in order to demonstrate the exception being raised. I don't mean for the user to actually kill 1Password. I'll add a clarifying comment to the example. |
Under various conditions
op
will fail if expects to talk to 1Password but it can't. This can happen if the 1Password app has been terminated or died.It also appears to happen if
op
has DOSed the app and it can't respond fast enough[1].We should detect this situation and raise a more specific exception than
OPCmdFailedException
so the caller can decide what to do.[1] reported by @jchan-legendpower in #137
The text was updated successfully, but these errors were encountered: