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

Deploy fails with no feedback, application is not deployed, stuck in "Uploading" forever #816

Open
Peter-Juhasz opened this issue Mar 17, 2024 · 4 comments

Comments

@Peter-Juhasz
Copy link

Describe the bug

Deploy fails with no feedback.

To Reproduce

swa deploy --deployment-token REDACTED

Output:

Welcome to Azure Static Web Apps CLI (1.1.7)

Deploying front-end files from folder:
  C:\REDACTED\dist

Consider providing api-language and version using --api-language and --api-version flags,
    otherwise default values apiLanguage: node and apiVersion: 16 will apply

Deploying to environment: preview

Deploying project to Azure Static Web Apps...

The CLI exits here without any other message, no error either.

Azure Portal shows "Uploading":

image

Expected behavior
Like any feedback from the app why it fails?

Device info (if applicable):

  • SWA: 1.1.7
  • OS: Windows 11 23H2 22631.3296
  • Node: 20.5.0

Additional context
The application is very simple, consists of an html file, and a css file.

The SWA resource was just created, completely new, there was nothing deployed earlier.

@lstorka
Copy link

lstorka commented Mar 19, 2024

Had the exact same problem and when I investigated the logs, one line caught my eye:
ℹ Current directory cannot be identical to or contained within artifact folders.

So I just navigated one directory up and then ran:
swa deploy --env production -a .\frontend
and now it was successfully deployed 😃

@Peter-Juhasz
Copy link
Author

@lstorka Thanks for the workaround! It worked!

@coder925
Copy link

The workaround works.

If you run the successful command but with --dry-run added you will see information still suggesting an error:

i Could not get event info. Proceeding
i The content server has rejected the request with: BadRequest
i Reason: Missing request content.

Also, if you navigate up two directories:
swa deploy --env production -a .\dist\frontend
it stops working again. The CLI just returns to command prompt without writing the success message "Project deployed". No warning or errors are given.

@conradagramont
Copy link

Setting the variables in the config file and having the proper folder structure is key. BTW, I'd recommend always running the cli with the --verbose silly switch.

I just wrapped up a blog post that could help shed some light on this.
Using Azure Functions with Astro and Entra ID Authentication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants