home-assistant/core · error · ConfigEntryNotReady
oauth2_implementation_unavailable
oauth2_implementation_unavailable
Error message
oauth2_implementation_unavailable
What it means
ConfigEntryNotReady raised with translation_key 'oauth2_implementation_unavailable' during async_setup_entry when async_get_config_entry_implementation raises ImplementationUnavailableError. This means the OAuth2 backend (in this integration, the cloud-supplied Genie/Aladdin application credentials) that issued the token is no longer registered with Home Assistant, so HA cannot refresh the token. The entry retries setup later.
Source
Thrown at homeassistant/components/aladdin_connect/__init__.py:41
from . import api
from .const import CONFIG_FLOW_MINOR_VERSION, CONFIG_FLOW_VERSION, DOMAIN
from .coordinator import AladdinConnectConfigEntry, AladdinConnectCoordinator
PLATFORMS: list[Platform] = [Platform.COVER, Platform.SENSOR]
async def async_setup_entry(
hass: HomeAssistant, entry: AladdinConnectConfigEntry
) -> bool:
"""Set up Aladdin Connect Genie from a config entry."""
try:
implementation = (
await config_entry_oauth2_flow.async_get_config_entry_implementation(
hass, entry
)
)
except ImplementationUnavailableError as err:
raise ConfigEntryNotReady(
translation_domain=DOMAIN,
translation_key="oauth2_implementation_unavailable",
) from err
session = config_entry_oauth2_flow.OAuth2Session(hass, entry, implementation)
try:
await session.async_ensure_token_valid()
except OAuth2TokenRequestReauthError as err:
raise ConfigEntryAuthFailed(err) from err
except (OAuth2TokenRequestError, aiohttp.ClientError) as err:
raise ConfigEntryNotReady from err
client = AladdinConnectClient(
api.AsyncConfigEntryAuth(aiohttp_client.async_get_clientsession(hass), session)
)
coordinator = AladdinConnectCoordinator(hass, entry, client)View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Ensure the integration/application credentials that supplied the OAuth implementation are installed and loaded.
- If the original provider is gone, delete the config entry and re-create it through the normal integration flow.
- Restart HA once after restoring providers so registrations rebuild.
- Check the HA log for the chained ImplementationUnavailableError to identify the missing implementation.
Defensive patterns
Strategy: fallback
Validate before calling
from homeassistant.helpers import config_entry_oauth2_flow
try:
impl = await config_entry_oauth2_flow.async_get_config_entry_implementation(hass, entry)
except config_entry_oauth2_flow.ImplementationUnavailableError:
# provider missing: guide user to reinstall provider or re-create entry
... Try / catch
try:
await hass.config_entries.async_setup(entry.entry_id)
except ConfigEntryNotReady:
# HA retries automatically; surface 'check OAuth provider' message to user Prevention
- Install and load the integration that provides the OAuth application credentials before setting up dependent entries.
- Delete and recreate entries whose OAuth provider was removed.
- After restores/downgrades, restart HA so OAuth implementations re-register.
When it happens
Trigger: Config entry created by an OAuth flow whose implementation was provided by another integration or a removed custom component; after uninstalling that provider or a HA downgrade, the implementation lookup fails at setup.
Common situations: Aladdin Connect entry set up via an application credential from a custom integration that was removed; HA restored from backup missing the provider; entity/platform reorganization between HA versions.
Related errors
- Cannot delete credential in use by integration {entry.domain
- OAuth implementation not available
- Credential is already linked to a user
- System generated users cannot disable multi-factor auth modu
- Invalid credentials: {ex}
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/818324510688686c.
Report an issue: GitHub.