Azure / Azure/static-web-apps-cli

Cannot login or deploy application: findCredentials is not a function error

Open
#885 10 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
668
Forks
156
PR merge metrics
No merged PRs in 30d

Description

Before filing this issue, please ensure you're using the latest CLI by running `swa --version` and comparing to the latest version on [npm](https://www.npmjs.com/package/@azure/static-web-apps-cli).

**Are you accessing the CLI from the default port `:4280` ?**

- [ ] No, I am using a different port number (`--port`) and accessing the CLI from that port
- [X ] Yes, I am accessing the CLI from port `:4280`

> Make sure you are accessing the URL printed in the console when running `swa start`!

**ℹ️ NOTE: Make sure to enable debug logs when running any `swa` commands using `--verbose=silly`**

**Describe the bug**
I cannot deploy an application. It was working fine, but I have updated to the newest version. During running `swa deploy` i got:

`Checking` Azure session...
Executing authenticateWithAzureIdentity
- details:
- tenantId:
- clientId:
- clientSecret:
- useKeychain: true
Keychain is enabled
Executing swaCliPersistencePlugin
Executing before cache access plugin
Machine ID:
Invoking crypto service
Getting credentials
Getting credentials from native keychain
Getting keychain reference
isKeychainEnabled: true
KeychainCache: undefined
Attempting to load native keychain
Executing after cache access plugin
Machine ID:
Invoking crypto service
Did TokenCacheContext cache changed: true
Setting credentials in keychain
Encrypting credentials
Encrypted credentials:
Setting credentials in native keychain
Getting keychain reference
isKeychainEnabled: true
KeychainCache: undefined
Attempting to load native keychain
✖ Failed to setup project: this.keychainCache.findCredentials is not a function

✖ If you believe this behavior is unexpected, please raise a GitHub issue at:
https://github.com/Azure/static-web-apps-cli/issues/new/choose
`
It also happens when i try to `swa login`

Configuration used:
`{
"$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
"configurations": {
"app-frontend": {
"appLocation": ".",
"outputLocation": "dist",
"appBuildCommand": "npm run build",
"run": "npm run dev",
"appDevserverUrl": "http://localhost:5173",
"tenant": "XXXX",
"appName": "app-stage",
"resourceGroup": "app-sgr-stage",
"env": "prod"
}
}
}
`

**Desktop (please complete the following information):**

- OS: Windows
- Version 11

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.