Running op under WSL with systemd turned on gives error message

thisdevdane
thisdevdane
Community Member
edited December 2022 in CLI

Running op under WSL when having the new systemd support turned on will give the following error message:

❯ op whoami
couldn't start daemon: open /run/user/1000/op-daemon.pid: permission denied
Shorthand:    my
URL:          https://my.1password.com
<info removed>

I have XDG_RUNTIME_DIR=/run/user/1000/ in my environment and the uid of the running user is 1000.

Any idea if this message can be fixed? I tried just as a temp fix setting OP_CACHE=false but that still produces the message

EDIT: Specifically it's Debian 11 under WSL


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided

Comments

  • Hi @thisdevdane:

    Thanks for letting us know about this! I've filed an issue internally to see if we can sort this out.

    Jack

    ref: dev/b5/op#3299

  • thisdevdane
    thisdevdane
    Community Member

    Great to hear!

  • oliverroos
    oliverroos
    Community Member

    Hey @Jack.P_1P any updates on this? I got the same error using RockyLinux 8 under WSL.

  • Hi @oliverroos:

    Nothing to share just yet, but I've added you to the issue I mentioned above.

    Jack

  • Hi @thisdevdane and @oliverroos ! This is usually an error that users who would run the cli on another machine would get because their user (who owns the cli process) would lack permissions to most files on the host filesystem. Since WSL uses a VM behind the scenes, could you double check that the process running the cli has permissions to access run/user/1000/op-daemon.pid?

  • thisdevdane
    thisdevdane
    Community Member

    So I had systemd turned on off on my wsl instance until now, I turned it on to test if I had access /run/user/1000/op-daemon.pid but first just quickly ran op whoami to see if it was still not working, well surprisingly no error is now showing up. So something was fixed either on 1Password's end or on Microsoft's end. Either way, it works now!

  • Perfect, we are happy to hear that! Thank you for letting us know!

    Amanda

This discussion has been closed.