SWA Login: libsecret-1.so.0: cannot open shared object file: No such file or directory
See original GitHub issueDescribe the bug
Receiving error when running a swa login
command on linux from within docker image / dev container.
To Reproduce Steps to reproduce the behavior:
- Run
az login
to initialize azure credentials - Run
az account set -s {subscriptionId}
to set default subscription - Run
swa login --subscription-id {subscriptionId} --resource-group {resourceGroupName} --tenant-id {tenantId} --app-name {appName}
Expected behavior
SWA login command should succeed without error to allow for subsequent commands to deploy
.
Actual behavior
Receive the following error Failed to setup project: libsecret-1.so.0: cannot open shared object file: No such file or directory
Screenshots
Desktop (please complete the following information):
- OS: Linux, vscode dev container
mcr.microsoft.com/vscode/devcontainers/base:0-bullseye
Additional context Works as expected on Windows
When passing in the --no-use-keychain
it runs me through a fresh azure login and works as expected.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Troubleshooting | Static Web Apps CLI - Azure documentation
libsecret -1.so.0: cannot open shared object file: No such file or directory . Context. When using swa login , the flag --use-keychain is...
Read more >Containerizing .net core mvc fails with missing libsecret-1.so.0
0 : cannot open shared object file: No such file or directory; at Microsoft.Identity.Client.Extensions.
Read more >unable to load shared library 'libsecret-1.so.0' - Stack Overflow
It didn't work for me, but I am using a docker container that doesn't have full access to apt. I can't install libsecret-1-dev....
Read more >Hibernate, suspend, hybrid sleep functions work incorrectly
I can't use hibernate, hybrid sleep or suspend functions because they ... libgepub-0.7.so.0: cannot open shared object file: No such file or ...
Read more >How To Solve "cannot open shared object file" Error in Ubuntu ...
Fix ing 'cannot open shared object file: No such file or directory' error. One quick way to fix this “error while loading shared...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@manekinekko We ended up using option 3 from your list where we manually grab the deployment token and pass it through to the
swa deploy
command instead of making a call toswa login
. All is now working as expected.A little bit of context
When using
swa login
, the flag--use-keychain
is enabled by default because we encrypt and store your credentials in your native Keychain (aka. the built-in password manager of your operating system). This operation depends on a system dependency calledlibsecret
. If your system doesn’t come bundledlibsecret
(most systems do provide it by default), you will then encounter the error in the OP.Why do I need to
swa login
?In order to be able to automatically deploy your app to your Azure Static Web Apps instance, we need a Deployment Token. To automate that operation and avoid asking the users to manually find that deployment token, which can take several steps, we provide a built-in and convenient option to do that:
swa login
.How to avoid this issue?
In order to avoid this issue, you have a few options:
libsecret
by adding it to your Docker image or your system (recommended)--no-use-keychain
. Doing so won’t store and remember your credentials anymore, and you will have to interactively log in again each time you runswa login
--app-name
and--resource-group-name
--client-id
,--client-secret
,--app-name
and--resource-group-name
.