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.5k stars 288 forks source link

problem to reconfigure integration/authentication #2593

Open pilot1981 opened 2 weeks ago

pilot1981 commented 2 weeks 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

I found alexa media player not configured; then I tried to configure again but I found a new form: tried to supply data many times, but integration is always not working. howto I can supply information in second and third value?

Schermata 2024-10-05 alle 20 35 34

To Reproduce

  1. Go to 'integration'
  2. Click on 'alexa media player'
  3. Scroll down to 'reconfigure'
  4. See error

Expected behavior

integration working fine; no re-authentication request; what I have to insert in second and thir value? device to add and device not to add?

what means error:

AlexaAPI: An exception of type TypeError occurred. Arguments: ('can only concatenate str (not "NoneType") to str',)

I use HASSOS, I'm not able to install/update alexapy module...I don't have pip3 available...

System details

Debug Logs (alexa_media & alexapy)

2024-10-05 14:37:32.289 DEBUG (MainThread) [custom_components.alexa_media.helpers] d***i@g*m: Returning uuid {'uuid': '268d2309eb7b7db11ecdb201b0c911e3', 'index': 0} 2024-10-05 14:37:32.326 DEBUG (MainThread) [alexapy.alexalogin] Creating TOTP for H****D2A 2024-10-05 14:37:32.327 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 966056 2024-10-05 14:37:32.327 DEBUG (MainThread) [alexapy.alexalogin] Login created for xxxxxxxxxx@gmail.com - amazon.it 2024-10-05 14:37:32.330 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.xxxxxxxx@gmail.com.pickle 2024-10-05 14:37:32.330 DEBUG (MainThread) [alexapy.alexalogin] Trying to load cookie from file /config/.storage/alexa_media.xxxxxxxxx@gmail.com.pickle 2024-10-05 14:37:32.339 DEBUG (MainThread) [alexapy.alexalogin] Trying to load aiohttpCookieJar to session 2024-10-05 14:37:32.351 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/alexa_media.dxxxxxxx@gmail.com.pickle 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.xxxxxxxxxxxx@gmail.com.txt 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Using credentials to log in 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Attempting oauth login to https://www.amazon.com/ap/signin?openid.return_to=https://www.amazon.com/ap/maplanding&openid.assoc_handle=amzn_dp_project_dee_ios&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&pageId=amzn_dp_project_dee_ios&accountStatusPolicy=P1&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.mode=checkid_setup&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.client_id=device:323638643233303965623762376462313165636462323031623063393131653332333431333234393536346335363335353634643332353733383331&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.oa2.response_type=code&openid.ns=http://specs.openid.net/auth/2.0&openid.pape.max_auth_age=0&openid.oa2.scope=device_auth_access&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=jTRCQHzjPbr_n_zvxBFTX_oTbCDASrGaTpLi78c2eDs&language=it_IT 2024-10-05 14:37:32.352 DEBUG (MainThread) [alexapy.alexalogin] Loaded last request to https://www.amazon.com/ap/register 2024-10-05 14:37:32.353 DEBUG (MainThread) [alexapy.alexalogin] Processing https://www.amazon.com/ap/register 2024-10-05 14:37:32.419 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fc40edda8d0>,), {'cookies': {}}): An error occurred accessing AlexaAPI: An exception of type TypeError occurred. Arguments: ('can only concatenate str (not "NoneType") to str',)

Additional context

Hassos 2024.10.1 on VM

seganku commented 2 weeks ago

Did you upgrade to 4.13.3, then Redownload 4.13.2?

pilot1981 commented 2 weeks ago

Did you upgrade to 4.13.3, then Redownload 4.13.2?

No, I’m using 4.13.2

emufan commented 2 weeks ago

Delete integration, restart, re-add-integration.

klingklang76 commented 2 weeks ago

What I've found so far (fellow italian user speaking): as long as you just read sensors (for instance temperature, next alarm, etc) it works fine. As soon as you send a command to the device (be it media player or a vocal input), something breaks and it asks to be reconfigured just as you showed. I've tried everything: delete and re-add, re-authenticate in every way possible, but no luck so far. As I understand, it's an issue limited to amazon.it domain (and maybe some others). We'll wait and hope in further updates...

