Skip to content

BUG - ADP Extension Points: blank iframe on reload for UI5 < 1.120 #4474

@testojs

Description

@testojs

Related Feature

Feature request: N/A

Description

After adding appdescr_ui5_setFlexExtensionPointEnabled.change to the watchManifestChanges() file watcher in @sap-ux/reload-middleware, the merged manifest served during sandbox HTML generation includes flexExtensionPointEnabled: true in sap.ui5. UI5 versions below 1.120 cannot handle this property at bootstrap time, causing the preview iframe to render as a blank white page after a reload in the Adaptation Editor.

This regression was introduced when reload-middleware@0.3.19 added appdescr_ui5_setFlexExtensionPointEnabled.change to the list of changes that trigger __SAP_UX_MANIFEST_SYNC_REQUIRED__. Previously, saving this change did not trigger a manifest re-sync, so the served manifest did not include the property and older UI5 versions loaded fine.

Affected packages:

  • @sap-ux/preview-middleware
  • @sap-ux/reload-middleware

Steps to Reproduce

  1. Open an ADP (Adaptation Project) with extension points in the Adaptation Editor using UI5 version 1.108.51 (or 1.96.46)
  2. Right-click an extension point → Add Fragment at Extension Point → enter a fragment name → Create → Save
  3. Both addXMLAtExtensionPoint.change and appdescr_ui5_setFlexExtensionPointEnabled.change are saved
  4. Edit the created fragment XML to add a <Button text="Click me">
  5. "Changes detected!" appears → click Reload
  6. The preview iframe stays blank — the app fails to bootstrap

Alternatively for Step 3 of the integration test: pre-load existing change files that include setFlexExtensionPointEnabled.change and open the editor — the app never renders.

Expected results

After reload, the app renders correctly with the new fragment content visible. The flexExtensionPointEnabled property should be stripped from the applicationDependencies manifest for UI5 versions below 1.120.

Actual results

The preview iframe is blank (white). The outline shows "No control found" and the changes panel shows "No historic changes" after reload. The app fails to bootstrap silently.

Version/Components/Environment

  • OS:
    • Mac OS
    • Windows
    • Other

Root Cause Analysis

Problem

reload-middleware/src/base/livereload.ts watchManifestChanges() was updated to include appdescr_ui5_setFlexExtensionPointEnabled.change in the list of file changes that set __SAP_UX_MANIFEST_SYNC_REQUIRED__ = true. This causes AdpPreview.sync() to re-merge the manifest from the backend, which now includes flexExtensionPointEnabled: true in sap.ui5. When FlpSandbox serves the sandbox HTML, this property is included in sap-ushell-config.applications[app].applicationDependencies.manifest. UI5 versions < 1.120 cannot process this manifest property during bootstrap and fail silently (blank page).

Fix

Add a removeFlexExtensionPointEnabled() method to FlpSandbox in preview-middleware/src/base/flp.ts that strips manifest['sap.ui5'].flexExtensionPointEnabled from applicationDependencies when UI5 version is < 1.120. This follows the same pattern as removeAsyncHintsRequests() for UI5 <= 1.71. The method is called from both generateSandboxForEditor() and flpGetHandler().

Why was it missed

The watchManifestChanges() change was correct in intent (the manifest should re-sync when setFlexExtensionPointEnabled is saved). However, the downstream effect on older UI5 versions was not tested — the integration tests only caught this in the nightly CI pipeline, not during development.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpreview-middleware@sap-ux/preview-middleware

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions