static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

Visual Studio Publish: unable to authenticate with Static Web App

Open lostmsu opened this issue 2 years ago • 0 comments

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] I have no idea, I am using Visual Studio publish interface

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 am trying to publish the app using Visual Studio publish feature.

After logging in with device code I get:

✔ Successfully logged into Azure!
- Failed to setup project: EPERM: operation not permitted, open 'C:\Windows\System32\.env'
- 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 'BlazorPlayground'.

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/microsoftgraph/msgraph-sample-blazor-clientside.git
  2. Open GraphSample project
  3. Right click it, and click Publish...
  4. Create new profile and specify your Azure Static Web App
  5. Hit Publish
  6. Enter device code to the browser window

Expected behavior App should publish

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 22H2

Additional context NodeJS version: 18 LTS

lostmsu avatar Jul 13 '23 05:07 lostmsu