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

SWA Deployment Fails with BadRequest in Production Environment #1517

Open
sipkode opened this issue Jul 22, 2024 · 0 comments
Open

SWA Deployment Fails with BadRequest in Production Environment #1517

sipkode opened this issue Jul 22, 2024 · 0 comments

Comments

@sipkode
Copy link

sipkode commented Jul 22, 2024

Describe the bug

I am currently unable to deploy my SWA to a production environment, as it fails with the following error:

---End of Oryx build logs---
Web App Runtime Information. OS: linux, node version: 20
...
The content server has rejected the request with: BadRequest
Reason: The Static Web App does not support managed functions since there are user provided functions registered with the static web app. Please either detach the user provided functions from the static web app or remove or rename the functions folder to stop uploading to the managed functions.

I have verified that the SWA does not include any code in the /api path that might get picked up as a managed backend.

This error does not appear when deploying to a preview environment via pull request.

To Reproduce
Steps to reproduce the behavior:

  1. Commit a change to the SWA GitHub repo
  2. GitHub action is triggered
  3. Deployment fails with the above error during the Build and Deploy step

Workflow .yml and staticwebapp.config.json attached.

Expected behavior
SWA deploys successfully and uses the linked backend. In the event of a deployment failure, useful error messages that reference the issue should be provided.

azure-staticwebapp-prod.yml.txt
staticwebapp.config.json

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

1 participant