Closed janmeier closed 2 months ago
Hey @janmeier thanks for reporting this issue! We haven't done a whole lot of testing of op-js in Linux, so this isn't too surprising, however I'd love to get this fixed up. I've added this to our team's radar to see if we can find a solution. Thank you!
I'm also experiencing this. For more data, I'm able to run op whoami
in the cli and get a correct response, but when I call op.whoami()
in node, I get the same error as shown above. I'm on Ubuntu 22.03, op-js: 0.1.8, cli version: 2.18.0. Let me know if you need any more data, or if you'd like me to try anything.
Hey there! Apologies for the long delay on this.
I'm looking into this issue and have been able to successfully run op-js
on my Ubuntu distro.
I am using this code, if you'd like to try it out yourself: https://github.com/jodyheavener/tmp-opjs-test
As for the error you are receiving, can you confirm that the 1Password desktop app is running and connected to the CLI?
I'm going to close this issue for now. If the problem persists please feel free to re-open.
Your environment
op-js version: 0.1.8 CLI version: 2.17.0 OS: Ubuntu 22.04.2 LTS
What happened?
Trying to get an item from 1pass using
item.get(id)
I getWhat did you expect to happen?
To be able to get the item. Running
op item get
directly in the terminal works.Steps to reproduce
Notes & Logs
This seems to be a linux only issue, my colleagues running osx don't have this issue.
I tried running
require('child_process').spawnSync('op', ['item', 'get', 'XXX'])
directly, to rule out any weirdness in op-js. and it gave the same error. Interestingly, if I replace spawn with exec:require('child_process').execSync('op item get XXX'))
, it works, so it seems to be something related to what process / env vars / whatever is inherited when spawning a new process using spawn, as opposed to running exec, which spawns a new shell