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
500 Internal Server Error - during Authentication after OTP confirmation #1765
Comments
Please provide logs per the FAQ. I only need the last step when you submit. Please note you'll need to scrub your username/password. |
Attached the log, I hope I provided everything required.
Thx
david
[debug.log](https://github.com/custom-components/alexa_media_player/files/9909375/debug.log)
|
Seeing the same issue |
Hi guys, I hope it will help |
Tried to export all log now.. pls check if anything is missing. |
tried as well, was not working for me, same error. but thanks for letting me know :) |
now it seems when i restart HA i get a notification with an OTP? |
I have the same issue with the Alexa integration. I'm stuck at the 500 Internal error page and have a pretty similar (identical?) error log. I have tried everything I know with no luck :(. Edit: I tried from outside my network as suggested by Sly8383 and the error changed to "401: unauthorized" after a new captcha (image to write the letters instead of the username and password) from Amazon. The log shows: Login attempt or request with invalid authentication from 86-127-239-165.digimobil.es (86.127.239.165). Requested URL: '/auth/alexamedia/proxy/ap/signin/135-6868654-0138912'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36) This makes me feel I'm doing something wrong when filling the setup page... |
Internal and external i got the Same error. |
I have the same issue of an 500 Internal Server Error coming up after the Amazon Alexa login page. I use an nginx reverse proxy (on another machine), not sure whether this relates to the problem or not. Some time ago, the integration still worked but stopped doing so (not recently). I tried the setup procedure both from internal and external (via VPN), no difference in outcome or behaviour. I put some logs here. |
Hello, Error logs: (the OTP is correct and same as my phone btw) |
Updated to 4.5.0 this morning and Home Assistant 2023.1.2, still same Error 500 after the authentication form. Error logs: |
If you have IPv6 enabled in HA, try disabling. Odd network errors like you all seem to be seeing may be linked to that setting. You can reenabled after authenticating fully. |
Hello, Thanks in any case. |
Hello, |
Same here, IPv6 is disabled already since long time. |
I solved this problem by trying to create another bug ticket and while doing so, I stumbled upon the solution! Please, don't make me type it all over again, I've already posted all the juicy details on link here. Ta-da! 🎉 So go ahead and give it a try yourself - maybe it will solve your problem too! |
Edit: actually it worked - the key difference was to use the internal IP:PORT not the external one. |
Thank you cvladan, after doing as you said now it works!! |
Yes! I was able to solve the problem by doing both of the following two steps:
|
I would like to direct attention to this thread, as the comments there are also noteworthy - #1825 |
Hi, |
Using the Terminal & SSH add-on, when I run
|
Maybe |
Yeah, I tried that too.
I'm using the VirtualBox image, so my options may be limited.
|
Describe the bug
After confirmation OTP from Built-in 2FA App Key confirmed successfully the next page is loading successfully.
Entering email and PWD and clicking the login in button gives the following error:
500 Internal Server Error
Server got itself in trouble
To Reproduce
see above
Expected behavior
Screenshots
System details
Frontend 20220907.2 - latest
Logs
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/alexa_media/config_flow.py:881
Integration: alexa_media (documentation, issues)
First occurred: 3:10:01 PM (1 occurrences)
Last logged: 3:10:01 PM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/anyio/streams/tls.py", line 130, in _call_sslobject_method
result = func(*args)
File "/usr/local/lib/python3.10/ssl.py", line 917, in read
v = self._sslobj.read(len)
ssl.SSLWantReadError: The operation did not complete (read) (_ssl.c:2548)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 33, in read
return await self._stream.receive(max_bytes=max_bytes)
File "/usr/local/lib/python3.10/site-packages/anyio/streams/tls.py", line 195, in receive
data = await self._call_sslobject_method(self._ssl_object.read, max_bytes)
File "/usr/local/lib/python3.10/site-packages/anyio/streams/tls.py", line 137, in _call_sslobject_method
data = await self.transport_stream.receive()
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1265, in receive
await self._protocol.read_event.wait()
File "/usr/local/lib/python3.10/asyncio/locks.py", line 214, in wait
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 31, in read
with anyio.fail_after(timeout):
File "/usr/local/lib/python3.10/site-packages/anyio/_core/_tasks.py", line 118, in exit
raise TimeoutError
TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 105, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 84, in handle_async_request
) = await self._receive_response_headers(**kwargs)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 148, in _receive_response_headers
event = await self._receive_event(timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 177, in _receive_event
data = await self._network_stream.read(
File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 30, in read
with map_exceptions(exc_map):
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
raise to_exc(exc)
httpcore.ReadTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/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 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/config/custom_components/alexa_media/config_flow.py", line 881, in wrapped
return await cls.handler(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/authcaptureproxy/auth_capture_proxy.py", line 375, in all_handler
resp = await getattr(self.session, method)(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1842, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1527, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1614, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1642, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1679, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1716, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ReadTimeout
The text was updated successfully, but these errors were encountered: