tesla: Unable to sign up again Tesla: cannot see CAPTCHA image

Version of the custom_component

0.1.5

Configuration

# Not-applicable, I cannot get it to let me configure it again

# Unless you want my entire config.yaml, but that seems unnecessary,
# and is going to be missing most of the actual configuration in other files.
# Also I try to configure via the UI as much as possible.

I do have my server set up with both internal (homeassistant.local:8123) and external (https://«external-url»:1234) URLs, and the external one is working fine when I check it from inside OR outside my network.

I also verified the https://«external-url»:1234/auth/tesla/callback?flow_id=... is accessible by my browser.

Describe the bug

I had the integration working, then it started failing when everyone’s Tesla integration failed (about when I upgraded to HA 2021.08.1).

I removed the integration and tried to re-add it, but now I can’t get it to work. The first time, there’s usually not a CAPTCHA image. I enter the un/pw and then it reloads asking to include the letters in the image. Except, there’s no image to look at. Also, I don’t use 2FA, I had just switched to this the last time Tesla logins stopped working, and never switched back.

Because I removed the integration, I can’t use the technique where I use the iOS app to get new tokens, either.

I tried waiting 2 days between when this started happening and now in case it was related to too many login attempts, but I haven’t had any trouble getting the login to work in other apps or browsers.

Sorry if this is covered somewhere, but I couldn’t find mention of it in issues, or in the README.

Debug log

This error originated from a custom integration.

Logger: aiohttp.server
Source: custom_components/tesla_custom/config_flow.py:325
Integration: Tesla Custom Integration (documentation, issues)
First occurred: 2:40:41 PM (88 occurrences)
Last logged: 2:48:02 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 61, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 283, in handle_async_request
    ) = await self._pool.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 136, in handle_async_request
    self.socket = await self._open_socket(timeout)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 163, in _open_socket
    return await self._backend.open_tcp_stream(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/auto.py", line 44, in open_tcp_stream
    return await self.backend.open_tcp_stream(
  File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 154, in open_tcp_stream
    stream = await TLSStream.wrap(
  File "/usr/local/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
    raise to_exc(exc) from None
httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, 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 197, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 144, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/config/custom_components/tesla_custom/config_flow.py", line 325, in wrapped
    return await cls.handler(request, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/authcaptureproxy/auth_capture_proxy.py", line 385, in all_handler
    resp = await getattr(self.session, method)(site, headers=headers)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1722, in get
    return await self.request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1481, in request
    response = await self.send(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1568, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1604, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1640, in _send_handling_redirects
    response = await self._send_single_request(request, timeout)
  File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1681, in _send_single_request
    ) = await transport.handle_async_request(
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 278, in handle_async_request
    (
  File "/usr/local/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 78, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Glad you got it to work. I had that issue myself at the beginning as I use NGINX proxy to do a HTTPS upgrade but I resolved it already. Perhaps it’s because I don’t use a port number. I’ll put some tests in to see if that’s it.

Thanks again for the report. If I get a fix in place, I may @ you to ask you to test it if that’s ok.