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

New v4.13.3 Alexia Media released causing HA crash and reboot continuously #2582

Closed
clanic70 opened this issue Oct 3, 2024 · 25 comments
Closed

Comments

@clanic70
Copy link

clanic70 commented Oct 3, 2024

Describe the bug

After one day of troubleshooting with HA due to continuous crash/reboot after 10min, I've found out that the last Alexia Media releasing was causing this frustrating issue.

To Reproduce

Without this update of Alexa Media integration, the system was stable for many hours. After v4.13.3 installation, immediately HA crash and auto-reboot.

Expected behavior

Screenshots

System details

  • Home Assistant version:

Core 2024.10.0
Supervisor 2024.09.1
Operating System 13.1
Frontend 20241002.2

  • alexa_media version (from const.py or HA startup log):
    v4.13.3

Debug Logs (alexa_media & alexapy)
Please provide logs.

Registratore: homeassistant.util.loop
Fonte: util/loop.py:136
Prima occorrenza: 16:50:53 (5 occorrenze)
Ultima registrazione: 16:51:03

Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7ff4804499d0>, '/usr/local/lib/python3.12/site-packages/certifi/cacert.pem', None, None) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/init.py, line 341: AlexaLogin( (offender: /usr/local/lib/python3.12/ssl.py, line 708: context.load_verify_locations(cafile, capath, cadata)), please create a bug report at https://github.com/alandtse/alexa_media_player/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/setup.py", line 165, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/usr/src/homeassistant/homeassistant/setup.py", line 461, in async_setup_component await asyncio.gather( File "/usr/src/homeassistant/homeassistant/setup.py", line 463, in create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/alexa_media/init.py", line 341, in async_setup_entry AlexaLogin(
Detected blocking call to open with args (PosixPath('/config/.storage/alexa_media.....pickle'),) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/init.py, line 361: await login.login(cookies=await login.load_cookie()) (offender: /usr/local/lib/python3.12/site-packages/aiohttp/cookiejar.py, line 126: with file_path.open(mode="rb") as f:), please create a bug report at https://github.com/alandtse/alexa_media_player/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/alexa_media/init.py", line 361, in async_setup_entry await login.login(cookies=await login.load_cookie())
Detected blocking call to open with args ('/config/custom_components/solarman/inverter_definitions/sofar_hyd3k-6k-es.yaml',) inside the event loop by custom integration 'solarman' at custom_components/solarman/solarman.py, line 31: with open(self.path + self.lookup_file) as f: (offender: /config/custom_components/solarman/solarman.py, line 31: with open(self.path + self.lookup_file) as f:), please create a bug report at https://github.com/StephanJoubert/home_assistant_solarman/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/solarman/init.py", line 18, in async_setup_entry await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2155, in async_forward_entry_setups await self._async_forward_entry_setups_locked(entry, platforms) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2166, in async_forward_entry_setups_locked await asyncio.gather( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2168, in create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2248, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 131, in async_setup_entry return await hass.data[DATA_COMPONENT].async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 194, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 328, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 358, in async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 45, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/solarman/sensor.py", line 89, in async_setup_entry _do_setup_platform(hass, entry.options, async_add_entities) File "/config/custom_components/solarman/sensor.py", line 54, in _do_setup_platform inverter = Inverter(path, inverter_sn, inverter_host, inverter_port, inverter_mb_slaveid, lookup_file) File "/config/custom_components/solarman/solarman.py", line 31, in init with open(self.path + self.lookup_file) as f:
Detected blocking call to open with args (PosixPath('/config/.storage/[email protected]'),) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/init.py, line 361: await login.login(cookies=await login.load_cookie()) (offender: /usr/local/lib/python3.12/site-packages/aiohttp/cookiejar.py, line 121: with file_path.open(mode="wb") as f:), please create a bug report at https://github.com/alandtse/alexa_media_player/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/alexa_media/init.py", line 361, in async_setup_entry await login.login(cookies=await login.load_cookie())
Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7ff47af63cd0>,) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/init.py, line 876: http2 = HTTP2EchoClient( (offender: /usr/local/lib/python3.12/site-packages/httpx/_config.py, line 149: context.load_verify_locations(cafile=cafile)), please create a bug report at https://github.com/alandtse/alexa_media_player/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_verify_locations Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/alexa_media/init.py", line 363, in async_setup_entry await setup_alexa(hass, config_entry, login) File "/config/custom_components/alexa_media/init.py", line 1266, in setup_alexa await http2_connect() File "/config/custom_components/alexa_media/init.py", line 876, in http2_connect http2 = HTTP2EchoClient(

Additional context

@Xytho
Copy link

Xytho commented Oct 3, 2024

Duplicate of #2579

@amandaworkman1988
Copy link

I have this exact issue too!

@foxuio
Copy link

foxuio commented Oct 3, 2024

same issue, HA. reboot continuously

@Armilar
Copy link

Armilar commented Oct 3, 2024

It happens to me too. HA crashes immediately and automatically restarts. The boot loop then repeats itself permanently.

@clanic70
Copy link
Author

clanic70 commented Oct 3, 2024

Better to restore a previous HA core backup and skip this Alexa update version until a fix will be found 😞

@clanic70
Copy link
Author

clanic70 commented Oct 3, 2024

Duplicate of #2579

Yes you're right, I saw now the same topic. 👍

@ellsa100
Copy link

ellsa100 commented Oct 3, 2024

same for me. had to restore previous full backup

@fuzzysb
Copy link

fuzzysb commented Oct 3, 2024

Same for Me also, downgraded plugin, took me a while, fell victim to new HA core update, alexa Media player update and firmware update for my zigbee stick..... scratching my head as to the cause.

@Vetscarehome
Copy link

I have the exact same problem, multiple reboots. I disabled the integration and the problem was solved.

@Scope666
Copy link

Scope666 commented Oct 3, 2024

Everyone that's run into this, does v4.13.2 definitely solve it? I got bit by this after upgrading this morning, but I've also had a similar issue a couple days ago, and I'm wondering if v4.13.2 can still cause it after it's been running for awhile.

@ingo916
Copy link

ingo916 commented Oct 3, 2024

I am having the same issue, I had to disable the Alexa Media Player integration. works fine now. I'll have to wait for the next update.

@robikop
Copy link

robikop commented Oct 3, 2024

Same here. I reverted to the previous version…

@cliviu74
Copy link

cliviu74 commented Oct 3, 2024

Could be related to the storing the cookie in the pickle file

WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath('/config/.storage/[email protected]'),) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/__init__.py, line 361

