[Bug] Local Play fails with AppLoadFailed "Code app URL is not available" (403 on environment API); published app works
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, react, typescript, vite
Hướng nghiên cứu
Start by reproducing Local Play with the reported versions of @microsoft/power-apps and @microsoft/power-apps-vite, then inspect the player boot path and environment API request associated with the 403. Compare the local player flow with pac code push to locate where the code app URL becomes unavailable. Done means identifying the cause and restoring Local Play or documenting a supported workaround; the issue does not name repository files or tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Local Play for an existing code app stopped loading without any change to the project. The player stays blank and throws AppLoadFailed with the message "Code app URL is not available". The same app works normally once published with pac code push.
The Vite dev server is running and serves both the app and the connection config. The player fails before any request reaches localhost. Just before the error, the player gets a 403 from the environment API.
Steps to reproduce
npm run dev(Vite +@microsoft/power-apps-vite)- Open the printed Local Play URL:
https://apps.powerapps.com/play/e/<environment-id>/a/local?_localAppUrl=http://localhost:5173/&_localConnectionUrl=http://localhost:5173/__vite_powerapps_plugin__/power.config.json - The page stays blank and the console shows the errors below.
Expected behavior
The app loads in the local player, as it did before with the same code and setup.
Actual behavior
Console (trimmed):
es6.player-boot.js:1225 Uncaught (in promise) {code: 'AppLoadFailed', source: 'host', message: 'Code app URL is not available', details: undefined, errorType: 'PlatformError', …}
_loadAppAsync @ es6.player-boot.js:1228
playAppAsync @ es6.player-boot.js:1228
GET https://<id>.environment.api.powerplatform.com/...?$filter=environment eq '<environment-id>'&api-version=1 403 (Forbidden) base.host.js:2
What we've ruled out
- Our code: the same failure on an older commit that previously ran in Local Play.
- Dev server:
http://localhost:5173/and/__vite_powerapps_plugin__/power.config.jsonboth return 200, and the config is valid JSON. - Account and environment: PAC CLI is signed in as the same user and environment as the Local Play URL, and the user can play the published app.
- Browser session: fails the same in Chrome, Edge and an InPrivate/Incognito window.
- Flows (#307): the app has no flow connection references.
Possibly related
Chrome shows Pop-ups and redirects: Blocked by your administrator for apps.powerapps.com, which means a managed browser policy is in place. The app has three connector connection references (Office 365 Users, SharePoint Online, a custom connector). If Local Play needs a pop-up for connection consent, or needs local network access to localhost, could a managed policy cause exactly this error? If so, a clearer error message would help (see #439).
Environment
@microsoft/power-apps1.1.3@microsoft/power-apps-vite1.0.2- Vite 7.3.3, React 19, Node.js 24.15.0
- Windows 11, Chrome and Edge (current), managed device
- Dataverse plus connection references to
shared_office365users,shared_sharepointonlineand one custom connector
Questions
- What causes "Code app URL is not available"? Is the 403 on the environment API the trigger?
- Has the hosted player changed in a way that needs a newer
@microsoft/power-apps/power-apps-vite? We're on 1.1.3 / 1.0.2, and the latest are 1.5.0 / 1.0.13. - Does Local Play need pop-ups or local network access permission when an admin policy blocks them, and is there a supported workaround?
- Ngôn ngữ chính
- TypeScript
- Star
- 516
- Fork
- 145
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 23
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 microsoft/PowerAppsCodeApps
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
microsoft/PowerAppsCodeApps#503 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/PowerAppsCodeApps#500 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
microsoft/PowerAppsCodeApps#499 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
microsoft/PowerAppsCodeApps#498 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pa CLI cannot reach default-prefixed environments (DNS ENOTFOUND); Dataverse connector rejects current as organization in default envCó thể đã có người làm @EvanCahill đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
microsoft/PowerAppsCodeApps#472 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/PowerAppsCodeApps
Issue tương tự
-
Edit: Tele Posadas HDĐang mởcheck:passed streams:edit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:mcp bug has repro platform:vscode regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anthropics/claude-code#103970 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sdk-typescript: unquoted COPY globs in shell form are silently dropped from the image build contextĐang mởbug javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày