alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.49k stars 286 forks source link

After last update 4.12.4 broke the integration error Failed to Unload nothing works now! #2402

Closed thorrrr closed 2 months ago

thorrrr commented 2 months ago

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug After last update 4.12.4 broke the integration error Failed to Unload nothing works now!

Just updated to the new version and my AMP integration broke

Run any of my automations and they show up as repair if i hit repair it shows repaired but it has not as it brreaks again if i try to run automation!

Expected behavior To notify me as per the automation like it has for over 12 months

As above Screenshots image image

System details

System Information

version core-2024.7.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.33-haos
arch x86_64
timezone Europe/London
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1390 Downloaded Repositories | 28 HACS Data | ok
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 21 May 2025 at 01:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | false remote_server | eu-central-1-19.ui.nabu.casa certificate_status | ready instance_id | a078acfa1a3c41188cc35881bb65005e can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.4 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.2 agent_version | 1.6.0 docker_version | 26.1.4 disk_total | 38.7 GB disk_used | 15.4 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.2), Advanced SSH & Web Terminal (18.0.0), Home Assistant Google Drive Backup (0.112.1), Studio Code Server (5.15.0), MariaDB (2.7.1), Mosquitto broker (6.4.1), Z-Wave JS UI (3.9.2), Whisper (2.1.2), Piper (1.5.1)
Dashboards dashboards | 4 -- | -- resources | 19 views | 20 mode | storage
Recorder oldest_recorder_run | 29 July 2024 at 08:15 -- | -- current_recorder_run | 4 August 2024 at 11:07 estimated_db_size | 1024.55 MiB database_engine | mysql database_version | 10.11.6
Sonoff version | 3.7.3 (e240aaf) -- | -- cloud_online | 1 / 1 local_online | 1 / 1

Logs Please provide logs.

Logger: homeassistant.components.automation.postbox_mail_arrived Source: helpers/script.py:2002 integration: Automation (documentation, issues) First occurred: 13:48:56 (1 occurrences) Last logged: 13:48:56

Postbox Mail Arrived: Error executing script. Service not found for call_service at pos 2: Action notify.alexa_media not found

Additional context I tried a new pickle cookie but did nothing !

Other Logs This error originated from a custom integration.

Logger: custom_components.alexa_media Source: helpers/update_coordinator.py:312 integration: Alexa Media Player (documentation, issues) First occurred: 4 August 2024 at 11:17:52 (162 occurrences) Last logged: 14:07:52

Unexpected error fetching alexa_media data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alexa_media/init.py", line 395, in async_update_data login_obj = hass.data[DATA_ALEXAMEDIA]["accounts"][email]["login_obj"]


KeyError: 'accounts'

AND 

Logger: homeassistant.components.automation.postbox_mail_arrived
Source: helpers/script.py:2002
integration: Automation (documentation, issues)
First occurred: 13:48:56 (1 occurrences)
Last logged: 13:48:56

Postbox Mail Arrived: Error executing script. Service not found for call_service at pos 2: Action notify.alexa_media not found

<!---Add any other context about the problem here.--->
Debug logs  to follow shortly 

2024-08-05 14:07:52.004 ERROR (MainThread) [custom_components.alexa_media] Unexpected error fetching alexa_media data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alexa_media/__init__.py", line 395, in async_update_data
    login_obj = hass.data[DATA_ALEXAMEDIA]["accounts"][email]["login_obj"]
                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'accounts'
2024-08-05 14:07:52.012 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 0.008 seconds (success: False)

2024-08-05 14:11:05.332 INFO (Thread-18 (_run)) [google.api_core.bidi] Re-established stream
2024-08-05 14:11:52.468 INFO (MainThread) [homeassistant.components.automation.postbox_mail_arrived] Postbox Mail Arrived: Running automation actions
2024-08-05 14:11:52.468 INFO (MainThread) [homeassistant.components.automation.postbox_mail_arrived] Postbox Mail Arrived: Executing step call service
2024-08-05 14:11:52.469 INFO (MainThread) [homeassistant.components.automation.postbox_mail_arrived] Postbox Mail Arrived: Executing step call service
2024-08-05 14:11:52.469 ERROR (MainThread) [homeassistant.components.automation.postbox_mail_arrived] Postbox Mail Arrived: Error executing script. Service not found for call_service at pos 2: Action notify.alexa_media not found
Gr8fuldamned commented 2 months ago

Had the same problem so I decided to remove the integration and try the install again, now I'm getting an 'Unknown Error' whenever I try to re-add the integration. AMP-eror

