Skip to content

[Bug] Local Code Apps player fails to load after adding Flow #307

@ranjith7022

Description

@ranjith7022

Summary

In a Code Apps project created from the starter template, the local player fails to load the app after adding a Flow. This reproduces even when the flow is a manual-trigger flow and its generated model/service files are created correctly.

The failure appears to happen during DLP evaluation for the app in local play mode.

Environment

  • Template: https://github.com/microsoft/PowerAppsCodeApps/tree/main/templates/starter
  • @microsoft/power-apps: 1.1.1
  • @microsoft/power-apps-vite: 1.0.2
  • Power Apps CLI: 0.10.0
  • Repro observed in local development

Steps to reproduce

  1. Create a new app from the starter template.
  2. Add a Logic Flow using the latest Power Apps CLI flow-add capability.
  3. Confirm the flow is added under connectionReferences in power.config.json.
  4. Start local development.
  5. Open the app in the local player.

Expected behavior

The app should load successfully in the local player after adding the flow.

Actual behavior

The app fails to load in the local player when the Logic Flow reference is present.

Console/network errors

.../powerapps/evaluateDlpPoliciesForApp?api-version=1
Failed to load resource: the server responded with a status of 500 ()

Uncaught (in promise) {
  code: "AppLoadFailed",
  errorType: "PlatformError",
  message: "Cannot read properties of undefined (reading 'evaluationResult')",
  source: "app-host",
  sourceScenarioName: "PlayerLifecycle.PlayerSDK.PlayApp.CheckDataLossPolicyForApp"
}

### Additional detail

For a scheduled flow, code generation produces a service that imports a model file that is never generated. For example, the generated service contains:

```ts
import type { ManualTriggerInput } from '../models/FlowNameModel';

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions