Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#504 5 commentaires 1 réaction 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@jiankai82 y travaille déjà.

Depuis le 20/10/2026.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
node.js, react, typescript, vite
Domaine
frontend, web-dev

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
516
Forks
145
Merge moyen
1 j 10 h
PR mergées (30 j)
23

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de microsoft/PowerAppsCodeApps

Toutes les issues de microsoft/PowerAppsCodeApps

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.