Azure / Azure/static-web-apps-cli

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

Offen
#885 10 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
668
Forks
156
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Überprüfe zuerst die installierte Version mit `swa --version`, und reproduziere dann `swa login` oder `swa deploy` unter Windows mit `--verbose=silly`. Verfolge `authenticateWithAzureIdentity`, `swaCliPersistencePlugin` und den nativen Keychain-Ablauf bis zum gemeldeten Aufruf `findCredentials`. Als abgeschlossen gilt die Aufgabe, wenn Login und Deployment ohne den Keychain-Fehler abgeschlossen werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, typescript
Bereich
authentication, cli, cloud
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.