2024-08-05 16:25:42.624 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-08-05 16:26:58.137 ERROR (MainThread) [homeassistant.components.automation.reload_alexa_media] Reload Alexa media: Error executing script. Unexpected error for call_service at pos 2: There were no matching config entries to reload 2024-08-05 16:26:58.148 ERROR (MainThread) [homeassistant.components.automation.reload_alexa_media] While executing automation automation.reload_alexa_media File "/config/custom_components/alexa_media/config_flow.py", line 551, in async_step_totp_register File "/config/custom_components/alexa_media/config_flow.py", line 358, in async_step_start_proxy File "/config/custom_components/alexa_media/config_flow.py", line 551, in async_step_totp_register File "/config/custom_components/alexa_media/config_flow.py", line 358, in async_step_start_proxy 2024-08-05 16:35:27.204 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/alexa_media/switch.py', 'wb') inside the event loop by custom integration 'hacs' at custom_components/hacs/repositories/base.py, line 600: zip_file.extractall(self.content.path.local) (offender: /usr/local/lib/python3.12/zipfile/__init__.py, line 1801: open(targetpath, "wb") as target:), please create a bug report at https://github.com/hacs/integration/issues 2024-08-05 16:35:27.605 WARNING (SyncWorker_26) [homeassistant.loader] We found a custom integration alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant File "/config/custom_components/alexa_media/config_flow.py", line 551, in async_step_totp_register File "/config/custom_components/alexa_media/config_flow.py", line 358, in async_step_start_proxy File "/config/custom_components/alexa_media/config_flow.py", line 551, in async_step_totp_register File "/config/custom_components/alexa_media/config_flow.py", line 358, in async_step_start_proxy File "/config/custom_components/alexa_media/config_flow.py", line 551, in async_step_totp_register File "/config/custom_components/alexa_media/config_flow.py", line 358, in async_step_start_proxy

AlexFoster30 commented 2 months ago

I uninstalled Alexa Media Player as well after the last update, and when I tried to reinstall it I got the same result as Gr8fuldamned. Any update on when this is going to be fixed?

SFA17SCM58D commented 2 months ago

I have been seeing the same as well. on my new home assistant setup, using HACS

HA versions:

HACS Version: 1.34.0

cbarth3 commented 2 months ago

I had updated to the latest and just got around to rebooting HA and now seeing this same failed to unload. HA versions:

Core 2024.7.4 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0

HACS Version: 1.34.0

Logger: homeassistant.config_entries Source: config_entries.py:801 First occurred: 5:46:33 PM (1 occurrences) Last logged: 5:46:33 PM

Error unloading entry xxxxx@XXXX.com - amazon.com for alexa_media Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 801, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alexa_media/init.py", line 1323, in async_unload_entry async_dismiss_persistent_notification( TypeError: async_dismiss() missing 1 required positional argument: 'notification_id'

This error originated from a custom integration.

Logger: custom_components.alexa_media Source: helpers/update_coordinator.py:312 integration: Alexa Media Player (documentation, issues) First occurred: 5:51:32 PM (19 occurrences) Last logged: 8:51:32 PM

Unexpected error fetching alexa_media data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alexa_media/init.py", line 395, in async_update_data login_obj = hass.data[DATA_ALEXAMEDIA]["accounts"][email]["login_obj"]


KeyError: 'accounts'
doronazl commented 2 months ago

Same here

Jeppedy commented 2 months ago

I rolled back to 4.12.1 and waiting until I see the issue is resolved...

Jeppedy commented 2 months ago

Oh, absolutely.

On Tue, Aug 6, 2024, 06:29 Frucoboti @.***> wrote:

4.12.1 is still working?

— Reply to this email directly, view it on GitHub https://github.com/alandtse/alexa_media_player/issues/2402#issuecomment-2271065032, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB32XY4WWFO2AIRETWSQGJTZQCXRDAVCNFSM6AAAAABMAI36IGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRGA3DKMBTGI . You are receiving this because you commented.Message ID: @.***>

cbarth3 commented 2 months ago

I rolled back to 4.12.1 and waiting until I see the issue is resolved...

I copied the 4.12.1 files and overwrote the current files and it is back working again.

jonrupell commented 2 months ago

Same issue for me. Hopefully they can fix soon!

jonrupell commented 2 months ago

Why was this issue closed. Still having the same issue.

Jeppedy commented 2 months ago

Why was this issue closed. Still having the same issue.

It's fixed in the latest version. Upgrade to the .5 release