Limych / ha-tor_check

Check your TOR network connection and get your current TOR exit IP
Other
2 stars 0 forks source link

Integration fails to set up with "Something really wrong happened!" error and python exception #25

Closed cerebrate closed 1 month ago

cerebrate commented 1 month ago

System Health details

System Information

version core-2024.9.2
installation_type Unknown
dev false
hassio false
docker false
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.1.0-22-amd64
arch x86_64
timezone America/Chicago
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok HACS Data | ok GitHub API Calls Remaining | 4993 Installed Version | 2.0.1 Stage | running Available Repositories | 1413 Downloaded Repositories | 53
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | October 15, 2024 at 7:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | false remote_connected | false alexa_enabled | true google_enabled | false remote_server | us-east-1-12.ui.nabu.casa certificate_status | ready instance_id | b9ec96fc4873462a974205e55597124c can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 7 -- | -- resources | 28 views | 39 mode | storage
Recorder oldest_recorder_run | August 24, 2024 at 11:20 AM -- | -- current_recorder_run | September 16, 2024 at 2:05 PM estimated_db_size | 7539.56 MiB database_engine | mysql database_version | 8.2.0

Checklist

Describe the issue

After installing Tor Check from HACS (version 0.2.0) on Home Assistant (2024.9.2), attempting to set up the integration produces an "Unknown error occurred" message after entering the SOCKS5 host and port. The message given below is seen in the debug log.

Reproduction steps

  1. Install Tor Check from HACS.
  2. Restart Home Assistant.
  3. On the Integrations page, select Add Integration.
  4. Select TOR Check from the list.
  5. Enter the SOCKS5 proxy host ("tor.arkane-systems.lan") and port ("9050")
  6. Click SUBMIT.
  7. Observe the error message.

Debug logs

2024-09-19 04:58:42.230 ERROR (MainThread) [custom_components.tor_check] Something really wrong happened!
Traceback (most recent call last):
File "/config/custom_components/tor_check/api.py", line 36, in _async_get_data
response = await session.request(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 657, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 564, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 975, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1319, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ProxyConnector._wrap_create_connection() missing 2 required positional arguments: 'host' and 'port'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/tor_check/config_flow.py", line 68, in async_step_user
await self._test_credentials(
File "/config/custom_components/tor_check/config_flow.py", line 111, in _test_credentials
await client.async_get_my_tor_ip()
File "/config/custom_components/tor_check/api.py", line 76, in async_get_my_tor_ip
return await _async_get_data(self._tor_session, IPIFY_API_URL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tor_check/api.py", line 59, in _async_get_data
raise TorCheckApiClientError("Something really wrong happened!") from exception
custom_components.tor_check.api.TorCheckApiClientError: Something really wrong happened!

Diagnostics dump

Not possible to retrieve.

cerebrate commented 1 month ago

Note to anyone else having this issue:

The above "fix" (https://github.com/Limych/ha-tor_check/issues/25#issuecomment-2360623775) is malware (first time I've seen someone trying that on GitHub). Adorable.

Limych commented 1 month ago

Please upgrade Home Assistant to latest version — it's bug in core-2024.9.2, not in this component.