solutions icon indicating copy to clipboard operation
solutions copied to clipboard

Python `create_vaults_from_input.py` example script fails on Windows

Open ag-adampike opened this issue 1 year ago • 3 comments

In Windows environments, getMyUUID() catches an error on every run of the script, even after recently signing in. The response from the subprocess.run implementation of 1Password CLI seems to include a non-zero return code in every case, so the script exits here:

https://github.com/1Password/solutions/blob/4e7dab5c54be2f0464099c91741a999b62e7040b/account-management/create_vaults_from_input.py#L38-L41

I've not yet been able to work out why this is an issue for Windows, but it's easily reproduced. The error message consistently includes account not signed in.

ag-adampike avatar Jun 05 '24 21:06 ag-adampike

Does this happen both when using the desktop integration and when signing into op manually?

scottisloud avatar Jun 06 '24 18:06 scottisloud

This error happens on Windows when 1Password CLI is integrated with 1Password for Windows. The desktop app integration does not seem to allow a subprocess to delegate sign in using the desktop app.

A workaround is to sign in manually: https://developer.1password.com/docs/cli/sign-in-manually/

The script behaves as expected on Windows when signing in manually.

ag-adampike avatar Jun 06 '24 22:06 ag-adampike

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. 1Password employees have been nudged.

github-actions[bot] avatar Oct 02 '24 19:10 github-actions[bot]

This issue has been automatically closed due to inactivity. Please re-open if this still requires attention.

github-actions[bot] avatar Oct 17 '24 04:10 github-actions[bot]