Many problems with the Alexa Media Player integration

I am having a difficult time getting the Alexa Media Player Integration working reliably. It started a month or two ago when it would ask me to reconfigure the integration several times per week. These reconfigurations worked, but they only lasted a day or two before the automations stopped working and service calls involving alexa_media_player entities threw errors.
I decided to remove the integration and add it back in. It was removed successfully but I have not been able to re-add it due to a nice variety of problems. After entering your Amazon credentials, the installation process takes you to an external website which appears to be the NabuCasa URL. This has failed many times including DNS lookup failures and host not responding errors. When it does successfully open that URL, I get an infinite loop of “not a robot checks” like this:

That is, I enter the characters and press “Continue Shopping” but it just generates another check with different letters. I can enter the letters again and again but it never advances past that page. The text there says to make sure cookies are enabled for the page and I have done that.

How do I get past this?

1 Like

I have the same problem. Impossible to do the integration

I successfully reconfigured the integration yesterday. Unfortunately, there was no breakthrough or determination of root cause. I just tried it over and over several times per day and, finally it worked.
I might note that i tried to reconfigure on my phone using the companion app and it always failed but with different failure modes which included 404 errors on the nabucasa URL.
I wish you the best of luck if you do what i did.

I can’t tell from your post, but have you tried the built-in 2FA method:

I did try that and it wound up asking me to confirm the code from the 2FA app. I had no idea what app was supposed to offer me that code. I could not find anything in the Alexa app on my Android phone or on Amazon’s website that would generate a 2FA code so I avoided that option.

Have you made that work?

I initially set up my Amazon account to use an authentication App like “Authy”. But you should be able to use the authentication app built into the Alexa Media Player (AMP) Integration. I have tried the built-in method the last couple of times the AMP asked me to relogin and have been successful thus far.

[EDIT]
I came across this post which points to a YouTube video on setting up 2FA on AMP

I haven’t been able to install this integration, now, does it need the Alexa website to work? because Amazon basicly closed that site and now only tells you to install the app on your phone

I was facing this same exact “infinite loop” issue during initial setup as well as when I deleted the Integration and reinstalled.
Found a way around that was to use the same URL they supplied for authentication and loading it in another browser and was able to successfully authenticate on first try.

1 Like

I can’t download Alexa media player also can’t configure tuya cloud and the weather app is not working either. To me seems like the cloud-dependent integrations are not working :weary::weary::weary: I even installed a fresh copy of the home assistant and couldn’t set up Tuya either and weather integration is not working either. :man_shrugging:t2::man_shrugging:t2::man_shrugging:t2::man_shrugging:t2::man_shrugging:t2:

I got the internal 2FA working without problems. However, the integration still looses the amazon logon every 2 days or so, which requires me to log on again. Has anyone been able to find a solution how the integratoin stays logged on (semi-) permanently? Thanks a lot for help

Disabling IPv6 on HA all integrations will work fine.

I ALWAYS end up with:

500 Internal Server Error

Server got itself in trouble

on http://10.0.0.183:8123/auth/alexamedia/proxy/verify

2MFA Seems to work fine - I create an App and “paste” the QR in, etc etc.
Just like Configuration · alandtse/alexa_media_player Wiki · GitHub states

Every time the log is:

