Deleting a custom widget via the /extensions page while it is still placed on a screen leaves an orphaned reference. This results in the error Error: NotFoundException: Custom widget not found being displayed on the device screen and the web interface breaking, leaving a "phantom" widget that cannot be interacted with or removed.

Steps to Reproduce:
- Open the screen designer (e.g.,
http://<ip>/screens/designer/13) and add a custom widget to the screen.
- Go to the extensions page (
http://<ip>/extensions) and delete this custom widget.
- Check the device and the Web UI.
Actual Behavior:
- Device: The error
Error: NotFoundException: Custom widget not found is displayed on the screen.
- Web interface: The error is not displayed. The widget remains visible in the Active Widgets list, but it cannot be deleted through the interface.
Expected Behavior:
Deleting a custom widget from the extensions page should either automatically remove instances of it from all screens, or the Web UI should gracefully handle the missing reference, show an error, and allow the user to delete the broken widget from the canvas.
Technical Details:
When the bug occurs, the screen's JSON payload loses the customWidgets object entirely, but the widgets array still retains the element referencing the deleted customWidgetId (e.g., 81).
{
"_inkerScreen": 2,
"name": "Untitled Design",
"widgets": [
{
"templateId": 10081,
"config": {
"customWidgetId": 81,
"displayType": "script"
// ... script data
}
}
],
"customWidgets": [
{
"id": 81,
"name": "test"
// ... widget definition
}
]
}
{
"_inkerScreen": 2,
"name": "Untitled Design",
"widgets": [
{
"templateId": 10081,
"config": {
"customWidgetId": 81,
"displayType": "script"
// ... script data
}
}
]
// "customWidgets" array is completely missing, causing the NotFoundException
}
Deleting a custom widget via the

/extensionspage while it is still placed on a screen leaves an orphaned reference. This results in the errorError: NotFoundException: Custom widget not foundbeing displayed on the device screen and the web interface breaking, leaving a "phantom" widget that cannot be interacted with or removed.Steps to Reproduce:
http://<ip>/screens/designer/13) and add a custom widget to the screen.http://<ip>/extensions) and delete this custom widget.Actual Behavior:
Error: NotFoundException: Custom widget not foundis displayed on the screen.Expected Behavior:
Deleting a custom widget from the extensions page should either automatically remove instances of it from all screens, or the Web UI should gracefully handle the missing reference, show an error, and allow the user to delete the broken widget from the canvas.
Technical Details:
When the bug occurs, the screen's JSON payload loses the
customWidgetsobject entirely, but thewidgetsarray still retains the element referencing the deletedcustomWidgetId(e.g.,81).{ "_inkerScreen": 2, "name": "Untitled Design", "widgets": [ { "templateId": 10081, "config": { "customWidgetId": 81, "displayType": "script" // ... script data } } ], "customWidgets": [ { "id": 81, "name": "test" // ... widget definition } ] }{ "_inkerScreen": 2, "name": "Untitled Design", "widgets": [ { "templateId": 10081, "config": { "customWidgetId": 81, "displayType": "script" // ... script data } } ] // "customWidgets" array is completely missing, causing the NotFoundException }