2024-10-03 17:48:31.071 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath('/config/.storage/[email protected]'),) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/init.py, line 361: await login.login(cookies=await login.load_cookie()) (offender: /usr/local/lib/python3.12/site-packages/aiohttp/cookiejar.py, line 126: with file_path.open(mode="rb") as f:), please create a bug report at https://github.com/alandtse/alexa_media_player/issues

For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open

@cliviu74
Copy link

cliviu74 commented Oct 3, 2024

@clanic70 you have leaked your email address in the log. You might want to edit your original post and anonimize it in the log sample (search for .pickle)

@cliviu74
Copy link

cliviu74 commented Oct 3, 2024

@alandtse this release needs to be pulled back until it's fixed. The home assistant crash is pretty nasty

@rikmueller
Copy link

Went back to previous version (re-downloaded it via hacs). Pretty bad bug.

@clanic70
Copy link
Author

clanic70 commented Oct 3, 2024

@clanic70 you have leaked your email address in the log. You might want to edit your original post and anonimize it in the log sample (search for .pickle)

Thanks for warning me! I didn't check the log deeply 😞

@upholland
Copy link

Facing the same problem, HA keeps crashing when updated Alexa media player to version 14.13.3

@Jojo-A
Copy link

Jojo-A commented Oct 3, 2024

@clanic70 Please close this issue because it is a duplicate of #2579

EVERYONE:
check out #2579

Where is the point in opening one after another issue regarding the same problem?!

@clanic70
Copy link
Author

clanic70 commented Oct 3, 2024

Calm down! The point was; no clear problem statement in the title. Now I know we are talking about the same issue.
No problem to close it 😉

@clanic70 clanic70 closed this as completed Oct 3, 2024
@Jojo-A
Copy link

Jojo-A commented Oct 3, 2024

Thank you!

@CancunManny
Copy link

Everyone that's run into this, does v4.13.2 definitely solve it? I got bit by this after upgrading this morning, but I've also had a similar issue a couple days ago, and I'm wondering if v4.13.2 can still cause it after it's been running for awhile.

Yes, v4.13.2 is stable, at least for me.

@foxuio
Copy link

foxuio commented Oct 4, 2024 via email

@Scope666
Copy link

Scope666 commented Oct 4, 2024

A couple days ago, before v4.13.3 I ran into this where the CPU was pegged by HA, and even rebooting didn't fix it. Restoring from backup did ... maybe it's a different issue ... db corruption or something. Regardless it's similar to what's mentioned in this issue, and that did happen to me this morning before I found this post. (I'm on 4.13.2 right now and it's fine at the moment ... 2-3% cpu utilization)

@PJLLB
Copy link

PJLLB commented Oct 4, 2024

It appears they have pulled 4.13.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests