Error - You are not currently signed in.

mchadwick
mchadwick
Community Member

After running eval $(op signin), I get "You are not currently signed in." for any subsequent op.

zsh:

➜  op --version
2.0.0
Last login: Tue Mar 29 09:39:55 on ttys002

➜  eval $(op signin)
Enter the password for redacted@redacted.com at my.1password.com: 

➜  op account get
[ERROR] 2022/03/29 10:25:36 You are not currently signed in. Please run `op signin --help` for instructions

The signin operation creates the file /var/folders/zc/REDACTED/T/com.agilebits.op.501/.XXXXXXXXXXXXXXXXXXXXXXXXXXX

with the json:

{"jwe":{"kid":"REDACTED","enc":"A256GCM","cty":"b5+jwk+json","iv":"REDACTED","data":"REDACTED"},"shorthand":"my"}

and sets the environment variable

OP_SESSION_XXXXXXXXXXXXXXXXXXXXXXXXXX=REDACTED

Also, op signin -f shows the help text:
"# Run 'eval $(op signin my)' to sign in to your 1Password account."

Which appears to be out of date, given:

eval $(op signin my)
[ERROR] 2022/03/29 10:31:51 expected at most 0 arguments but got 1 instead

1Password Version: 7.9.3 (70903004)
Extension Version: Not Provided
OS Version: mac OS 12.3
Referrer: forum-search:You are not currently signed in

