[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
-
[BUG] rag: sentence content can cross the reported sentence boundaries可能已有人在做 @LJK-ikun 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URI未关闭
难度 1/5 1 小时以内 新手友好度 88/100
platformatic/mcp#361 ·
维护者通常 1 天内回复
-
frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nada未关闭
难度 2/5 1-3 小时 新手友好度 76/100
melgarafael/DeskcommCRM#3164 ·
维护者通常 1 天内回复