[Bug] Local Play always fails with "Code app URL is not available" when EnableAuthenticatedGateway feature gate is on
維護者通常 1 天內回覆
@jiankai82 已經在處理了。
開始於 2026年10月20日。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, react, typescript, vite
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
Summary
Local Play for code apps stopped working for us around 20 Oct 2026. The player stays blank and throws AppLoadFailed — Code app URL is not available. The published app works normally.
Microsoft's web player has started sending the feature gate "EnableAuthenticatedGateway": true. With that gate on, the player ignores the local dev server address, so the /a/local Local Play link can't load.
Steps to reproduce
- Run
npm run devwith@microsoft/power-apps-vite. - Open the Local Play link it prints:
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.
Actual behavior
Uncaught (in promise) {code: 'AppLoadFailed', source: 'host', message: 'Code app URL is not available', errorType: 'PlatformError'}
at getAppFrameUrlAsync / _loadAppAsync (es6.player-boot.js)
In the Network tab:
localhost:5173/__vite_powerapps_plugin__/power.config.jsonloads fine (preflight 204, GET 200).- The app itself (
localhost:5173/) is never requested. GET …/powerapps/apps/local/permissionsreturns 403 ("user … does not have permission to access this"). For the same user,GET …/powerapps/apps/<appId>/permissionsreturns 200 (Owner).
Expected behavior
The app loads from the local dev server, as it did before.
Cause (from reading es6.player-boot.js)
window.webPlayerServerConfig.FeatureGates now contains "EnableAuthenticatedGateway": true.
In CodeAppLoader._getAppUriAsync, when _enableAuthenticatedGateway is true:
- the
preloadMetadata.codeAppPackagebranch (which carries_localAppUrl) is skipped - only
listAppPackageOperationDetails.appPackageDetails.authenticatedCodeAppPackageis used
For /a/local there is no published package, so it returns nothing and getAppFrameUrlAsync throws "Code app URL is not available".
Workaround
Append this to the Local Play URL:
&PAOverrideFGRollout.EnableAuthenticatedGateway=false
With it, Local Play loads and hot reload works again.
What we ruled out
- Our code: fails the same on an older commit that previously worked.
- SDK version: same result on @microsoft/power-apps 1.1.3 + power-apps-vite 1.0.2 and on 1.5.0 + 1.0.13.
- Browser and device: same in Chrome, Edge and Incognito, and on a separate personal device.
- Permissions: the user is System Administrator in the environment and Owner of the app, and "Enable code apps" is On.
Environment
- @microsoft/power-apps 1.1.3 (also tested 1.5.0), @microsoft/power-apps-vite 1.0.2 (also tested 1.0.13)
- Vite 7.3.3, React 19, Node.js 24, Windows 11
- Chrome 155 / Edge, player
PowerApps/3.26103.18 - Region: Australia
- Data sources: Dataverse, plus Office 365 Users, SharePoint Online and one custom connector
Request
Please make Local Play work with EnableAuthenticatedGateway on: use _localAppUrl for /a/local. Alternatively, have @microsoft/power-apps-vite print a Local Play URL that works with the gateway.
- 主要語言
- TypeScript
- 星號
- 516
- 分支
- 145
- 平均合併
- 1 天 10 小時
- 30 天內合併 PR
- 23
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/PowerAppsCodeApps 的其他 Issue
-
bug
難度 5/5 一週以上 新手友好度 25/100
microsoft/PowerAppsCodeApps#508 ·
維護者通常 1 天內回覆
-
bug
難度 4/5 3-5 天 新手友好度 48/100
microsoft/PowerAppsCodeApps#503 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 5/5 一週以上 新手友好度 25/100
microsoft/PowerAppsCodeApps#499 ·
維護者通常 1 天內回覆
-
pa CLI cannot reach default-prefixed environments (DNS ENOTFOUND); Dataverse connector rejects current as organization in default env可能已有人在做 @EvanCahill 今天認領。 未關閉
難度 4/5 3-5 天 新手友好度 22/100
microsoft/PowerAppsCodeApps#472 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
[Bug] shared_odbc with on-prem fails pointing to placeholder URL可能已有人在做 @tonystevenj 於 9 天前認領。 未關閉bug
難度 4/5 3-5 天 新手友好度 45/100
microsoft/PowerAppsCodeApps#465 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 microsoft/PowerAppsCodeApps 的全部 Issue
相似的 Issue
-
Area/Cloud Needs Triage Type/Bug
難度 1/5 1-3 小時 新手友好度 86/100
wso2/product-integrator#2847 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 67/100
bluesky-social/social-app#12118 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
heygen-com/hyperframes#6021 ·
維護者通常 1 天內回覆
-
check:passed streams:edit
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