2024-07-10T15:02:22.502161881Z 2024-07-10 17:02:22.484 ERROR (MainThread) [aiohttp.server] Error handling request
2024-07-10T15:02:22.502480594Z Traceback (most recent call last):
2024-07-10T15:02:22.502561631Z   File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions
2024-07-10T15:02:22.502660052Z     yield
2024-07-10T15:02:22.502700541Z   File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 373, in handle_async_request
2024-07-10T15:02:22.502737498Z     resp = await self._pool.handle_async_request(req)
2024-07-10T15:02:22.502770087Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.502807096Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 216, in handle_async_request
2024-07-10T15:02:22.502839118Z     raise exc from None
2024-07-10T15:02:22.502868137Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection_pool.py", line 196, in handle_async_request
2024-07-10T15:02:22.502900294Z     response = await connection.handle_async_request(
2024-07-10T15:02:22.502933651Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.502965220Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request
2024-07-10T15:02:22.502998236Z     return await self._connection.handle_async_request(request)
2024-07-10T15:02:22.503029201Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.503063089Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 143, in handle_async_request
2024-07-10T15:02:22.503095539Z     raise exc
2024-07-10T15:02:22.503127038Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 113, in handle_async_request
2024-07-10T15:02:22.503163932Z     ) = await self._receive_response_headers(**kwargs)
2024-07-10T15:02:22.503195124Z         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.503230716Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 186, in _receive_response_headers
2024-07-10T15:02:22.503265988Z     event = await self._receive_event(timeout=timeout)
2024-07-10T15:02:22.503297382Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.503330351Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_async/http11.py", line 224, in _receive_event
2024-07-10T15:02:22.503363308Z     data = await self._network_stream.read(
2024-07-10T15:02:22.503393811Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.503424628Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_backends/anyio.py", line 32, in read
2024-07-10T15:02:22.503457492Z     with map_exceptions(exc_map):
2024-07-10T15:02:22.503487732Z   File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
2024-07-10T15:02:22.503526535Z     self.gen.throw(value)
2024-07-10T15:02:22.503559112Z   File "/usr/local/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
2024-07-10T15:02:22.503591461Z     raise to_exc(exc) from exc
2024-07-10T15:02:22.503655538Z httpcore.ReadTimeout
2024-07-10T15:02:22.503689372Z 
2024-07-10T15:02:22.503721131Z The above exception was the direct cause of the following exception:
2024-07-10T15:02:22.503752448Z 
2024-07-10T15:02:22.503781612Z Traceback (most recent call last):
2024-07-10T15:02:22.503811801Z   File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
2024-07-10T15:02:22.503843959Z     resp = await request_handler(request)
2024-07-10T15:02:22.503874927Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.503905167Z   File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
2024-07-10T15:02:22.503937451Z     resp = await handler(request)
2024-07-10T15:02:22.503967403Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.503999319Z   File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
2024-07-10T15:02:22.504033292Z     return await handler(request)
2024-07-10T15:02:22.504063388Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.504094203Z   File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
2024-07-10T15:02:22.504126836Z     return await handler(request)
2024-07-10T15:02:22.504157429Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.504188297Z   File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
2024-07-10T15:02:22.504220819Z     return await handler(request)
2024-07-10T15:02:22.504251456Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.504281721Z   File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
2024-07-10T15:02:22.504314349Z     return await handler(request)
2024-07-10T15:02:22.504344767Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.504375735Z   File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
2024-07-10T15:02:22.504412359Z     return await handler(request)
2024-07-10T15:02:22.504443633Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.504476270Z   File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
2024-07-10T15:02:22.504508383Z     return await handler(request)
2024-07-10T15:02:22.504537821Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.504566678Z   File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
2024-07-10T15:02:22.504607163Z     response = await handler(request)
2024-07-10T15:02:22.507135101Z                ^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.508040514Z   File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
2024-07-10T15:02:22.508115416Z     result = await handler(request, **request.match_info)
2024-07-10T15:02:22.508137848Z              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.508153837Z   File "/config/custom_components/alexa_media/config_flow.py", line 897, in wrapped
2024-07-10T15:02:22.508597821Z     return await cls.handler(request, **kwargs)
2024-07-10T15:02:22.508645807Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.508662433Z   File "/usr/local/lib/python3.12/site-packages/authcaptureproxy/auth_capture_proxy.py", line 439, in all_handler
2024-07-10T15:02:22.508678645Z     resp = await getattr(self.session, method)(
2024-07-10T15:02:22.508693471Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.509084543Z   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1892, in post
2024-07-10T15:02:22.509110548Z     return await self.request(
2024-07-10T15:02:22.509256863Z            ^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.509278017Z   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1574, in request
2024-07-10T15:02:22.509294363Z     return await self.send(request, auth=auth, follow_redirects=follow_redirects)
2024-07-10T15:02:22.509325655Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.509342152Z   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1661, in send
2024-07-10T15:02:22.509358376Z     response = await self._send_handling_auth(
2024-07-10T15:02:22.509373835Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.509389986Z   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
2024-07-10T15:02:22.509406369Z     response = await self._send_handling_redirects(
2024-07-10T15:02:22.509421794Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.509437381Z   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
2024-07-10T15:02:22.509453510Z     response = await self._send_single_request(request)
2024-07-10T15:02:22.509468912Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.509484488Z   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1763, in _send_single_request
2024-07-10T15:02:22.509501855Z     response = await transport.handle_async_request(request)
2024-07-10T15:02:22.509517412Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-10T15:02:22.509533279Z   File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 372, in handle_async_request
2024-07-10T15:02:22.509549480Z     with map_httpcore_exceptions():
2024-07-10T15:02:22.509564614Z   File "/usr/local/lib/python3.12/contextlib.py", line 158, in __exit__
2024-07-10T15:02:22.509580284Z     self.gen.throw(value)
2024-07-10T15:02:22.509613468Z   File "/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
2024-07-10T15:02:22.509632289Z     raise mapped_exc(message) from exc
2024-07-10T15:02:22.509647395Z httpx.ReadTimeout

Tried both my public and LAN URL etc…