op slow to respond using WSL (no desktop app)

Options
This discussion was created from comments split from: CLI hangs when requesting items.

Comments

  • davidsass
    davidsass
    Community Member
    Options

    Hi Everyone,

    I want to use 1password cli on a WSL server without the desktop 1password application.

    I've attempted to install op as described here: link to installation guide and here: link to server installation guide. The installation itself was successful.

    I plan to use op as outlined here: link to manual sign-in process.

    After the installation, I tried to run op --version, but it took 2 minutes to respond.

    Could you please help me investigate what is causing this long wait time?

    Thanks in advance,
    David

  • Joshua_ag
    edited January 22
    Options

    Hi @davidsass

    Thanks for reaching out!

    I think we are going to need to do some specific investigation into your issue with op and WSL. The issues previously mentioned in this thread involve the main 1Password app as well, so likely a different issue than the one you are running into. I am splitting your comment into a new thread so we can look more into your situation.

    Josh

  • Joshua_ag
    edited January 23
    Options

    Hi again @davidsass,

    I wanted to provide an idea or two on what might be causing the delay in WSL.

    The first thing I would check is if other command are also slow, if you run a command like git status do you see any noticeable delays there?

    To be clear as well, you have op installed inside of the wsl instance, not installed in the Windows terminal?

  • davidsass
    davidsass
    Community Member
    edited January 23
    Options

    Hi @Joshua_ag,

    Thank you for addressing my concern and establishing a separate thread to handle it.

    Firstly, I appreciate your ideas and suggestions. Other commands, such as git status function correctly.

    I have not shared the Windows PATH with my WSL2 instance; therefore, the op binary is indeed located within WSL2.

    However, I've had an additional insight that I validated successfully. Recalling a situation where a friend experienced a delay in vim's response time, I attempted a solution that resolved the issue.

    Allow me to elaborate briefly. I have an environment variable named DISPLAY, which should be exported when utilizing VcXsrv ( https://aalonso.dev/blog/how-to-use-gui-apps-in-wsl2-forwarding-x-server-cdj ). Typically, I don't use it, and it was not correctly set in my case, prompting me to refrain from exporting the DISPLAY variable.

    Here is the outcome:

    If you have the opportunity, please delve deeper into this. I believe that with the correct DISPLAY variable and VcXsrv configuration, it should function as intended.