Skip to main content
neilio
Jun 27, 2023 5:03 PM UTC
Question

Can't sigin with CLI - "context deadline exceeded"

Not sure what's awry here, but I cannot log into my account via the CLI - I keep getting the error "context deadline exceeded". I have the same setup on another machine and it works there. Any ideas of how to fix this?


1Password Version: 2.19.0-beta.01
Extension Version: Not Provided
OS Version: macOS 14
Browser:_ n/a

9 replies

1Password Employee
Jun 28, 2023 10:11 AM UTC

Hi! I think the first step would be to run the problematic command with --debug enabled and copy paste the output in here. This could give us a bit more to work with for finding the issue. All the best, Andi.

neilio
neilioAuthor
Jun 28, 2023 3:03 PM UTC

↪ op signin --debug
11:03AM | DEBUG | Session delegation enabled
11:03AM | DEBUG | NM request: NmRequestAccounts
11:03AM | DEBUG | NM response: Success
11:03AM | DEBUG | NM request: NmRequestAccounts
11:03AM | DEBUG | NM response: Success
11:03AM | DEBUG | NM request: NmRequestAuthorization
11:03AM | DEBUG | NM response: Success
11:03AM | DEBUG | NM request: NmRequestAccounts
[ERROR] 2023/06/28 11:03:19 read: context deadline exceeded

Jul 4, 2023 2:16 AM UTC

I'm having the same issue, but I noticed that the behaviour is different depending on whether I've opened and unlocked 1password separately and left it open.

When i run op signin --debug --account <account> without doing so, I get the same as @neilio:

11:14AM | DEBUG | Session delegation enabled
11:14AM | DEBUG | NM request: NmRequestAccounts
11:14AM | DEBUG | NM response: Success
11:14AM | DEBUG | NM request: NmRequestAccounts
11:14AM | DEBUG | NM response: Success
11:14AM | DEBUG | NM request: NmRequestAuthorization
11:14AM | DEBUG | NM response: Success
11:14AM | DEBUG | NM request: NmRequestAccounts
[ERROR] 2023/07/04 11:14:53 read: context deadline exceeded

when I open and unlock 1password and run op signin --debug --account <account>:

11:09AM | DEBUG | Session delegation enabled
11:09AM | DEBUG | NM request: NmRequestAccounts
11:09AM | DEBUG | NM response: Success
11:09AM | DEBUG | NM request: NmRequestAccounts
11:09AM | DEBUG | NM response: Success
11:09AM | DEBUG | NM request: NmRequestAuthorization
11:09AM | DEBUG | NM response: Success
11:09AM | DEBUG | NM request: NmRequestAccounts
11:09AM | DEBUG | NM response: Success
11:09AM | DEBUG | NM request: NmRequestDelegatedSession
11:09AM | DEBUG | NM response: Success

the auth popup is at the NmRequestAuthorization step in both cases - but it seems like the application is closing too quickly or something in the case when it's being opened specifically by the CLI.

1Password Employee
Jul 14, 2023 1:24 PM UTC

I'm having the same issue, but I noticed that the behaviour is different depending on whether I've opened and unlocked 1password separately and left it open.

@celeriaccloaked @neilio
This is interesting information which makes me suspect the cause. What if you try CLI 2.18.0. I suspect this issue would not be happening with that previous version.

neilio
neilioAuthor
Jul 14, 2023 2:24 PM UTC

Thanks for your reply – I downgraded and at first I still had problems (I got the error "[ERROR] 2023/07/14 10:17:48 RequestDelegatedSession: native messaging: LostConnectionToApp" when I tried to log in via CLI). I worked around this by pre-launching the 1P app and then the CLI sign in worked.

1Password Employee
Jul 24, 2023 4:27 PM UTC

Thanks for your answer! So it is confirmed that the error ([ERROR] 2023/07/04 11:14:53 read: context deadline exceeded) is reproducible on 2.19.0 but not on 2.18.0. I was now able to reproduce and find the root cause for the issue. We are working on a fix internally.

All the best,
Andi

1Password Employee
Jul 28, 2023 7:43 AM UTC

Hey folks @neilio and @celeriaccloaked, could you also please share the 1Password 8 desktop app version you have installed, when this bug is appearing?

Sep 19, 2023 12:45 PM UTC

The bug is still there.
op 2.21.0
1 Password for Mac 8.10.15

This doesn't happen every time, and as the message mentions a timeout (I'm a Go developer, so I recognize the context.DeadlineExceeded error) I suspect this is related to the time the user takes to unlock the app.

Note that in my case the login succeed, but I got the error and a exit code 1.

neilio
neilioAuthor
Sep 19, 2023 1:38 PM UTC

FYI - currently using 1Password for Mac 8.10.18 (81018006).

The error is sporadic now, but still there – previously every time I tried to sign in I'd get the error.