Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successfully logged into Azure! – Failed to setup project: EPERM: operation not permitted #836

Open
mbouthillette opened this issue May 23, 2024 · 7 comments
Assignees
Labels
command: login All issues related to the login command os: windows Issues happened on a Windows environment (not WSL). priority: low (P2) Low priority status: awaiting user input Waiting for the user to provide more clarity and/or answer the questions in the chat version: ga Issues related to major/GA releases

Comments

@mbouthillette
Copy link

Publish Azure Static Web Apps using Visual Studio Community 2022. This problem is new after the lastest upgrade of VS.

Authentification avec Static Web Apps...
swa.cmd login --subscription-id 96fb6c8f-d34e-401b-919e-0a990e0f5100 --tenant-id d99bfd9c-0927-435b-9a7c-192aaf7a687e --app-name P-DELTA --resource-group P-DELTA_group --no-use-keychain
Welcome to Azure Static Web Apps CLI (1.1.8)
Checking Azure session...
✔ Successfully logged into Azure!
✖ Failed to setup project: EPERM: operation not permitted, open 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE.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
Impossible de s’authentifier auprès de Static Web App 'P-DELTA'.

@SlimAhmad
Copy link

@mbouthillette please have you found a solution to this, i have the same error to

@ZYF500
Copy link

ZYF500 commented Jun 14, 2024

please have you found a solution to this, i have the same error to

@improwise
Copy link

Same error here.

@SlimAhmad
Copy link

@improwise just make use of the cli, it works (swa) command

@adrianhall
Copy link
Member

Can you please provide the precise version of Visual Studio and the extension please?

@adrianhall adrianhall self-assigned this Jul 1, 2024
@adrianhall adrianhall added priority: low (P2) Low priority os: windows Issues happened on a Windows environment (not WSL). version: ga Issues related to major/GA releases command: login All issues related to the login command status: awaiting user input Waiting for the user to provide more clarity and/or answer the questions in the chat labels Jul 1, 2024
@payetools
Copy link

Here is how I fixed this issue:

  1. Open an admin terminal
  2. Change directory to C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE
  3. Create an empty file called ".env" in that folder
  4. Change the permissions on that file to all all access to all users (or your specific user if preferred)

This .env file is used to persist your Azure subscription ID and tenant ID. It is not clear what other things it do, so it is possible this may introduce a security issue; perhaps someone from Microsoft could comment.

@Bengkel
Copy link

Bengkel commented Jul 31, 2024

@payetools proposed solution did not work for me. Deployment still fails with a new error message "Failed to setup project: EISDIR: illegal operation on a directory, read"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command: login All issues related to the login command os: windows Issues happened on a Windows environment (not WSL). priority: low (P2) Low priority status: awaiting user input Waiting for the user to provide more clarity and/or answer the questions in the chat version: ga Issues related to major/GA releases
Projects
None yet
Development

No branches or pull requests

7 participants