Managed Functions deployment consistently fails with "Failed to deploy the Azure Functions" on Free tier — reproducible with zero-dependency function
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- azure, node.js, typescript
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lệnh swa deploy ./dist --api-location ./api với API tối thiểu, tài nguyên Free-tier và token triển khai được mô tả ở đây. So sánh đường dẫn triển khai API với lần triển khai chỉ frontend thành công, đồng thời kiểm tra staticwebapp.config.json, host.json và nội dung dist/ được tạo ra. Được xem là hoàn tất khi xác định được nguyên nhân có thể tái hiện trong CLI hoặc trên nền tảng, hoặc ghi lại hạn chế và thay thế lỗi chung chung bằng bằng chứng có thể hành động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Every attempt to deploy an API (managed Azure Functions, via swa deploy --api-location) to a Free-tier Static Web App fails with the generic "Failed to deploy the Azure Functions" reason, after a consistent ~16 second delay. Frontend-only deployment (no --api-location) succeeds without issue on the same resource.
Environment
- Static Web App SKU: Free
- Region: East US 2 (also tried West Europe / North Europe, both rejected at creation time with "region not accepting new customers" — unrelated to this issue)
- SWA CLI version: 2.0.10
- Node.js API,
apiVersion: 22(also tried with explicit"platform": {"apiRuntime": "node:22"}in staticwebapp.config.json — no change) - Deployment method:
swa deploywith a deployment token (not GitHub Actions) - OS: Windows 11
Steps to reproduce
- Create a Free-tier Static Web App via
az staticwebapp create. - Create a minimal API with a single HTTP-triggered function, zero dependencies beyond
@azure/functions. - Build it (
tsc), producing a cleandist/with one compiled function file andhost.jsonat the API root. - Deploy:
swa deploy ./dist --api-location ./api --deployment-token <token> --env production
Expected
The single trivial function deploys successfully.
Actual
Deployment fails every time, identically:
Troubleshooting already done
- Confirmed not a stale-build-artifact issue (clean
dist/, verified exact file list before zipping). - Confirmed not a bloated/dev-dependency issue (
npm prune --omit=devbefore deploy). - Confirmed not a runtime-version issue (Node 22 is on the documented supported list; explicit
apiRuntimeconfig made no difference). - Confirmed not specific to one resource instance: fully deleted and recreated the Static Web App, identical failure on the fresh resource.
- Confirmed not specific to our actual application code: deployed a single-endpoint function with zero dependencies beyond
@azure/functions, identical failure. - Frontend-only deployment (same resource,
swa deploy ./distwithout--api-location) succeeds cleanly every time. - Azure Portal's Activity Log shows no entry corresponding to this failure (deployment appears to go through a non-ARM data-plane path not captured there).
- Azure Portal's "Diagnose and solve problems" tool for the resource did not surface anything more specific.
This strongly suggests either a platform-side issue specific to this subscription/tier combination, or an undocumented restriction on managed Functions for Free-tier Static Web Apps that isn't reflected in current error messaging.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 347
- Fork
- 68
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/static-web-apps
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/static-web-apps#1764 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Azure/static-web-apps#1827 ·
-
Managed Functions Not RestartingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Azure/static-web-apps#1826 · 5 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Azure/static-web-apps#1825 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
Azure/static-web-apps#1824 ·
Tất cả issue của Azure/static-web-apps
Issue tương tự
-
component/media domain/discovery
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
roadmap/v1.2.0 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
databrickslabs/ontos#1773 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue help wanted up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/loom#2075 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: The trt-decoder extra installs TensorRT 11, which the trt_decoder plugin cannot loadCó thể đã có người làm @fedonman đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100