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)

オープン
#757 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
668
フォーク
156
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず Visual Studio の発行フローを再現し、`swa --version` を確認した後、示されている `swa login` コマンドを `--verbose=silly` とともに実行します。認証出力を使用して、期限切れのクライアントシークレットが処理されるか、明確に報告されるかを判断します。発行フローが成功するか、対処可能なエラーと復旧手順が提示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, typescript
領域
authentication, cli, cloud
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。