{"record":{"id":"dfec88d15b0558f9","repo":"home-assistant/core","slug":"authentication-or-connection-failed-during-firmwar","errorCode":null,"errorMessage":"Authentication or connection failed during firmware update","messagePattern":"Authentication or connection failed during firmware update","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/airos/update.py","lineNumber":95,"sourceCode":"    def release_url(self) -> str | None:\n        \"\"\"Return the release url of the latest firmware.\"\"\"\n        return self.firmware.data.get(\"changelog\")\n\n    @override\n    async def async_install(\n        self,\n        version: str | None,\n        backup: bool,\n        **kwargs: Any,\n    ) -> None:\n        \"\"\"Handle the firmware update installation.\"\"\"\n        _LOGGER.debug(\"Starting firmware update\")\n        try:\n            await self.status.airos_device.login()\n            await self.status.airos_device.download()\n            await self.status.airos_device.install()\n        except AirOSConnectionAuthenticationError as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"update_connection_authentication_error\",\n            ) from err\n        except AirOSException as err:\n            raise HomeAssistantError(\n                translation_domain=DOMAIN,\n                translation_key=\"update_error\",\n            ) from err\n","sourceCodeStart":77,"sourceCodeEnd":104,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/airos/update.py#L77-L104","documentation":"HomeAssistantError raised by the airos update entity when a firmware update installation fails specifically at authentication: the AirOSConnectionAuthenticationError path. Login to the device succeeded earlier is not assumed — the update flow re-logs in, and if credentials are rejected, the user sees this localized 'authentication or connection failed during firmware update' message.","triggerScenarios":"async_install calls login(), download(), install(); login() (or an auth-protected step) raises AirOSConnectionAuthenticationError because the stored credentials were rejected by the device.","commonSituations":"Password changed on the device after the config entry was created, session/cookie invalidated mid-flow, or a firmware image requiring re-authentication on a management port with different credentials.","solutions":["Re-verify the device credentials via its web interface.","Run the re-configuration/re-auth flow for the airos entry in Home Assistant, then retry the update.","Check the chained exception in logs to confirm the step that failed.","Ensure no other session invalidated the login (some airOS versions limit concurrent sessions)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":"def is_airos_update_auth_error(err: Exception) -> bool:\n    return isinstance(err, HomeAssistantError) and getattr(err, \"translation_domain\", None) == \"airos\" and getattr(err, \"translation_key\", None) == \"update_connection_authentication_error\"","tryCatchPattern":"try:\n    await update_entity.async_install(version=None, backup=False)\nexcept HomeAssistantError as err:\n    if getattr(err, \"translation_key\", None) == \"update_connection_authentication_error\":\n        # re-auth required before any retry\n        await start_reauth_flow()","preventionTips":["Run the re-auth flow for airos as soon as device credentials change, before invoking update actions.","Limit concurrent admin sessions on the airOS device so the integration's login is not evicted."],"tags":["home-assistant","airos","firmware-update","authentication"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}