question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to sign up again Tesla: cannot see CAPTCHA image

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:26 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
alandtsecommented, Aug 15, 2021

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.

0reactions
OverZealouscommented, Aug 18, 2021

Just an FYI for anyone else trying to get around this, I tried just disabling the external URL, and it wasn’t enough. I had to disable my NGINX add-on before I could get it to work, even when set up to only use the local URL.

After it was set up, I could turn NGINX back on, and it worked just fine. It’s possible there’s something weird in my configuration I couldn’t figure out, but at least these steps are a solid workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tesla Added a Captcha Verification on the Login Page #390
So... The auth scripts have broken down. Upon going on the App as well as the Web, it seems Tesla has added a...
Read more >
How to Fix Captcha Image Not Showing in Google Chrome?
Learn how to fix captcha image not showing in Google Chrome and load the image so that you can login or submit form...
Read more >
Can't login to Slacker | Page 2 - Tesla Motors Club
I have been unable to get anything on the entertainment system except for radio. I get the same error on login. Says to...
Read more >
Why Is the CAPTCHA Image Not Displayed? - | 1KA
The issue of a missing CAPTCHA image upon registration or in the survey itself occasionally occurs in certain versions of browsers, most often...
Read more >
Repair: Captcha Graphic Image Not Showing in Your Browser
Workaround 1: Fix "Captcha image not working" through Control Panel ; Step 3: In the ; Internet Properties window, click on ; General...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found