Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise ConfigEntryNotReady before calling async_forward_entry_setups Error #2283

Closed
Snuffy2 opened this issue Jun 8, 2024 · 7 comments · Fixed by #2525
Closed

Raise ConfigEntryNotReady before calling async_forward_entry_setups Error #2283

Snuffy2 opened this issue Jun 8, 2024 · 7 comments · Fixed by #2525
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Snuffy2
Copy link
Contributor

Snuffy2 commented Jun 8, 2024

Describe the bug

When starting HA and the Alexa integration is not ready yet, I am seeing the errors below in the logs.

To Reproduce

Appears on ocaasion when HA is starting when the Alexa integration isn't ready yet.

System details

  • Home-assistant (version): 2024.6.1
  • alexa_media (version from const.py or HA startup): 4.10.1
  • alexapy (version from pip show alexapy or HA startup):
  • Amazon 2FA is enabled (y/n). <!---We will not debug login issues if unanswered--->: Yes

Logs

2024-06-07 22:48:50.089 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform switch; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-06-07 22:48:50.090 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-06-07 22:48:50.091 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform alarm_control_panel; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-06-07 22:48:50.091 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform light; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-06-07 22:48:50.092 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform binary_sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
@alandtse alandtse added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jun 9, 2024
@danielbrunt57
Copy link
Collaborator

This has been fixed in 4.10.3

@Snuffy2
Copy link
Contributor Author

Snuffy2 commented Jul 4, 2024

Sorry, this is still happening in 4.10.3:

2024-07-04 18:37:51.608 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform switch; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-07-04 18:37:51.609 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-07-04 18:37:51.610 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform alarm_control_panel; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-07-04 18:37:51.611 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform light; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-07-04 18:37:51.614 ERROR (MainThread) [homeassistant.helpers.entity_platform] alexa_media raises exception ConfigEntryNotReady in forwarded platform binary_sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups

@github-actions github-actions bot removed the help wanted Extra attention is needed label Jul 5, 2024
@danielbrunt57
Copy link
Collaborator

I believe @Petro31 recently committed a PR for 4.10.3 to fix this issue. Please re-download the integration in HACS and report back...

@kauthmbt
Copy link

It happens to me with the latest version too.

Logger: homeassistant.helpers.entity_platform
Quelle: helpers/entity_platform.py:418
Erstmals aufgetreten: 09:21:56 (5 Vorkommnisse)
Zuletzt protokolliert: 09:21:56

alexa_media raises exception ConfigEntryNotReady in forwarded platform switch; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform alarm_control_panel; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform light; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform binary_sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups

Home-assistant (version): 2024.7.2
alexa_media (version from const.py or HA startup): 4.11.0
alexapy (version from pip show alexapy or HA startup):
Amazon 2FA is enabled (y/n). <!---We will not debug login issues if unanswered--->: Yes

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Jul 18, 2024

@Petro31, PR 2294 did not resolve this.

@alandtse, @Petro31:
I'm not sure if the fix for this lies in Handling setup failures. I see init.py appears to use a coordinator but I'm not sure where await coordinator.async_config_entry_first_refresh() needs to go, or if that is even the answer.

I do not have the alexa_media raises exception ConfigEntryNotReady in forwarded platform errors so I can't experiment using my own system.

@jocamane
Copy link

I just installed version v4. 11.0 and errors that didn't exist appeared.

Logger: homeassistant.helpers.entity_platform
Source: helpers/entity_platform.py:420
First occurred: 21:44:24 (5 occurrences)
Last logged: 21:44:24

alexa_media raises exception ConfigEntryNotReady in forwarded platform switch; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform alarm_control_panel; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform light; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
alexa_media raises exception ConfigEntryNotReady in forwarded platform binary_sensor; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups

@danielbrunt57
Copy link
Collaborator

I just had an instance of these errors during an HA reload so I went hunting again.
The previous PR #2336 changed code in __init__.py but I've come to realize now that the code there is only loading the media_player component. The switch, sensor, light, etc. components are loaded by media_player.pyso it looks like it needs the same code change as was added toinit.py`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
5 participants