Managed Azure Functions deployment fails after successful build and upload (.NET 8/10 isolated)

Aperta
#1,821 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
azure, csharp, github-actions
Ambito
backend, cloud

Direzione di ricerca

Start by reviewing the Azure Static Web Apps deployment logs for deployment ID 0a290447-9d02-40b6-a411-256e126d73ca and the managed Functions deployment path for Azure/static-web-apps-deploy@v1. The report provides no failing file or actionable diagnostic, so the root cause and code change are not yet identifiable; done means finding the backend failure and a way to expose useful diagnostics.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

Deployment of an integrated Azure Functions API in Azure Static Web Apps consistently fails during the deployment phase, although both the static website and the .NET isolated Functions API build successfully and the artifacts are uploaded.

The deployment fails with:

Deployment Failed :(
Deployment Failure Reason: Failed to deploy the Azure Functions.

No more specific error is provided.

Environment

  • Azure Static Web Apps hosting plan: Free
  • Deployment method: GitHub Actions (Azure/static-web-apps-deploy@v1)
  • Frontend: Static HTML, CSS and JavaScript
  • API: C# Azure Functions v4, .NET isolated worker
  • Tested runtimes: .NET 10 and .NET 8
  • API location: ./api
  • App location: ./website
  • Output location: .
  • API runtime configuration: dotnet-isolated:8.0 (current)
  • Functions: GetPhotos (HTTP GET) and SavePhotos (HTTP POST)
  • Azure region: Global (Static Web App resource)

Steps to reproduce

  1. Create an Azure Static Web App on the Free hosting plan, connected to a GitHub repository.
  2. Add a .NET isolated Azure Functions project in the api directory.
  3. Configure the GitHub Actions deployment with app_location: "./website" and api_location: "./api".
  4. Set the corresponding apiRuntime in staticwebapp.config.json.
  5. Push the changes to the main branch.
  6. Observe that the build and artifact upload succeed, but deployment fails.

Relevant deployment logs

dotnet publish done in 16 sec(s).
Function Runtime Information. OS: windows, Functions Runtime: ~4, dotnetisolated version: 8.0
Finished building function app with Oryx
Found functions.metadata file
Done Zipping Api Artifacts
Done Zipping App Artifacts
Finished Upload. Polling on deployment.
Status: InProgress.
Status: Failed.
Deployment Failure Reason: Failed to deploy the Azure Functions.

Deployment ID: 0a290447-9d02-40b6-a411-256e126d73ca

Troubleshooting already performed

  • Confirmed that the API builds successfully locally and in GitHub Actions.
  • Tested both .NET 10 isolated and .NET 8 isolated, with the same deployment failure.
  • Confirmed that functions.metadata is generated and both functions are detected.
  • Verified the API and frontend paths in the workflow.
  • Verified that AzureWebJobsStorage is configured in the Static Web App environment variables.
  • Simplified Program.cs and host.json.
  • Added content to previously empty HTML pages and updated API route configuration; deployment still fails.
  • Ran Azure Portal deployment diagnostics, but no specific root cause was identified.

Expected behavior

The managed Azure Functions API should deploy successfully alongside the static website on the Free hosting plan.

Actual behavior

The API builds and uploads successfully, but Azure reports Failed to deploy the Azure Functions without further details.

Request

Could the Azure Static Web Apps team investigate the underlying Functions deployment failure using the deployment ID above, or advise how to obtain more detailed backend deployment diagnostics?

Lingua principale
Nessun dato sulla lingua
Stelle
347
Fork
68
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/static-web-apps

Tutte le issue di Azure/static-web-apps

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.