Version
- App: 2026.3.2-full
- Android: 16 (SDK 36)
- Phone: Pixel 9 Pro XL
Description
When a server's webhook ID becomes invalid (HA returns HTTP 410 Gone), the app does not attempt to re-register the device. It silently keeps using the dead webhook ID, causing all webhook-based operations (update_location, get_zones, update_sensor_states, etc.) to fail permanently until the user manually removes and re-adds the server.
Root cause
In IntegrationRepositoryImpl.updateRegistration() (line 160-184), there is logic to detect a broken registration and re-register:
if (response.code() == 200 && response.body()?.contentLength() == 0L) {
// Reregistration logic
}
However, this only handles the case of a 200 with an empty body. A 410 Gone response is thrown as an HttpException by Retrofit before the onSuccess handler runs, so the re-registration logic is never reached.
Meanwhile, callWebhookOnUrls() in tryOnUrls() catches the 410 and moves on to the next URL. If all URLs return 410, it throws IntegrationException("All URLs failed"). At no point is re-registration attempted.
Impact
The app gets permanently stuck with a dead webhook. In my case:
- The webhook ID was invalidated at some point (possibly during an HA update or config entry cleanup)
- Every
get_zones, update_location, and update_sensor_states call returned 410 Gone
- Location tracking was completely broken for days
- The only fix was manually removing and re-adding the server in the app
Combined with #6721 (multi-server geofence failure), this made location tracking silently broken with no user-visible indication.
Expected behavior
When the app receives HTTP 410 Gone on a webhook call, it should:
- Recognize that the webhook registration is invalid
- Attempt to re-register the device with the server (call
registerDevice())
- If re-registration succeeds, persist the new webhook ID and retry the original request
- If re-registration fails, surface an error to the user (persistent notification, sensor status, etc.)
Logs
W ServerConnectionStateProviderKt: Failed get_zones on HIDDEN
W ServerConnectionStateProviderKt: retrofit2.HttpException: HTTP 410 Gone
E LocationSensorManager: Error receiving zones from Home Assistant
E LocationSensorManager: IntegrationException: All URLs failed for get_zones
Version
Description
When a server's webhook ID becomes invalid (HA returns
HTTP 410 Gone), the app does not attempt to re-register the device. It silently keeps using the dead webhook ID, causing all webhook-based operations (update_location,get_zones,update_sensor_states, etc.) to fail permanently until the user manually removes and re-adds the server.Root cause
In
IntegrationRepositoryImpl.updateRegistration()(line 160-184), there is logic to detect a broken registration and re-register:However, this only handles the case of a 200 with an empty body. A
410 Goneresponse is thrown as anHttpExceptionby Retrofit before theonSuccesshandler runs, so the re-registration logic is never reached.Meanwhile,
callWebhookOnUrls()intryOnUrls()catches the 410 and moves on to the next URL. If all URLs return 410, it throwsIntegrationException("All URLs failed"). At no point is re-registration attempted.Impact
The app gets permanently stuck with a dead webhook. In my case:
get_zones,update_location, andupdate_sensor_statescall returned 410 GoneCombined with #6721 (multi-server geofence failure), this made location tracking silently broken with no user-visible indication.
Expected behavior
When the app receives
HTTP 410 Goneon a webhook call, it should:registerDevice())Logs