Repository navigation
Conversation
The SDK locates the desktop app shared library (libop_sdk_ipc_client.so) at hardcoded FHS paths (/usr/bin/1password, /opt/1Password, /snap/bin/1password). On NixOS the desktop app lives under a content-addressed store path, so none of those exist and SDK clients fail with "SDK client creation with desktop integration failed: 1Password desktop application not found" even when the app is running, unlocked and has "Integrate with other apps" enabled. - Try $OP_DESKTOP_APP_LIB_PATH first when set (falls back to the standard locations if it doesn't exist). - On Linux, also look in the NixOS system profile (/run/current-system/sw/share/1password) and the Nix user profiles (~/.nix-profile, ~/.local/state/nix/profile). Behavior for the supported platforms is otherwise unchanged. Signed-off-by: Fabio Batista <fabio@atelie.dev.br>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
OP_DESKTOP_APP_LIB_PATH: when set, it is tried first for the desktop app shared library (libop_sdk_ipc_client.so/.dylib/.dll), falling back to the standard locations if the path doesn't exist./run/current-system/sw/share/1password/libop_sdk_ipc_client.so(NixOS system profile — stable across app upgrades)~/.nix-profile/share/1password/libop_sdk_ipc_client.so~/.local/state/nix/profile/share/1password/libop_sdk_ipc_client.soWhy
On NixOS the 1Password desktop app lives under a content-addressed store path, so none of the hardcoded FHS locations (
/usr/bin/1password,/opt/1Password,/snap/bin/1password) exist. Every SDK consumer that authenticates through the desktop app fails with:even though the app is running, unlocked, and has Settings → Developer → Integrate with other apps enabled. The library itself exists in the package (
/nix/store/<hash>-1password-<version>/share/1password/libop_sdk_ipc_client.so, symlinked from/run/current-system/sw/share/1password/for system installs).This hits the Terraform provider (
terraform-provider-onepassword, which vendors this SDK) and anything else built on the SDK running on NixOS. The workaround today is a manual symlink into/opt/1Password.Testing
TestDesktopLibLocationscovers the override priority, the default Linux list (including the NixOS system profile path) and the unsupported-OS error path:go test ./internal/ -run TestDesktopLibLocations✅go build ./...andgo vet ./internal/✅/run/current-system/sw/share/1password/...path exists and resolves to the store lib).