op-vscode
op-vscode copied to clipboard
VSCode Feature "1Password: Save in 1Password" does not work
Summary
"1Password: Save in 1Password" does not work.
Prerequisites
- Tried on Win 11 Pro Build 22621, Win 10 Enterprise Build 19044 and WSL2 Ubuntu 22.04.1 LTS
- Install 1Password CLI
PS C:\Users\MircoMarahrens> op --version
2.7.3
$ op --version
2.7.3
- Install VSCode extension "1Password", v1.0.4
- Connect CLI with app/account
- "1Password: Choose vault"
Details
- Mark item to store
- "1Password: Save in 1Password"
- Enter item name
- Enter field name
Result
- Nothing happens. Marked item is not replaced with secret reference. Item is not stored in vault.
Hey @mircomarahrens, sorry that you're experiencing this issue. I'm curious, is this this the only feature that does not work for you? For example, does Get from 1Password correctly retrieve an item's value?
I'll also note that you'll need to connect your CLI using Windows Hello PIN or fingerprint. One of those will be needed, as session-based authentication does not work with the extension at this time. After you fill out the two item/field name fields, you should be prompted to authenticate.
At any rate, it's not ideal that it quietly fails, but I'd like to try and track down exactly how/when the issue occurs.
Not sure how you installed but I had the same issue installing from scoop, I uninstalled it and installed via the powershell command block and it now works fine
@JackBailey Thanks for the hint. I reinstalled the CLI via the powershell command and it is working now.
@jodyheavener I followed the manual installation of https://developer.1password.com/docs/cli/get-started/#install. I also tried to get further information from the debug log of the VScode extension but nothing seems to be logged. Anyhow, if I execute "1Password: Choose vault" the authentication part via Windows Hello is working and VScode is asking for my configured vaults. I didn't dig deeper.
As mentioned above. The issue is fixed.
Hey @mircomarahrens, sorry that you're experiencing this issue. I'm curious, is this this the only feature that does not work for you? For example, does Get from 1Password correctly retrieve an item's value?
I'll also note that you'll need to connect your CLI using Windows Hello PIN or fingerprint. One of those will be needed, as session-based authentication does not work with the extension at this time. After you fill out the two item/field name fields, you should be prompted to authenticate.
At any rate, it's not ideal that it quietly fails, but I'd like to try and track down exactly how/when the issue occurs.
This issue is still happening, "Get from 1Password" works as expected. "Save in 1Password" doesn't do anything. I attempted to reinstall using powershell command block instead of steps 1...6, but the issue is still happening.
$ op --version
2.13.1
This issue is still happening, "Get from 1Password" works as expected. "Save in 1Password" doesn't do anything. I attempted to reinstall using powershell command block instead of steps 1...6, but the issue is still happening.
$ op --version 2.13.1
same here
PS C:\Users\EnricoBarbieri> op --version
2.17.0
Same here... When I click on "Save in 1Password" the Windows Hello is triggered but then an invalid JSON error is raised
Error executing CLI command: Failed to create item: invalid JSON.
PS C:\Users\EnricoBarbieri> op --version 2.17.0Same here... When I click on "Save in 1Password" the Windows Hello is triggered but then an invalid JSON error is raised
Error executing CLI command: Failed to create item: invalid JSON.
observed the same thing on Windows
My Setup
- use with MS. Hello, face
op --version: 2.18, latest as of today- 1Password for Windows 8.10.8 (81008047), latest as of today
- VSCode Plugin: 1password, v1.0.4, latest as of today
Vscode Output
["INFO" - 8:56:20 PM] Starting 1Password for VS Code.
["INFO" - 8:56:20 PM] Extension Version: 1.0.4.
["ERROR" - 8:56:42 PM] Error executing CLI command
Error
same as @enrij
Error executing CLI command: Failed to create item: invalid JSON.
Today is 04/07/2023
Same issue here. Windows 11. Error executing CLI command: Failed to create item: invalid JSON.
Same here, Invalid JSON in Windows... op --version 2.17
Hi again, I also tested it on Mac and I have a different issue with 2.20 version:
any ideas?
Thank you so much!
This is still an issue with version 2.27
PS C:\Users\EnricoBarbieri> op --version 2.17.0Same here... When I click on "Save in 1Password" the Windows Hello is triggered but then an invalid JSON error is raised
Error executing CLI command: Failed to create item: invalid JSON.observed the same thing on Windows
My Setup
- use with MS. Hello, face
op --version: 2.18, latest as of today- 1Password for Windows 8.10.8 (81008047), latest as of today
- VSCode Plugin: 1password, v1.0.4, latest as of today
Vscode Output
["INFO" - 8:56:20 PM] Starting 1Password for VS Code. ["INFO" - 8:56:20 PM] Extension Version: 1.0.4. ["ERROR" - 8:56:42 PM] Error executing CLI commandError
same as @enrij
Error executing CLI command: Failed to create item: invalid JSON.Today is 04/07/2023
Hey folks! Just a little ping to let you know that this issue is being investigated. Apologies it's been open for some time now.
I've updated the underlying op-js package to v0.1.12 in this commit https://github.com/1Password/op-vscode/commit/4a00f0e2857af1496e52f961298310deb38e3fc4. This appears to have resolved the issue. I wish I had a more detailed understanding of why this fixes the issue, but I don't at this time. I'll leave this issue open until the next release is cut.
This is now out in v1.0.5