op-vscode icon indicating copy to clipboard operation
op-vscode copied to clipboard

VSCode Feature "1Password: Save in 1Password" does not work

Open mircomarahrens opened this issue 3 years ago • 14 comments

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
  1. Install 1Password CLI
PS C:\Users\MircoMarahrens> op --version
2.7.3
$ op --version
2.7.3
  1. Install VSCode extension "1Password", v1.0.4
  2. Connect CLI with app/account
  3. "1Password: Choose vault"

Details

  1. Mark item to store
  2. "1Password: Save in 1Password"
  3. Enter item name
  4. Enter field name

Result

  1. Nothing happens. Marked item is not replaced with secret reference. Item is not stored in vault.

mircomarahrens avatar Nov 30 '22 10:11 mircomarahrens

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.

jodyheavener avatar Dec 09 '22 20:12 jodyheavener

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 avatar Dec 09 '22 22:12 JackBailey

@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.

mircomarahrens avatar Dec 11 '22 10:12 mircomarahrens

As mentioned above. The issue is fixed.

mircomarahrens avatar Jan 29 '23 16:01 mircomarahrens

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

brinkokevin avatar Feb 04 '23 20:02 brinkokevin

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

Alkasai avatar Mar 06 '23 04:03 Alkasai

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.

enrij avatar Apr 27 '23 06:04 enrij

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.

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

ninyawee avatar Jul 04 '23 14:07 ninyawee

Same issue here. Windows 11. Error executing CLI command: Failed to create item: invalid JSON.

matt-way avatar Jul 17 '23 01:07 matt-way

Same here, Invalid JSON in Windows... op --version 2.17

0GiS0 avatar Aug 22 '23 14:08 0GiS0

Hi again, I also tested it on Mac and I have a different issue with 2.20 version:

image

any ideas?

Thank you so much!

0GiS0 avatar Aug 26 '23 07:08 0GiS0

This is still an issue with version 2.27

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.

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

1000Phoenix avatar Apr 17 '24 16:04 1000Phoenix

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.

jodyheavener avatar May 23 '24 19:05 jodyheavener

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.

jodyheavener avatar May 23 '24 20:05 jodyheavener

This is now out in v1.0.5

jodyheavener avatar Jul 16 '24 17:07 jodyheavener