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)
- 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
- [ ] 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.
Contributor guide
Assessment
This issue has not been assessed yet.