core icon indicating copy to clipboard operation
core copied to clipboard

AdGuard Integration : Cannot add integration since V4.7.5

Open Gorouk opened this issue 2 years ago • 15 comments

The problem

Hello,

I have the AdGuard addon installed, and since the upgrade 4.7.5, the integration was not working anymore. I've uninstalled the integration, and everytime I try to reinstall it, i've an error message: "Unknown error occurred"

I tried to restarte HA, and to perform a full reboot of the host but the message is still the same.

In the log, I have this error :

Logger: aiohttp.server
Source: components/adguard/config_flow.py:90
First occurred: 20:34:22 (2 occurrences)
Last logged: 20:39:57

Error handling request
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 100, 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 "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/adguard/config_flow.py", line 90, in async_step_user
    await adguard.version()
  File "/usr/local/lib/python3.10/site-packages/adguardhome/adguardhome.py", line 224, in version
    return response["version"]
KeyError: 'version'

What version of Home Assistant Core has the issue?

Home Assistant 2022.11.1

What was the last working version of Home Assistant Core?

Home Assistant 2022.11.1

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

AdGuard

Link to integration documentation on our website

https://www.home-assistant.io/integrations/adguard

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Gorouk avatar Nov 07 '22 19:11 Gorouk

Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (adguard) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of adguard can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign adguard Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


adguard documentation adguard source (message by IssueLinks)

home-assistant[bot] avatar Nov 07 '22 19:11 home-assistant[bot]

http://[IP]:[PORT]/control/status

gives

{"version":"v0.107.17","language":"en","dns_addresses":["[IP_V4]","[IP_V6]","[INTERNAL_IP]"],"dns_port":53,"http_port":45158,"protection_enabled":true,"dhcp_available":true,"running":true}

and same result with a curl from terminal addon (with -u [login]:[password])

Gorouk avatar Nov 07 '22 19:11 Gorouk

Hi Frenck,

fyi, it still occurred with 2022.11.2

best regards

Gorouk avatar Nov 08 '22 21:11 Gorouk

Similar issue - in 2022.11.2 unable to load/view dashboard, just get spinning circle since the upgrade.

jd3073 avatar Nov 09 '22 02:11 jd3073

Well, for me the addon works well, I can access the dashboard, it's more an issue with the integration.

Gorouk avatar Nov 09 '22 12:11 Gorouk

@Gorouk Same issue here: the AddOn works well but the integration doesn't connect. Connection with a standalone AdGuard Home server works OK, but I'd rather keep the AddOn.

rabmoor avatar Nov 09 '22 21:11 rabmoor

Same, I can add that I have it only on one RPI4 system. Suddenly the integration does not get data anymore. Reloading does not help, reboot system no luck. Reinstall of adguard does not help. I now cannot setup the integration anymore. My second DNS adguard on exact the same hardware and software version HASSOS ADDON does not have any problems with the integration. But I don't want to test adding the integration there, because it might be a problem to.

adekloet avatar Nov 16 '22 19:11 adekloet

Found in my log: 127.0.0.1 on port 45158 (add-on) startup log. Configured the integration with that info worked!

adekloet avatar Nov 17 '22 10:11 adekloet

@adekloet I've the same kind of structure as you, the HA addon as a primary adguard dns server, and a spare "classic" adguard home as secondary on a separate rpi. I checked the addon start logs and have the same as you, and confirm that using 127.0.0.1 on port 45158 does works for me too as a workaround.

Gorouk avatar Nov 17 '22 12:11 Gorouk

@Gorouk Glad it worked for you this way, but this is indeed not how it was before. My dual setup is now working and I can use the sensors again in statistics and alerting again.

adekloet avatar Nov 17 '22 13:11 adekloet

HI, i got an docker image wit adguard on my unraid server. it also was not working and i got an connection failed, but when i changed the port from 3000 to 80 is started working

KrX3D avatar Nov 17 '22 14:11 KrX3D

Found in my log: 127.0.0.1 on port 45158 (add-on) startup log. Configured the integration with that info worked!

Hey How did you do this sorry?

JamieP83 avatar Nov 26 '22 22:11 JamieP83

@adekloet I've the same kind of structure as you, the HA addon as a primary adguard dns server, and a spare "classic" adguard home as secondary on a separate rpi. I checked the addon start logs and have the same as you, and confirm that using 127.0.0.1 on port 45158 does works for me too as a workaround.

Hey, where do I do that?

JamieP83 avatar Nov 26 '22 22:11 JamieP83

When you add the adguard integration (not the add-on) you are asked for a IP and a port to get the sensors in HA to be used in a dashboard or automations etc. If you have the same problem, then you could try the above IP and port number to add the integration to get the sensors. (make sure you have the Adguard Add-on installed and that it is running in the supervised HA install)

adekloet avatar Nov 29 '22 10:11 adekloet

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I just tried to add the adguard integration using port 3000 but does not work. Tried port 80 and only getting 1 entity (dns queries). I've set up the integration before using port 80 and got 14 entitiesm not sure if the updates made are the issue or not.

HAOS Info:

  • Home Assistant 2023.3.5
  • Supervisor 2023.03.1
  • Operating System 9.5
  • Frontend 20230309.1 - latest

twinkie0101 avatar Mar 23 '23 03:03 twinkie0101