Skip to content

[Bug] compile_canvas push corrupts the app document — "named object 'NN' could not be found in the runtime", empty galleries, blank app #427

Description

@aubi-one-david

Plugin

canvas-apps

Plugin Version

2.2.2

Skill / Command

canvas-app skill / canvas-authoring MCP (compile_canvas)

Bug Description

Repeated compile_canvas pushes into an app that is open in Power Apps Studio progressively corrupt the app document. The failures are not in the pushed content: compile_canvas reports 0 errors, and restoring a previous app version brings the same YAML back and it runs correctly. Symptoms escalate over successive pushes:

  1. The named object 'NN' could not be found in the runtime. (NN = an internal control id)
  2. A gallery stops rendering its rows when its Items re-evaluates
  3. This app ran into a problem. This app encountered an error that limits its ability to render.
  4. A blank screen with no error message at all

The only reliable cure is a version restore in the maker portal. Nothing expressible in the .pa.yaml fixes a document once it is in this state.

Steps to Reproduce

  1. Open a moderately complex canvas app in Studio; leave it open and idle.
  2. connectsync_canvas → edit a .pa.yamlcompile_canvas (0 errors, pushes).
  3. User saves in Studio, tests, publishes.
  4. Repeat several times over a session.
  5. Within a handful of cycles, one of the symptoms above appears — typically first as named object 'NN' on a gallery whose Items depends on a variable that changes with user interaction, then escalating to a blank app on a later push.

We could not isolate a single push that triggers it; it behaves cumulatively.

Note: with Studio closed, sync_canvas returns No files returned from server. Nothing written., so pushing without Studio attached does not appear to be an available workaround.

Expected Behavior

A push that compiles with 0 errors leaves the app document in a consistent, renderable state.

Actual Behavior

The document renders incorrectly or not at all, while the control tree is intact and complete in the Studio tree view and the .pa.yaml compiles clean.

Evidence that the pushed content is innocent:

  • After restoring the last Live version, the restored working document contained the identical changes that were in place when the corruption appeared (a filter restructuring, a form layout re-flow, and a gallery template rewrite).
  • All 116 declared controls were cross-checked against every Name.Property reference in both .pa.yaml files — zero unresolved names.
  • A failing id did not correspond to a missing control: '86' mapped, in the published .msapp (Controls/*.json, ControlUniqueId), to a control that exists.
  • Right-click screen → Duplicate screen produced a copy that renders, while the original screen stayed blank. Studio rewrote the copied controls' sibling references correctly. Same definition, fresh identities → works. This is consistent with corruption of control identity state rather than of the control tree.
  • Control case: the same change applied by hand in Studio saved, published, survived closing and reopening Studio, and has been stable since. On the same day, 9 compile_canvas pushes produced 3 corruptions requiring version restores.

Possible aggravating factor. The app contained several intra-gallery-template sibling references (ControlA.Height referenced from ControlB inside the same gallery template) and four cross-screen references from App.OnStart into screen controls (Reset(<control>) / ResetForm(<form>)). Those are the references that visibly broke first — a gallery template stopped rendering, and later OnStart failed as a whole (which renders the app blank with no error, since no variables get set). Rewriting the template to remove sibling references did not prevent a later corruption, so they look like the first casualty rather than the cause.

Relevant Logs / Screenshots

compile_canvas: "Validation FAILED / Diagnostics: 6 total / Warnings: 6"
  (0 errors; the 6 are pre-existing, accepted delegation warnings)

Runtime banner: "The named object '86' could not be found in the runtime."
Runtime banner: "The named object '195' could not be found in the runtime."
Runtime banner: "This app ran into a problem. This app encountered an error that
  limits its ability to render. Please save your work and reload the app."

sync_canvas with Studio closed: "No files returned from server. Nothing written."

Environment

  • OS: macOS 26.5.2 (arm64)
  • Claude Code: 2.1.222
  • PAC CLI: 2.10.1+g52c3983 (.NET 10.0.11)
  • Power Apps Studio in Chromium, single author, co-authoring enabled (coauthoringEnabled: true, multipleWritersEnabled: true)
  • App: single-screen canvas app, ~116 controls, SharePoint Online data sources, Responsive layout
  • CreatedByClientVersion / MinClientVersion: 3.26081.16.0

What would help

  • A way to verify, after a push, that the document's control identity state is consistent (e.g. an integrity check exposed through the MCP).
  • Guidance on whether pushing while Studio is attached to the same app is supported at all — if two writers are the problem, the plugin could warn or refuse.
  • If pushing with Studio closed is the intended safe path, documenting that — sync_canvas currently returns nothing in that state.

🤖 This issue was created using the /report-issue skill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions