Possible to create a ghost widget
It is possible to create widgets in the companion app that cannot be deleted in any way, by failing to add the widget to the home screen.
Home Assistant Android app version(s): App: 2025.8.7-full
Android version(s): 16 (BP41.250916.010.A1)
Device model(s): Google Pixel 8 Pro
Home Assistant version: Home Assistant OS 16.2 Core: 2025.10.4 Supervisor: 2025.10.0 Frontend: 20251001.4
Last working Home Assistant release (if known): N/A
Description of problem, include YAML if issue is related to notifications: N/A
Companion App Logs:
10-31 12:04:20.618 14680 14680 D SensorReceiverBase: Received intent: io.homeassistant.companion.android.UPDATE_SENSORS
10-31 12:04:20.620 14680 6174 D ServerConnectionInfo: usesInternalSsid is: true, usesWifi is: true
10-31 12:04:20.621 14680 6174 D ServerConnectionInfo: usesInternalSsid is: true, usesWifi is: true
10-31 12:04:20.621 14680 6174 D ServerConnectionInfo: Using internal URL
10-31 12:04:20.639 14680 14680 I ContentCaptureHelper: Setting logging level to OFF
10-31 12:04:20.641 14680 14680 D IntegrationRepositoryImpl: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1761930252769, currentMillis: 1761930260641)
10-31 12:04:20.645 14680 14680 D WindowOnBackDispatcher: setTopOnBackInvokedCallback (unwrapped): android.app.Activity$$ExternalSyntheticLambda0@a5b510c
10-31 12:04:20.646 14680 14680 D VRI[SettingsActivity]: WindowInsets changed: 1008x2244 statusBars:[0,113,0,0] navigationBars:[0,0,0,54] mandatorySystemGestures:[0,140,0,72]
10-31 12:04:20.656 14680 14760 D ServerConnectionInfo: usesInternalSsid is: true, usesWifi is: true
10-31 12:04:20.657 14680 14760 D ServerConnectionInfo: usesInternalSsid is: true, usesWifi is: true
10-31 12:04:20.666 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.666 14680 14680 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
10-31 12:04:20.666 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.666 14680 14680 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
10-31 12:04:20.666 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.667 14680 14680 W TextView: onProvideContentCaptureStructure(): calling assumeLayout()
10-31 12:04:20.671 14680 6167 D ServerConnectionInfo: usesInternalSsid is: true, usesWifi is: true
10-31 12:04:20.673 14680 6167 D ServerConnectionInfo: usesInternalSsid is: true, usesWifi is: true
10-31 12:04:20.673 14680 6167 D ServerConnectionInfo: Using internal URL
10-31 12:04:20.678 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.698 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:20.702 14680 14760 D SensorReceiverBase: Nothing to update for server 2 (Home)
10-31 12:04:20.703 14680 14760 I SensorReceiverBase: Sensor updates and sync completed
10-31 12:04:20.757 14680 14680 D IntegrationRepositoryImpl: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1761930252769, currentMillis: 1761930260756)
10-31 12:04:20.757 14680 14680 D IntegrationRepositoryImpl: setAppActive(): true
10-31 12:04:20.764 14680 14680 D InsetsController: hide(ime())
10-31 12:04:20.764 14680 14680 I ImeTracker: io.homeassistant.companion.android:c7a60781: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
10-31 12:04:20.955 14680 14680 D VRI[WebViewActivity]: visibilityChanged oldVisibility=true newVisibility=false
10-31 12:04:20.983 14680 14680 D WindowOnBackDispatcher: setTopOnBackInvokedCallback (unwrapped): android.app.Activity$$ExternalSyntheticLambda0@ca874a3
10-31 12:04:20.984 14680 14680 I AutofillManager: onInvisibleForAutofill(): expiringResponse
10-31 12:04:21.869 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:21.971 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.071 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.203 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.320 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.336 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.372 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.373 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.405 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.405 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.436 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.454 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.470 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.487 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.503 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.503 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.521 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.537 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.553 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.569 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.586 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.603 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.620 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.638 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.652 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.670 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.686 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.703 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.722 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.753 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.785 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.802 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:22.837 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:25.421 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:25.669 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:25.837 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:26.002 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:26.911 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:26.937 14680 14680 D WindowOnBackDispatcher: setTopOnBackInvokedCallback (unwrapped): androidx.activity.OnBackPressedDispatcher$Api34Impl$createOnBackAnimationCallback$1@1ce5def
10-31 12:04:26.979 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:26.979 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:26.979 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:26.979 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:26.979 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:29.975 14680 14680 E mpanion.android: Invalid resource ID 0x00000000.
10-31 12:04:30.058 14680 21269 D LogcatReader$readLog: Read logcat for pid 14680
Screenshot or video of problem:
Additional information: Steps to reproduce:
- Open Companion app -> Settings -> Companion App -> Manage Widgets
- Configure a new widget
- When prompted to "add to home screen", DO NOT drag the widget to the home screen. Instead, click the "add to home screen" button.
Result: The widget has been created in the Companion app, but was not actually added to the home screen. As a result, the widget cannot be deleted in any way, since the only way of deleting it is the home screen.
Suggested workaround: Since this is likely rooted in a deeper problem in Android, a fix would be to provide a way to "re-add" the widget to the home screen when updating it via the app. This way, if a ghost widget is created, it can still be properly added with the right steps.
When following your steps for reproduction, I do not end up with a ghost widget on my home screen (tested with an entity state widget as that appears to be what you used). Also on a Pixel running Android 16. Do you use the default home screen/launcher or a custom one?
The app actually waits for Android to tell the app that it was created, because only then the app receives an ID it can use to save the widget. So it seems that it is created, at least partially. It also already should remove any 'ghost' widget the next time the screen turns off/on. Not 100% sure what is happening here but it sure does seem like Android also thinks the widget exists 🤔
When following your steps for reproduction, I do not end up with a ghost widget on my home screen (tested with an entity state widget as that appears to be what you used). Also on a Pixel running Android 16. Do you use the default home screen/launcher or a custom one?
The app actually waits for Android to tell the app that it was created, because only then the app receives an ID it can use to save the widget. So it seems that it is created, at least partially. It also already should remove any 'ghost' widget the next time the screen turns off/on. Not 100% sure what is happening here but it sure does seem like Android also thinks the widget exists 🤔
Not only is the widget not on the home screen anywhere, but it isn't in the menu to add it either. I am using the vanilla Pixel launcher. I'm not very familiar with Android Widgets, but if the ID still exists, could we have a button to add it remain in the edit menu? It serves as a quick fix to the issue, and will still be useful when it gets fixed.
That aside, I will investigate my logcat and see if I can fine anything further.
edit:
Well, other than the button using ItemInstallQueue, I don't really see a difference. Both get back -1 broadcasts a few times before getting back the widget id successfully.
it isn't in the menu to add it either
Which menu do you mean? The widgets menu in the launcher is not showing the widget type at all or something else?
could we have a button to add it remain in the edit menu? It serves as a quick fix to the issue, and will still be useful when it gets fixed
Unfortunately, that won't work as you're expecting. The app requests the system to add a widget with that config and will get a new ID back. Apps cannot re-add widgets, adding/removing is completely controlled by the user.
Unfortunately, that won't work as you're expecting. The app requests the system to add a widget with that config and will get a new ID back. Apps cannot re-add widgets, adding/removing is completely controlled by the user.
Well, thats unfortunate.
Which menu do you mean? The widgets menu in the launcher is not showing the widget type at all or something else?
Yes, that is what I mean, though I misunderstood and thought the intended behavior was to add widgets that already exist.