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

Options
neilio
neilio
Community Member

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

Comments

  • 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
    neilio
    Community Member
    Options

    ↪ 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

  • celeriaccloaked
    celeriaccloaked
    Community Member
    Options

    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.

  • andi.t_1P
    edited July 2023
    Options

    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
    neilio
    Community Member
    Options

    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.

  • 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

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

  • cliKing
    cliKing
    Community Member
    edited September 2023
    Options

    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
    neilio
    Community Member
    Options

    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.

This discussion has been closed.