{"record":{"id":"01fffbd77b9191fb","repo":"home-assistant/core","slug":"cloud-auth-failed","errorCode":"cloud-auth-failed","errorMessage":"Home Assistant Cloud authentication failed","messagePattern":"Home Assistant Cloud authentication failed","errorType":"exception","errorClass":"SpeechToTextError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/assist_pipeline/pipeline.py","lineNumber":966,"sourceCode":"        try:\n            # Transcribe audio stream\n            stt_vad: VoiceCommandSegmenter | None = None\n            if (\n                self.audio_settings.is_vad_enabled\n                and self.stt_provider.audio_processing.requires_external_vad\n            ):\n                stt_vad = VoiceCommandSegmenter(\n                    silence_seconds=self.audio_settings.silence_seconds\n                )\n\n            result = await self.stt_provider.async_process_audio_stream(\n                metadata,\n                self._speech_to_text_stream(audio_stream=stream, stt_vad=stt_vad),\n            )\n        except asyncio.CancelledError, TimeoutError:\n            raise  # expected\n        except hass_nabucasa.auth.Unauthenticated as src_error:\n            raise SpeechToTextError(\n                code=\"cloud-auth-failed\",\n                message=\"Home Assistant Cloud authentication failed\",\n            ) from src_error\n        except Exception as src_error:\n            _LOGGER.exception(\"Unexpected error during speech-to-text\")\n            raise SpeechToTextError(\n                code=\"stt-stream-failed\",\n                message=\"Unexpected error during speech-to-text\",\n            ) from src_error\n\n        _LOGGER.debug(\"speech-to-text result %s\", result)\n\n        if result.result != stt.SpeechResultState.SUCCESS:\n            raise SpeechToTextError(\n                code=\"stt-stream-failed\",\n                message=\"speech-to-text failed\",\n            )\n","sourceCodeStart":948,"sourceCodeEnd":984,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/assist_pipeline/pipeline.py#L948-L984","documentation":"SpeechToTextError with code cloud-auth-failed is raised when Home Assistant Cloud (Nabu Casa) speech-to-text raises hass_nabucasa.auth.Unauthenticated during async_process_audio_stream. The pipeline converts it to a pipeline error because the cloud credentials are no longer valid, so the remote STT service refuses the request.","triggerScenarios":"A pipeline whose stt_engine is the cloud STT provider runs while the stored cloud authentication token is expired or revoked; the nabucasa client raises Unauthenticated and the STT stage rethrows this error chained from it.","commonSituations":"Nabu Casa subscription lapsed or was canceled, the user logged out of cloud or re-authenticated on another instance, tokens invalidated server-side, or a long-lived instance with stale cloud credentials.","solutions":["Re-authenticate Home Assistant Cloud: Settings > Home Assistant Cloud, log out and back in, then retry.","Verify the Nabu Casa subscription is active and not expired.","If cloud is intentionally unavailable, switch the pipeline's stt_engine to a local provider (e.g. Whisper via Wyoming)."],"exampleFix":"# before\npipeline = Pipeline(stt_engine=\"cloud_stt\")  # cloud token expired\n\n# after: use a local engine when cloud auth is not available\ncloud = hass.data[\"hass_nabucasa\"].cloud\nif not cloud.is_logged_in:\n    pipeline = dataclasses.replace(pipeline, stt_engine=\"whisper.local\")","handlingStrategy":"fallback","validationCode":"cloud = hass.data.get(\"hass_nabucasa\", {}).get(\"cloud\")\nif pipeline.stt_engine == \"cloud_stt\" and (cloud is None or not cloud.is_logged_in):\n    pipeline = dataclasses.replace(pipeline, stt_engine=\"<local engine id>\")","typeGuard":null,"tryCatchPattern":"from homeassistant.components.assist_pipeline.error import SpeechToTextError\ntry:\n    await pipeline_job.run()\nexcept SpeechToTextError as err:\n    if err.code == \"cloud-auth-failed\":\n        persistent_notification.create(hass, \"Re-authenticate Home Assistant Cloud\", \"assist\")","preventionTips":["Monitor cloud connection state and alert before cloud STT is needed.","Keep a local Whisper engine configured as an alternative for cloud outages."],"tags":["assist-pipeline","stt","cloud","authentication","nabucasa"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}