Orphaned Windows After Removing Apps via In-Memory Import with Replace Mode

Problem

When using io.appManager.inMemory.import() with 'replace' mode to dynamically swap app definitions, if the new set of definitions does not include a previously running app, the app instance is removed from the App Manager, but its window remains open on screen.

Attempting to close the orphaned window manually after the import throws an error in the console.

Solution

A configuration property was added under system.json to control this behavior:

"closeRunningInstancesOnAppRemoved": true

  • Type: boolean
  • Default: false
  • Description: If true, all running app instances will be closed when the app definition is disabled or removed.

When set to true, running app instances are closed when the app definition is disabled or removed, which also closes the associated windows without causing errors.