Azure / Azure/static-web-apps-cli

Publish blazor webassembly app to static web app failing (Visual Studio 2022 Version 17.8.0 Preview 4.0)

Aperta
#757 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
668
Fork
156
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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
- [ ] Yes, I am accessing the CLI from port `:4280`
- [X] You don't know

> 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**
A clear and concise description of what the bug is.

When publishing a Blazor Web Assembly project in Visual Studio 2022 Version 17.8.0 Preview 4.0 I get this error message
"Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. "

Output:

Authenticating with Static Web Apps...
swa.cmd login --subscription-id 30805700-1ae6-4d27-bfd5-94c2298c8dba --tenant-id d0152509-fa8f-483d-9c6c-ee0524e12de4 --app-name staticwebapp --resource-group StaticPages --no-use-keychain
Welcome to Azure Static Web Apps CLI (1.1.4)
Checking Azure session...
✖ Failed to setup project: EnvironmentCredential authentication failed. To troubleshoot, visit https://aka.ms/azsdk/js/identity/environmentcredential/troubleshoot. Status code: 400
More details:
invalid_client: 7000222 - [2023-10-23 15:47:11Z]: AADSTS7000222: The provided client secret keys for app 'f4ca2492-0b17-4f85-b8ef-8fb1b2536c32' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds.
Trace ID: 065305ce-fc0e-4e8e-b856-5d9714647f00
Correlation ID: 9e332a91-b7bd-4ba3-9e91-793cf2a6fa84
Timestamp: 2023-10-23 15:47:11Z - Correlation ID: 9e332a91-b7bd-4ba3-9e91-793cf2a6fa84 - Trace ID: 065305ce-fc0e-4e8e-b856-5d9714647f00
✖ If you believe this behavior is unexpected, please raise a GitHub issue at:
https://github.com/Azure/static-web-apps-cli/issues/new/choose
Unable to authenticate with Static Web App 'staticwebapp'.

With this information Is not clear how to make work the wizzard

**To Reproduce**
Steps to reproduce the behavior:

1. Create a Blazor web assembly app (default template with example pages)
2. Create a static web app in your Azure tenant
3. In Visual Studio click the Blazor project and click
4. publish... -> Azure -> Azure Static Web Apps --> Select your previews created static web app -> click finish -> then click publish button
5. You'll get the error message when finished

**Expected behavior**
A clear and concise description of what you expected to happen.

The Blazor web assembly project should be published and ready to use on azure web app resource.

**Screenshots**
If applicable, add screenshots to help explain your problem.

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

- OS: Windows 10
- Visual studio 2022
- Version 17.8.0 Preview 4.0

**Additional context**
Add any other context about the problem here.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il flusso di pubblicazione di Visual Studio ed esegui il comando `swa login` mostrato con `--verbose=silly`, dopo aver verificato `swa --version`. Usa l'output dell'autenticazione per determinare se il segreto client scaduto viene gestito o segnalato chiaramente; il lavoro è completato quando il flusso di pubblicazione ha esito positivo oppure fornisce un errore risolvibile e indicazioni per il ripristino.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, typescript
Ambito
authentication, cli, cloud
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.