DariusVaitkus commented 2 weeks ago

klingklang76, are you using Pihole and it is blocking api.amazonalexa.com and xxxxxx.cloudfront.net ?

klingklang76 commented 2 weeks ago

@DariusVaitkus I guess not, since I don't know what you're talking about :)

pilot1981 commented 2 weeks ago

I done again alexa integration, and now seems to be ok, but I’m not able to control my echo dot; in logs I found this:

2024-10-06 21:59:29.222 DEBUG (MainThread) [alexapy.alexaapi] d**i@gm:Login error detected; ignoring post request to /api/np/command with {‘type’: ‘PlayCommand’} {‘deviceSerialNumber’: ‘G0922H0725120SFN’, ‘deviceType’: ‘A4ZXE0RM7LQ7A’} 2024-10-06 21:59:29.222 WARNING (MainThread) [alexapy.helpers] alexaapi.play((<alexapy.alexaapi.AlexaAPI object at 0x7f3a4f3eb950>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: (‘Login error detected; not contacting API’,)

pilot1981 commented 2 weeks ago

Hi, I installed again all and it works only few minutes...then I receive these errors:

Registratore: alexapy.helpers Fonte: runner.py:189 Prima occorrenza: 21:04:08 (6 occorrenze) Ultima registrazione: 21:04:15

Registratore: alexapy.helpers Fonte: custom_components/alexa_media/init.py:778 Integrazione: Alexa Media Player (documentazione, problemi) Prima occorrenza: 20:53:40 (2 occorrenze) Ultima registrazione: 20:53:40

home-assistant_alexa_media_2024-10-07T19-07-13.229Z.log

boivinx7 commented 1 week ago

I can repport that i have the same issues with reconfigure, and configure from scratch

Kosztyk commented 1 week ago

i have same issue, can't set it again

2024-10-12 19:36:17.849 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7fa965091050>, '/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/config_flow.py, line 280: self.login = 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/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 556, in start task = asyncio.Task(coro, loop=loop, eager_start=True) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle return await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, args, kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 370, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 417, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 520, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/alexa_media/config_flow.py", line 280, in async_step_user self.login = AlexaLogin(

2024-10-12 19:36:28.005 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x7fa9600edad0>,) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/config_flow.py, line 374: self.proxy = AlexaProxy( (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/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle return await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, *kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, args, kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 370, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 417, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 520, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/alexa_media/config_flow.py", line 362, in async_step_user return await self.async_step_start_proxy(user_input) File "/config/custom_components/alexa_media/config_flow.py", line 374, in async_step_start_proxy self.proxy = AlexaProxy(

2024-10-12 19:42:49.732 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath('/config/.storage/alexa_media.mail.account@hotmail.com.pickle'),) inside the event loop by custom integration 'alexa_media' at custom_components/alexa_media/config_flow.py, line 420: if await self.login.test_loggedin(): (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/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle return await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, *request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 215, in get return await super().get(request, flow_id) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 108, in get result = await self._flow_mgr.async_configure(flow_id) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 370, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 417, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 520, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/alexa_media/config_flow.py", line 420, in async_step_finish_proxy if await self.login.test_loggedin():

2024-10-12 19:42:49.825 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath('/config/.storage/alexa_media.mail.account@hotmail.com.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())

2024-10-12 19:42:57.462 WARNING (MainThread) [alexapy.helpers] alexaapi.get_customer_history_records((<alexapy.alexalogin.AlexaLogin object at 0x7fa94f8376e0>,), {'max_record_size': 10}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Unauthorized',) 2024-10-12 19:42:57.462 WARNING (MainThread) [alexapy.helpers] alexaapi.get_last_device_serial((<alexapy.alexalogin.AlexaLogin object at 0x7fa94f8376e0>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Unauthorized',) 2024-10-12 19:42:57.526 WARNING (MainThread) [alexapy.helpers] alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7fa95030e8d0>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',) 2024-10-12 19:42:58.630 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400) 2024-10-12 19:42:58.631 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 547, in _handle_entity_registry_updated await self._sync_helper(to_update, to_remove) File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 487, in _sync_helper await self.async_get_access_token() File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 340, in async_get_access_token raise alexa_errors.RequireRelink homeassistant.components.alexa.errors.RequireRelink 2024-10-12 19:42:58.635 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400) 2024-10-12 19:42:58.635 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 547, in _handle_entity_registry_updated await self._sync_helper(to_update, to_remove) File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 487, in _sync_helper await self.async_get_access_token() File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 340, in async_get_access_token raise alexa_errors.RequireRelink homeassistant.components.alexa.errors.RequireRelink 2024-10-12 19:42:58.650 WARNING (MainThread) [hass_nabucasa.cloud_api] Fetched https://alexa-api.nabucasa.com/access_token (400) 2024-10-12 19:42:58.650 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 547, in _handle_entity_registry_updated await self._sync_helper(to_update, to_remove) File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 487, in _sync_helper await self.async_get_access_token() File "/usr/src/homeassistant/homeassistant/components/cloud/alexa_config.py", line 340, in async_get_access_token raise alexa_errors.RequireRelink homeassistant.components.alexa.errors.RequireRelink 2024-10-12 19:43:07.581 WARNING (MainThread) [alexapy.helpers] alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7fa95030e8d0>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',) 2024-10-12 19:43:11.207 WARNING (MainThread) [alexapy.helpers] alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7fa95030e8d0>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',) 2024-10-12 19:43:29.510 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fa9502fe690>,), {'cookies': {}}): An error occurred accessing AlexaAPI: An exception of type InvalidUrlClientError occurred. Arguments: (URL('/errors/validateCaptcha'),) 2024-10-12 19:43:29.511 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry mail.account@hotmail.com - amazon.com for alexa_media Traceback (most recent call last): 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()) File "/config/deps/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper return await func(*args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/deps/lib/python3.12/site-packages/alexapy/alexalogin.py", line 687, in login post_resp = await self._session.post( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 588, in _request raise err_exc_cls(url) aiohttp.client_exceptions.InvalidUrlClientError: /errors/validateCaptcha 2024-10-12 19:46:18.272 ERROR (MainThread) [msmart.base_device] Network error 192.168.68.76:6444: Transport is closing or closed. 2024-10-12 19:48:33.043 ERROR (MainThread) [msmart.base_device] Network error 192.168.68.76:6444: Transport is closing or closed. 2024-10-12 19:48:54.336 ERROR (MainThread) [msmart.base_device] Network error 192.168.68.76:6444: Unsupported packet: 10e06784d4681db2f320bf1d72fae3a7e79dd2b15e9cd4b9a0c54808f1480220d9e596ccf5e491e17257e18021064b39d8f3a7ab6e9b3e53e28eced4bd4270cc 2024-10-12 19:49:09.254 ERROR (MainThread) [msmart.base_device] Network error 192.168.68.76:6444: Error packet received. 2024-10-12 19:51:18.275 ERROR (MainThread) [msmart.base_device] Network error 192.168.68.76:6444: Transport is closing or closed. 2024-10-12 19:53:33.040 ERROR (MainThread) [msmart.base_device] Network error 192.168.68.76:6444: Transport is closing or closed. 2024-10-12 19:53:37.202 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session (None) 2024-10-12 19:53:39.690 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fa9502fe690>,), {'cookies': {}}): An error occurred accessing AlexaAPI: An exception of type InvalidUrlClientError occurred. Arguments: (URL('/errors/validateCaptcha'),) 2024-10-12 19:53:39.691 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry mail.account@hotmail.com - amazon.com for alexa_media Traceback (most recent call last): 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()) File "/config/deps/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper return await func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/deps/lib/python3.12/site-packages/alexapy/alexalogin.py", line 687, in login post_resp = await self._session.post( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 588, in _request raise err_exc_cls(url) aiohttp.client_exceptions.InvalidUrlClientError: /errors/validateCaptcha 2024-10-12 19:53:44.260 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session (None) 2024-10-12 19:53:46.520 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fa9502fe690>,), {'cookies': {}}): An error occurred accessing AlexaAPI: An exception of type InvalidUrlClientError occurred. Arguments: (URL('/errors/validateCaptcha'),) 2024-10-12 19:53:46.521 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry mail.account@hotmail.com - amazon.com for alexa_media Traceback (most recent call last): 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()) File "/config/deps/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper return await func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/deps/lib/python3.12/site-packages/alexapy/alexalogin.py", line 687, in login post_resp = await self._session.post( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 588, in _request raise err_exc_cls(url) aiohttp.client_exceptions.InvalidUrlClientError: /errors/validateCaptcha 2024-10-12 19:54:00.728 DEBUG (MainThread) [custom_components.alexa_media.helpers] c***a@h*m: Returning uuid {'uuid': '5690fc01b802acd9dfdd267a477f967c', 'index': 0} 2024-10-12 19:54:00.779 DEBUG (MainThread) [alexapy.alexalogin] Login created for mail.account@hotmail.com - amazon.com 2024-10-12 19:54:00.780 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session (None) 2024-10-12 19:54:00.783 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.mail.account@hotmail.com.pickle 2024-10-12 19:54:00.784 DEBUG (MainThread) [alexapy.alexalogin] Trying to load cookie from file /config/.storage/alexa_media.mail.account@hotmail.com.pickle 2024-10-12 19:54:00.790 DEBUG (MainThread) [alexapy.alexalogin] Trying to load aiohttpCookieJar to session 2024-10-12 19:54:00.801 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/alexa_media.mail.account@hotmail.com.pickle 2024-10-12 19:54:00.801 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.mail.account@hotmail.com.txt 2024-10-12 19:54:00.801 DEBUG (MainThread) [alexapy.alexalogin] Using credentials to log in 2024-10-12 19:54:00.802 DEBUG (MainThread) [alexapy.alexalogin] Attempting oauth login to https://www.amazon.com/ap/signin?openid.return_to=https://www.amazon.com/ap/maplanding&openid.assoc_handle=amzn_dp_project_dee_ios&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&pageId=amzn_dp_project_dee_ios&accountStatusPolicy=P1&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.mode=checkid_setup&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.client_id=device:353639306663303162383032616364396466646432363761343737663936376332333431333234393536346335363335353634643332353733383331&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.oa2.response_type=code&openid.ns=http://specs.openid.net/auth/2.0&openid.pape.max_auth_age=0&openid.oa2.scope=device_auth_access&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=3KqDC96cJg9cL1AxMbSici-ZaU5MADaVQEoR8uNiwCU&language=en_US 2024-10-12 19:54:00.804 DEBUG (MainThread) [alexapy.alexalogin] Loaded last request to https://www.amazon.com/ap/signin?openid.return_to=https://www.amazon.com/ap/maplanding&openid.assoc_handle=amzn_dp_project_dee_ios&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&pageId=amzn_dp_project_dee_ios&accountStatusPolicy=P1&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.mode=checkid_setup&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.client_id=device:353639306663303162383032616364396466646432363761343737663936376332333431333234393536346335363335353634643332353733383331&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.oa2.response_type=code&openid.ns=http://specs.openid.net/auth/2.0&openid.pape.max_auth_age=0&openid.oa2.scope=device_auth_access&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=3KqDC96cJg9cL1AxMbSici-ZaU5MADaVQEoR8uNiwCU&language=en_US 2024-10-12 19:54:00.804 DEBUG (MainThread) [alexapy.alexalogin] Processing https://www.amazon.com/ap/signin?openid.return_to=https://www.amazon.com/ap/maplanding&openid.assoc_handle=amzn_dp_project_dee_ios&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&pageId=amzn_dp_project_dee_ios&accountStatusPolicy=P1&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.mode=checkid_setup&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.client_id=device:353639306663303162383032616364396466646432363761343737663936376332333431333234393536346335363335353634643332353733383331&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.oa2.response_type=code&openid.ns=http://specs.openid.net/auth/2.0&openid.pape.max_auth_age=0&openid.oa2.scope=device_auth_access&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=3KqDC96cJg9cL1AxMbSici-ZaU5MADaVQEoR8uNiwCU&language=en_US 2024-10-12 19:54:00.841 DEBUG (MainThread) [alexapy.alexalogin] Captcha/2FA not requested; confirming login. 2024-10-12 19:54:00.842 DEBUG (MainThread) [alexapy.alexalogin] Attempting to register with amazon.com 2024-10-12 19:54:01.266 DEBUG (MainThread) [alexapy.alexalogin] auth response <ClientResponse(https://api.amazon.com/auth/register) [400 Bad Request]> <CIMultiDictProxy('Server': 'Server', 'Date': 'Sat, 12 Oct 2024 16:54:01 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '426', 'Connection': 'keep-alive', 'x-amz-rid': 'W6FZDZSPVF54C075Z1WH', 'x-amzn-RequestId': '85acc166-0b7b-4e57-aa8d-5e1af5b48adb', 'X-Amz-Date': 'Sat, 12 Oct 2024 16:54:01 GMT', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload')> with {"requested_extensions": ["device_info", "customer_info"], "cookies": {"website_cookies": [], "domain": ".amazon.com"}, "registration_data": {"domain": "Device", "app_version": "2.2.556530.0", "device_type": "A2IVLV5VM2W81", "device_name": "%FIRST_NAME%'s%DUPE_STRATEGY_1ST%Alexa Media Player", "os_version": "16.6", "device_serial": "5690fc01b802acd9dfdd267a477f967c", "device_model": "iPhone", "app_name": "Alexa Media Player", "software_version": "1"}, "auth_data": {"client_id": "353639306663303162383032616364396466646432363761343737663936376332333431333234393536346335363335353634643332353733383331", "authorization_code": "ANpDQrgDnklpFEFbwHpVANwC", "code_verifier": "tT6JSOFE-tlN9IddpOIFmd4HjjGF26URwevJVgIp2t4", "code_algorithm": "SHA-256", "client_domain": "DeviceLegacy"}, "user_context_map": {"frc": "X1Us5vwnvtc+3XX3IqPURx4/8JzKbWte2R7ySSD3DHgcBnmYAE9VdG49/FDW11zlAqvmx0Aw2UkDm6KvvwWjmKqUbw32hUakbiT8uHyyhRshN77LZ7Ds/XFtFCecbV1xnFXNqOxnkbK0i2f6wU7ky0smgypRLbJB/uObcNO/SITZfsP4M39w98AmXJbuWBq7baHAnYU5vl5BTCUhGXJSQcID/mCqg3nqarVGaswxoYDYk2tzJxcQxm367vb2BkBeaJB+exEX9F33jvWWaTDjhVu4DLlX7SyMnSBDNTWzQQf/jttLgqz5ABNEvzAJcsaVTnDzBOtDFsyOWrsAs3x9BuGXbWE8M1sdPqJRV/T/M3/G7P9xaNW1t3EUQbK6hckpZH/pCkGXg6CDfHWKKzFSxySd9bmLmSGbYg"}, "requested_token_type": ["bearer", "mac_dms", "website_cookies"]} 2024-10-12 19:54:01.266 DEBUG (MainThread) [alexapy.alexalogin] Unable to register with ['amazon.com'] 2024-10-12 19:54:01.469 DEBUG (MainThread) [alexapy.alexalogin] capabilities response <ClientResponse(https://api.amazonalexa.com/v1/devices/@self/capabilities) [403 Forbidden]> <CIMultiDictProxy('Content-Length': '0', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Sat, 12 Oct 2024 16:54:01 GMT', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload', 'x-amz-rid': 'W2N0NHGYSS3B49SVVB7D', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 a58780d22b5e142a1e7e092cfb4a356c.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'OTP50-P1', 'X-Amz-Cf-Id': 'GwJAhoYN61u_EZL9BtqXJQi2gXofkB7DYXLs8Gba8Hdaefbl9LmFzA==')> with {"legacyFlags": {"SUPPORTS_COMMS": true, "SUPPORTS_ARBITRATION": true, "SCREEN_WIDTH": 1170, "SUPPORTS_SCRUBBING": true, "SPEECH_SYNTH_SUPPORTS_TTS_URLS": false, "SUPPORTS_HOME_AUTOMATION": true, "SUPPORTS_DROPIN_OUTBOUND": true, "FRIENDLY_NAME_TEMPLATE": "VOX", "SUPPORTS_SIP_OUTBOUND_CALLING": true, "VOICE_PROFILE_SWITCHING_DISABLED": true, "SUPPORTS_LYRICS_IN_CARD": false, "SUPPORTS_DATAMART_NAMESPACE": "Vox", "SUPPORTS_VIDEO_CALLING": true, "SUPPORTS_PFM_CHANGED": true, "SUPPORTS_TARGET_PLATFORM": "TABLET", "SUPPORTS_SECURE_LOCKSCREEN": false, "AUDIO_PLAYER_SUPPORTS_TTS_URLS": false, "SUPPORTS_KEYS_IN_HEADER": false, "SUPPORTS_MIXING_BEHAVIOR_FOR_AUDIO_PLAYER": false, "AXON_SUPPORT": true, "SUPPORTS_TTS_SPEECHMARKS": true}, "envelopeVersion": "20160207", "capabilities": [{"version": "0.1", "interface": "CardRenderer", "type": "AlexaInterface"}, {"interface": "Navigation", "type": "AlexaInterface", "version": "1.1"}, {"type": "AlexaInterface", "version": "2.0", "interface": "Alexa.Comms.PhoneCallController"}, {"type": "AlexaInterface", "version": "1.1", "interface": "ExternalMediaPlayer"}, {"type": "AlexaInterface", "interface": "Alerts", "configurations": {"maximumAlerts": {"timers": 2, "overall": 99, "alarms": 2}}, "version": "1.3"}, {"version": "1.0", "interface": "Alexa.Display.Window", "type": "AlexaInterface", "configurations": {"templates": [{"type": "STANDARD", "id": "app_window_template", "configuration": {"sizes": [{"id": "fullscreen", "type": "DISCRETE", "value": {"value": {"height": 1440, "width": 3200}, "unit": "PIXEL"}}], "interactionModes": ["mobile_mode", "auto_mode"]}}]}}, {"type": "AlexaInterface", "interface": "AccessoryKit", "version": "0.1"}, {"type": "AlexaInterface", "interface": "Alexa.AudioSignal.ActiveNoiseControl", "version": "1.0", "configurations": {"ambientSoundProcessingModes": [{"name": "ACTIVE_NOISE_CONTROL"}, {"name": "PASSTHROUGH"}]}}, {"interface": "PlaybackController", "type": "AlexaInterface", "version": "1.0"}, {"version": "1.0", "interface": "Speaker", "type": "AlexaInterface"}, {"version": "1.0", "interface": "SpeechSynthesizer", "type": "AlexaInterface"}, {"version": "1.0", "interface": "AudioActivityTracker", "type": "AlexaInterface"}, {"type": "AlexaInterface", "interface": "Alexa.Camera.LiveViewController", "version": "1.0"}, {"type": "AlexaInterface", "version": "1.0", "interface": "Alexa.Input.Text"}, {"type": "AlexaInterface", "interface": "Alexa.PlaybackStateReporter", "version": "1.0"}, {"version": "1.1", "interface": "Geolocation", "type": "AlexaInterface"}, {"interface": "Alexa.Health.Fitness", "version": "1.0", "type": "AlexaInterface"}, {"interface": "Settings", "type": "AlexaInterface", "version": "1.0"}, {"configurations": {"interactionModes": [{"dialog": "SUPPORTED", "interactionDistance": {"value": 18, "unit": "INCHES"}, "video": "SUPPORTED", "keyboard": "SUPPORTED", "id": "mobile_mode", "uiMode": "MOBILE", "touch": "SUPPORTED"}, {"video": "UNSUPPORTED", "dialog": "SUPPORTED", "interactionDistance": {"value": 36, "unit": "INCHES"}, "uiMode": "AUTO", "touch": "SUPPORTED", "id": "auto_mode", "keyboard": "UNSUPPORTED"}]}, "type": "AlexaInterface", "interface": "Alexa.InteractionMode", "version": "1.0"}, {"type": "AlexaInterface", "configurations": {"catalogs": [{"type": "IOS_APP_STORE", "identifierTypes": ["URI_HTTP_SCHEME", "URI_CUSTOM_SCHEME"]}]}, "version": "0.2", "interface": "Alexa.Launcher"}, {"interface": "System", "version": "1.0", "type": "AlexaInterface"}, {"interface": "Alexa.IOComponents", "type": "AlexaInterface", "version": "1.4"}, {"type": "AlexaInterface", "interface": "Alexa.FavoritesController", "version": "1.0"}, {"version": "1.0", "type": "AlexaInterface", "interface": "Alexa.Mobile.Push"}, {"type": "AlexaInterface", "interface": "InteractionModel", "version": "1.1"}, {"interface": "Alexa.PlaylistController", "type": "AlexaInterface", "version": "1.0"}, {"interface": "SpeechRecognizer", "type": "AlexaInterface", "version": "2.1"}, {"interface": "AudioPlayer", "type": "AlexaInterface", "version": "1.3"}, {"type": "AlexaInterface", "version": "3.1", "interface": "Alexa.RTCSessionController"}, {"interface": "VisualActivityTracker", "version": "1.1", "type": "AlexaInterface"}, {"interface": "Alexa.PlaybackController", "version": "1.0", "type": "AlexaInterface"}, {"type": "AlexaInterface", "interface": "Alexa.SeekController", "version": "1.0"}, {"interface": "Alexa.Comms.MessagingController", "type": "AlexaInterface", "version": "1.0"}]} {"User-Agent": "AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone", "Accept-Language": "en-US", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-type": "application/json; charset=UTF-8", "authorization": "Bearer None"} 2024-10-12 19:54:01.469 DEBUG (MainThread) [alexapy.alexalogin] Failed to register capabilities 2024-10-12 19:54:01.758 DEBUG (MainThread) [alexapy.alexalogin] 5 cookies successfully exchanged for refresh token for domain .amazon.com 2024-10-12 19:54:01.758 DEBUG (MainThread) [alexapy.alexalogin] Attempting to discover CSRF token 2024-10-12 19:54:01.964 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /spa/index.html 2024-10-12 19:54:02.445 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /api/devices-v2/device?cached=false 2024-10-12 19:54:02.602 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /templates/oobe/d-device-pick.handlebars 2024-10-12 19:54:02.753 DEBUG (MainThread) [alexapy.alexalogin] No csrf token found 2024-10-12 19:54:02.918 DEBUG (MainThread) [alexapy.alexalogin] GET: https://alexa.amazon.com/api/bootstrap returned 401:Unauthorized with response <CIMultiDictProxy('Content-Length': '0', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Sat, 12 Oct 2024 16:54:02 GMT', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'x-amz-rid': 'B4D9MEN38YDQCG5V8308', 'loginUrl': 'https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https%3A%2F%2Falexa.amazon.com%2Flogin&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&', 'x-amzn-RequestId': 'B4D9MEN38YDQCG5V8308', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 7e0d8fe3a1927ce16863bca92fb950e4.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'OTP50-P2', 'X-Amz-Cf-Id': 'ej9Lfxbxa4M7dOKS6S_uCsINhw1-EzyUqDdVjBAtrbQojBxgCJX5WQ==')> 2024-10-12 19:54:02.918 DEBUG (MainThread) [alexapy.alexalogin] Not logged in: An exception of type ContentTypeError occurred. Arguments: (RequestInfo(url=URL('https://alexa.amazon.com/api/bootstrap'), method='GET', headers=<CIMultiDictProxy('Host': 'alexa.amazon.com', 'User-Agent': 'AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone', 'Accept': '/', 'Accept-Language': '', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Accept-Encoding': 'gzip, deflate, br', 'Cookie': 'session-id=136-4620224-9711024; session-id-time=2359472042l; session-token=a0RR+3f63Ah85DfUshOddBRyTykHuvY8UtdOEp6NHNYUE+4dUJEmq+5uDlz6kR0x2yrEiqzWAOmz95Y4M5CTaR7FSjzG3laowtZ2NWX9eTVJilFkJsHrnEmLMk/JgdhC7EGih17mOb8Y8tLAtHFTCdeNaYOhYac6AYtqrWbkdC7nE80hM0+qiLvlXDdg4nNompvxBDiMWb63Av4UYDWyomzy/pYcJ+BFG4kY8A0mwrnLuDHRzhU5YD07o5L2XzmmKQWQXG6KEgn/QkOdlMSfbIZesvNbvSFQUNeduoHgmoCwRjTbjCvCmM67dfDDL8chdEl5FZtHU2nC8RIL/vDewevqCf7N28Xj; ubid-main=130-7524385-0351830')>, real_url=URL('https://alexa.amazon.com/api/bootstrap')), ()) 2024-10-12 19:54:02.919 DEBUG (MainThread) [alexapy.alexalogin] Login failed; check credentials 2024-10-12 19:54:02.919 DEBUG (MainThread) [alexapy.alexalogin] Found post url to /errors/validateCaptcha 2024-10-12 19:54:02.919 DEBUG (MainThread) [alexapy.alexalogin] Preparing form submission to /errors/validateCaptcha with input data: {} 2024-10-12 19:54:02.920 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fa9502fe690>,), {'cookies': {}}): An error occurred accessing AlexaAPI: An exception of type InvalidUrlClientError occurred. Arguments: (URL('/errors/validateCaptcha'),) 2024-10-12 19:54:02.920 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry mail.account@hotmail.com - amazon.com for alexa_media Traceback (most recent call last): 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()) File "/config/deps/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper return await func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/deps/lib/python3.12/site-packages/alexapy/alexalogin.py", line 687, in login post_resp = await self._session.post( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 588, in _request raise err_exc_cls(url) aiohttp.client_exceptions.InvalidUrlClientError: /errors/validateCaptcha

TheBisk commented 1 week ago

Same problem here with amazon.it

samuele2723 commented 1 week ago

Same problem here with amazon.it

Ciao, i am having problem with amazon.it here https://github.com/alandtse/alexa_media_player/issues/2558

please check if is same or different issue, i re.configured the intergration but have no device shown up

fablav76 commented 1 week ago

Same problem with amazon.it I've reinstalled the integration from scratch, disabled the polling and everything is ok, except for not correctly updates of entities states. Enabling polling of devices, after a while appear the error of authentication. In log I see this, just few seconds after I've enabled the polling:

_

Questo errore ha avuto origine da un'integrazione personalizzata.

Registratore: alexapy.helpers Fonte: custom_components/alexa_media_delete/init.py:778 Integrazione: alexa_media_delete Prima occorrenza: 00:05:39 (2 occorrenze) Ultima registrazione: 00:05:39

alexaapi.get_customer_history_records((<alexapy.alexalogin.AlexaLogin object at 0x7f671db907a0>,), {'max_record_size': 10}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Unauthorized',) alexaapi.get_last_device_serial((<alexapy.alexalogin.AlexaLogin object at 0x7f671db907a0>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Unauthorized',)

_

19fabiom84 commented 5 days ago

Same problem with amazon.it I've reinstalled the integration from scratch, disabled the polling and everything is ok, except for not correctly updates of entities states. Enabling polling of devices, after a while appear the error of authentication. In log I see this, just few seconds after I've enabled the polling:

_

Questo errore ha avuto origine da un'integrazione personalizzata. Registratore: alexapy.helpers Fonte: custom_components/alexa_media_delete/init.py:778 Integrazione: alexa_media_delete Prima occorrenza: 00:05:39 (2 occorrenze) Ultima registrazione: 00:05:39 alexaapi.get_customer_history_records((<alexapy.alexalogin.AlexaLogin object at 0x7f671db907a0>,), {'max_record_size': 10}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Unauthorized',) alexaapi.get_last_device_serial((<alexapy.alexalogin.AlexaLogin object at 0x7f671db907a0>,), {}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Unauthorized',)

_

The same for me!

stefanomarino75 commented 4 days ago

Same problem.

francesco3395 commented 17 hours ago

Same problem, 15 minutes after configuration/re-configuration stop to work.

Can we get this issue scaled up?