Comments

  • Chmurzak
    Chmurzak
    Community Member

    I just installed from scratch the 1Password CLI (version 2.0.0) on a linux server and I get the same "You are not currently signed in." error for every operation.

    The signing operation seemed successful and the account is visible with:

    ➜  ~ op account list
    SHORTHAND    URL                         EMAIL                     USER UUID
    my           https://my.1password.com    user@example.com[REDACTED]
    
  • Horia.Culea_1P
    edited April 2022

    Hey @mchadwick and @Chmurzak,

    Thank you for reaching out to us!
    Indeed, that piece of help-text is an oversight, the correct command is eval $(op signin --account me).
    To diagnose this, can you please let us know what installation method did you use? Are you migrating from 1Password CLI 1, or are you a new user? Thanks, looking forward to hearing from you!

    Best,
    Horia

  • Chmurzak
    Chmurzak
    Community Member

    Hi @Horia.Culea_1P,

    I'm using a fresh ubuntu server with a fresh installation of CLI 2.0 (no migration from previous version).
    Unfortunattely, signin with the additional --account flag is not helping (I have to use my instead of me):

    $ op account list
    SHORTHAND    URL                         EMAIL                     USER UUID
    my           https://my.1password.com    user@example.com[REDACTED]
    $ eval $(op signin --account me)
    [ERROR] 2022/04/04 10:14:35 no accounts found matching filter "me"
    $ eval $(op signin --account my)
    Enter the password for user@example.com[REDACTED] at my.1password.com:
    $ op account list
    SHORTHAND    URL                         EMAIL                     USER UUID
    my           https://my.1password.com    user@example.com[REDACTED]
    $ op vault list
    [ERROR] 2022/04/04 10:10:12 You are not currently signed in. Please run `op signin --help` for instructions
    
  • Did you install using apt, or by downloading and running the installer?

  • mchadwick
    mchadwick
    Community Member

    Hi @Horia.Culea_1P,

    I installed using Homebrew 3.4.4. I did not migrate from a previous CLI version. I get similar results to Chmurzak.

    $ op  account list
    SHORTHAND    URL                         EMAIL                         USER UUID
    my           https://my.1password.com    [REDACTED] 
    
    $ eval $(op signin --account me)
    [ERROR] 2022/04/04 13:10:51 no accounts found matching filter "me"
    
    $ eval $(op signin --account my)
    Enter the password for [REDACTED] at my.1password.com: 
    
    $ op vault list
    [ERROR] 2022/04/04 13:11:54 You are not currently signed in. Please run `op signin --help` for instructions
    
  • After running eval $(op signin), can you please run printenv | grep OP_SESSION_ and let me know if the output is empty, or if you can see an environment variable set? The You are not currently signed in. error makes me think that there is a problem in setting the session token to an environment variable.

  • mchadwick
    mchadwick
    Community Member

    @Horia.Culea_1P - Yes, there is an environment variable set (see original post). Do you need the un-redacted variable name? The number of X's are indicative of the actual length.

  • dudestein
    dudestein
    Community Member

    Having the same issue here. Does the plan your account is associated with matter?

  • markcornick
    markcornick
    Community Member

    Also seeing this issue w/ 1password cli 2.0.0, installed via homebrew on macOS 12.3.1 on my M1 MacBook Air. Running op signin, no matter how, does set the OP_XXX environment variable, but produces the same You are not currently signed in error for any further operations.

    However, I can make things work by appending --session $OP_XXX (the same environment variable exported by op signin to commands. So I wonder if there is a problem with finding the specific OP_XXX environment variable that is needed; i.e. the variable is set, but op doesn't know what the value of XXX should be, maybe?

  • phs
    phs
    Community Member

    Checking in with the same issue on OS X 12.3 with a fresh install of the CLI app using brew commands as per the docs here: https://developer.1password.com/docs/cli/get-started#install

    Exact same as what's described above:

    • Env var is set.
    • dot files with JSON data are created in /var/folders/bg/fsxdkll15tj6pllw6dwqcvbm0000gn/T/com.agilebits.op.501/ (Multiple, I assume from my multiple sign-in attempts while trying to make it work)
    • Manually passing --session flag makes it work.
  • Horia.Culea_1P
    edited April 2022

    Had a look with one of my colleagues over the problem, and currently we're investigating the issue.
    The number one lead, at the moment, is related to the lack of USER UUID in the output of op account list. Since the suffix of the environment variable uses the UUID to identify the corresponding session, our hunch is, currently, that the CLI cannot tie the session to a specific user. We're looking into finding out what might have caused the USER UUID to not have been populated during the account add process. Will keep everyone up to date as we find out new details, thanks you everyone for reporting, in the meantime!

  • Joris_1P
    edited April 2022

    Hey folks!

    I can reproduce the problem if I start fresh with the CLI and run any command other than op signin or op account add and then add the account when prompted for it. For example:

    $ op vault ls
    No accounts configured for use with 1Password CLI.
    
    You can either:
     - Sign in with biometric unlock; see https://developer.1password.com/docs/cli/get-started/#sign-in for details.
     - Add an account manually with op account add; see op account add --help for details.
    
    Do you want to add an account manually now? [Y/n] y
    
    # And now enter your account details
    

    The above steps can cause this exact issue. We are working on a fix for that.

    In the meantime, there is also a workaround:
    1. Delete the CLI's configuration by running rm ~/.op/config or rm ~/.config/op/config. Warning: this will remove the account's details; make sure you have them stored somewhere else s well.
    2. Now run eval $(op signin). You should be prompted for your account details. After entering those, you should be signed in.

    Running the above should only be needed once.

    Let me know if that helps.

    Joris

  • phs
    phs
    Community Member

    Can confirm the above fix works, thanks! Also confirm that I first signed in by running op vault ls as per the documentation, so agree that seems to be the cause.

  • markcornick
    markcornick
    Community Member

    Joris_1P's workaround works for me as well. Thanks, Joris!

  • I am glad to hear that works! Thank you for confirming that.

  • aalbright
    aalbright
    Community Member

    I had this same issue and found this thread, I can also confirm the workaround from Joris_1P worked for me.

    Thanks!

  • This issue has been addressed with 2.0.1. Please, do let us know if this is encountered again.
    Thank you everyone for reporting!

    Best,
    Horia

This discussion has been closed.