Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug] Local Play always fails with "Code app URL is not available" when EnableAuthenticatedGateway feature gate is on

未关闭
#504 1 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@jiankai82 已经在做这个了。

开始于 2026年10月20日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
node.js, react, typescript, vite
领域
frontend, web-dev

调研方向

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 内容生成。

描述

bug

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

  1. Run npm run dev with @microsoft/power-apps-vite.
  2. 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
  3. 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.json loads fine (preflight 204, GET 200).
  • The app itself (localhost:5173/) is never requested.
  • GET …/powerapps/apps/local/permissions returns 403 ("user … does not have permission to access this"). For the same user, GET …/powerapps/apps/<appId>/permissions returns 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.codeAppPackage branch (which carries _localAppUrl) is skipped
  • only listAppPackageOperationDetails.appPackageDetails.authenticatedCodeAppPackage is 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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/PowerAppsCodeApps 的其他 Issue

查看 microsoft/PowerAppsCodeApps 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。