Skip to content
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

HAOS Supervisor - Failed to Setup after updating core to 2023.6.0 and Supervisor to 2023.06.1 #4360

Closed
viny182 opened this issue Jun 8, 2023 · 29 comments
Labels

Comments

@viny182
Copy link

viny182 commented Jun 8, 2023

Describe the issue you are experiencing

Hello,

Since I've update the HA Supervisor to 2023.06.1 and HA Core to 2023.06.01, i'm getting the "Failed to setup" message for Supervisor component on the new Integrations dashboard.

image

The issue is similar to #91461 and to #90558, but as they are for a different Core/Supervisor versions, I've decided to open this new issue as it could be related to the new one.

Here is what I've already tried:

Trough SSH:
ha core rebuild
ha supervisor reload
ha supervisor update
ha supervisor repair
ha supervisor restart (several times)
banner

On host:
Restart HA Core and the whole host several times.
No Repair available from the web interface -> Config -> System -> Repairs

The Observer component report that everything's fine.
image

Sys Info:
Home Assistant 2023.6.0
Supervisor 2023.06.1
Operating System 10.2
Frontend 20230607.0 - latest

Logs:

Logger: homeassistant.config_entries
Source: components/hassio/handler.py:534
First occurred: 09:18:57 (1 occurrences)
Last logged: 09:18:57

Error setting up entry Supervisor for hassio
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 649, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 251, in async_config_entry_first_refresh
    await self._async_refresh(
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 957, in _async_refresh
    await self.hassio.refresh_updates()
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 36, in _wrapper
    data = await funct(*argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 534, in send_command
    request = await self.websession.request(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

I'm running the AdGuard Home addon on this instance as the main DNS server for my entire network, and I'm not able to see any blocked requests to the host neither the containers.

Any ideas how to troubleshoot this further?

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Update Supervisor to 2023.06.1
  2. Update Core to 2023.06.0

...

Anything in the Supervisor logs that might be useful for us?

23-06-08 19:10:44 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
23-06-08 19:10:44 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-06-08 19:10:44 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
23-06-08 19:10:44 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/OPHoperHPO/hassio-addons repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/mincka/ha-addons repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/w35l3y/hassio-addons repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/FaserF/hassio-addons repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/FunkeyFlo/ps5-mqtt repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/jdeath/homeassistant-addons repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
23-06-08 19:12:40 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository
23-06-08 19:14:41 INFO (MainThread) [supervisor.store] Loading add-ons from store: 196 all - 0 new - 0 remove
23-06-08 19:14:41 INFO (MainThread) [supervisor.store] Loading add-ons from store: 196 all - 0 new - 0 remove
23-06-08 19:17:19 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
23-06-08 19:17:19 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
23-06-08 19:17:19 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from cebe7a76_hassio_google_drive_backup
23-06-08 19:17:19 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
23-06-08 19:17:19 INFO (MainThread) [supervisor.api.middleware.security] /addons access from cebe7a76_hassio_google_drive_backup
23-06-08 19:17:19 INFO (MainThread) [supervisor.api.middleware.security] /backups/new/full access from cebe7a76_hassio_google_drive_backup
23-06-08 19:17:19 INFO (MainThread) [supervisor.backups.manager] Creating new full backup with slug a8e78338
23-06-08 19:17:19 INFO (MainThread) [supervisor.backups.manager] Backing up a8e78338 store Add-ons
23-06-08 19:17:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on a0d7b954_adguard
23-06-08 19:17:21 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon a0d7b954_adguard
23-06-08 19:17:21 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on core_configurator
23-06-08 19:17:21 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon core_configurator
23-06-08 19:17:26 INFO (SyncWorker_2) [supervisor.docker.addon] Export image c50d1fa4/amd64-addon-cloudflare_tunnel to /data/tmp/tmp05yuf75j/image.tar
23-06-08 19:17:27 INFO (SyncWorker_2) [supervisor.docker.addon] Export image c50d1fa4/amd64-addon-cloudflare_tunnel done
23-06-08 19:17:27 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on c50d1fa4_cloudflare_tunnel
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon c50d1fa4_cloudflare_tunnel
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on a0d7b954_appdaemon
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon a0d7b954_appdaemon
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on cebe7a76_hassio_google_drive_backup
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon cebe7a76_hassio_google_drive_backup
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on a0d7b954_chrony
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon a0d7b954_chrony
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on db21ed7f_filebrowser
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon db21ed7f_filebrowser
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on core_duckdns
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon core_duckdns
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on core_mosquitto
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon core_mosquitto
23-06-08 19:18:19 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on a0d7b954_glances
23-06-08 19:18:20 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon a0d7b954_glances
23-06-08 19:18:30 INFO (SyncWorker_2) [supervisor.docker.addon] Export image d4868bb1/amd64-addon-pulseaudio_fix to /data/tmp/tmpsjxlldbu/image.tar
23-06-08 19:18:32 INFO (SyncWorker_2) [supervisor.docker.addon] Export image d4868bb1/amd64-addon-pulseaudio_fix done
23-06-08 19:18:32 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on d4868bb1_pulseaudio_fix
23-06-08 19:21:24 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon d4868bb1_pulseaudio_fix
23-06-08 19:21:24 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on core_ssh
23-06-08 19:21:24 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon core_ssh
23-06-08 19:21:24 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on db21ed7f_epicgamesfree
23-06-08 19:21:24 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon db21ed7f_epicgamesfree
23-06-08 19:21:24 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on core_samba
23-06-08 19:21:24 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon core_samba
23-06-08 19:21:34 INFO (SyncWorker_1) [supervisor.docker.addon] Export image 605cee21/amd64-addon-apache2-minimal to /data/tmp/tmp32ffjex4/image.tar
23-06-08 19:21:36 INFO (SyncWorker_1) [supervisor.docker.addon] Export image 605cee21/amd64-addon-apache2-minimal done
23-06-08 19:21:36 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on 605cee21_apache2-minimal
23-06-08 19:24:22 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon 605cee21_apache2-minimal
23-06-08 19:24:22 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on db21ed7f_portainer
23-06-08 19:24:22 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon db21ed7f_portainer
23-06-08 19:24:22 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on 49e24ccc_firefox
23-06-08 19:25:14 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon 49e24ccc_firefox
23-06-08 19:25:14 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on db21ed7f_free_games_claimer
23-06-08 19:26:12 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon db21ed7f_free_games_claimer
23-06-08 19:26:12 INFO (MainThread) [supervisor.homeassistant.module] Backing up Home Assistant Core config folder
23-06-08 19:30:14 INFO (MainThread) [supervisor.homeassistant.module] Backup Home Assistant Core config folder done
23-06-08 19:30:14 INFO (MainThread) [supervisor.backups.manager] Backing up a8e78338 store folders
23-06-08 19:30:14 INFO (SyncWorker_3) [supervisor.backups.backup] Backing up folder share
23-06-08 19:31:41 INFO (SyncWorker_3) [supervisor.backups.backup] Backup folder share done
23-06-08 19:31:41 INFO (SyncWorker_4) [supervisor.backups.backup] Backing up folder addons/local
23-06-08 19:31:41 INFO (SyncWorker_4) [supervisor.backups.backup] Backup folder addons/local done
23-06-08 19:31:41 INFO (SyncWorker_4) [supervisor.backups.backup] Backing up folder ssl
23-06-08 19:31:41 INFO (SyncWorker_4) [supervisor.backups.backup] Backup folder ssl done
23-06-08 19:31:41 INFO (SyncWorker_2) [supervisor.backups.backup] Backing up folder media
23-06-08 19:31:41 INFO (SyncWorker_2) [supervisor.backups.backup] Backup folder media done
23-06-08 19:31:46 INFO (MainThread) [supervisor.backups.manager] Creating full backup with slug a8e78338 completed
23-06-08 19:31:46 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
23-06-08 19:31:46 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
23-06-08 19:31:46 INFO (MainThread) [supervisor.api.middleware.security] /backups/a8e78338/info access from cebe7a76_hassio_google_drive_backup
23-06-08 19:31:47 INFO (MainThread) [supervisor.api.middleware.security] /backups/62e896ec access from cebe7a76_hassio_google_drive_backup
23-06-08 19:31:47 INFO (MainThread) [supervisor.backups.manager] Removed backup file 62e896ec
23-06-08 19:31:47 INFO (MainThread) [supervisor.api.middleware.security] /backups/a8e78338/download access from cebe7a76_hassio_google_drive_backup
23-06-08 19:31:47 INFO (MainThread) [supervisor.api.backups] Downloading backup a8e78338
23-06-08 19:32:49 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
23-06-08 19:32:49 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
23-06-08 19:32:50 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
23-06-08 19:32:50 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
23-06-08 19:38:46 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
23-06-08 20:08:47 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token

System Health information

System Information

version core-2023.6.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.3
os_name Linux
os_version 6.1.29
arch x86_64
timezone America/Sao_Paulo
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.32.1
Stage running
Available Repositories 1352
Downloaded Repositories 16
AccuWeather
can_reach_server ok
remaining_requests 12
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 10.2
update_channel stable
supervisor_version supervisor-2023.06.1
agent_version 1.5.1
docker_version 23.0.6
disk_total 109.3 GB
disk_used 15.6 GB
healthy true
supported true
board generic-x86-64
supervisor_api ok
version_api ok
installed_addons AdGuard Home (4.8.8), File editor (5.6.0), Cloudflare Tunnel (1.7.0), AppDaemon (0.13.0), Home Assistant Google Drive Backup (0.110.4), chrony (2.6.0), Filebrowser (2.23.0-5), Duck DNS (1.15.0), Mosquitto broker (6.2.1), Glances (0.19.2), Alsa & PulseAudio Fix (3.4.1), Terminal & SSH (9.7.1), Epic Games Free (c0dfe30ee94fa609a9efcb5eb2b8fd0c1dafe6e2-2023-05-03-2), Samba share (10.0.2), Apache2 Minimal (2.7.0), Portainer (2.18.3), Firefox (1.0.7), Free Games Claimer (NOT WORKING) (1.4-test19)
Dashboards
dashboards 5
resources 6
views 6
mode storage
Recorder
oldest_recorder_run May 29, 2023 at 21:01
current_recorder_run June 8, 2023 at 09:16
estimated_db_size 382.98 MiB
database_engine sqlite
database_version 3.41.2
Spotify
api_endpoint_reachable ok

Supervisor diagnostics

the function is not available in my case.
image

Additional information

No response

@viny182 viny182 added the bug label Jun 8, 2023
@frangigu
Copy link

frangigu commented Jun 8, 2023

Hello, same issue on my end, but running supervised on Debian.

Rolling back to 2023.05.4 backup gets it back.

Also tried, without success :
ha core rebuild
ha supervisor reload
ha supervisor update
ha supervisor restart

Observer also says Supervisor is connected


Issue remains after 'ha core update' to 2023.06.1

@Kathou99
Copy link

Kathou99 commented Jun 9, 2023

I have to say a similar issue,

#94325

For the moment, I don't see the backup I have done,maybe it is because the home assistant supervisor is down🤔

@viny182
Copy link
Author

viny182 commented Jun 12, 2023

@frangigu @Kathou99 do you have this repo https://github.com/alexbelgium/hassio-addons on your installation, by the way?

On a clean install, I noticed hat the issue starts to happen immediately after I add this repo... If I remove it, the issue is gone....

image

@viny182
Copy link
Author

viny182 commented Jun 12, 2023

this repo does not belong to HACS... it's a standalone repo maintened by @alexbelgium...

As soon as I got my system stable, I'll open an issue on that repo.

@frangigu
Copy link

a clean install, I noticed hat the issue starts to happen immediately after I add this repo... If I remove it, the issue is gone...

Sorry I misread, I thought it was related to HACS itself...

I also had that repo, but I was no longer using any add-ons from it, I just deleted the "Repo" in the repositories menu, restarted HA-core and Supervisor started correctly.

Nice catch !

@frangigu
Copy link

I just rebooted my whole system, it also seems to fix a recent bug where I had to restart core (only) to get back everything related to supervisor (addons), just like the supervisor was too slow to load.

@Kathou99
Copy link

@frangigu @Kathou99 do you have this repo https://github.com/alexbelgium/hassio-addons on your installation, by the way?

On a clean install, I noticed hat the issue starts to happen immediately after I add this repo... If I remove it, the issue is gone....

image

Yes I have it

@alexbelgium
Copy link

alexbelgium commented Jun 13, 2023

I've indeed read many issues on my repo following 2023.06.01. Guess third party add-ons are not really encouraged anymore. Well that would free me some time :)

This is a pure supervisor thing apart from removing the 80 add-ons I support I don't see what I can do

@viny182
Copy link
Author

viny182 commented Jun 13, 2023

I've indeed read many issues on my repo following 2023.06.0. Guess third party add-ons are not really encouraged anymore. Well that would free me some time :)

This is a pure supervisor thing apart from removing the 80 add-ons I support I don't see what I can do

Oh man, @alexbelgium, don't take it like this! You have done a brilliant and important work for the community, being a life saver in many occasions! I'm a truly admirer of your work.

I believe it is more a technical issue than an attempt to jeopardize third party add-ons.

I do have other 6 third party repos, but this issue only happens to yours.

As soon as I get more time, I'll try to troubleshoot a little bit more, bit it feels just like some link used by your repo is now broken... Perhaps is that statistics widget?

Keep the good work and good spirit! 😉

@viny182
Copy link
Author

viny182 commented Jun 13, 2023

I've indeed read many issues on my repo following 2023.06.0. Guess third party add-ons are not really encouraged anymore. Well that would free me some time :)

This is a pure supervisor thing apart from removing the 80 add-ons I support I don't see what I can do

What about creating some SSL tunnels with Cloud flare solution?

https://github.com/w35l3y/hassio-addons/tree/main/cloudflare_tunnel

This is what I use to circumvent my ISP puting me behind a CGNAT... It is the same approach taken in the epic games addon for captcha links.... Perhaps some permanent tunnels to those 80 add-ons could bypass the whole thing...

@alexbelgium
Copy link

alexbelgium commented Jun 13, 2023

I do have other 6 third party repos, but this issue only happens to yours.

As soon as I get more time, I'll try to troubleshoot a little bit more, bit it feels just like some link used by your repo is now broken... Perhaps is that statistics widget?

Keep the good work and good spirit! 😉

Thanks! The statistics widget is static : images are generated daily and stored as image on the repo, statistics are generated weekly and stored as text.

Perhaps it's a question of repo size - that's the only thing that I see. HA periodically downloads the whole repo. Not sure the size for the moment but it's about 12mo I would say. I have a script running to optimize images on a weekly basis to keep it as low as possible. HA perhaps choke on this size...

EDIT : actually the repo is only 12Mo, with 1498 files and 82 addons. The HA community repo is 2Mo though so the difference isn't THAT great

@viny182
Copy link
Author

viny182 commented Jun 13, 2023

I do have other 6 third party repos, but this issue only happens to yours.
As soon as I get more time, I'll try to troubleshoot a little bit more, bit it feels just like some link used by your repo is now broken... Perhaps is that statistics widget?
Keep the good work and good spirit! 😉

Thanks! The statistics widget is static : images are generated daily and stored as image on the repo, statistics are generated weekly and stored as text.

Perhaps it's a question of repo size - that's the only thing that I see. HA periodically downloads the whole repo. Not sure the size for the moment but it's about 12mo I would say. I have a script running to optimize images on a weekly basis to keep it as low as possible. HA perhaps choke on this size...

EDIT : actually the repo is only 12Mo, with 1498 files and 82 addons. The HA community repo is 2Mo though so the difference isn't THAT great

https://www.deadlinkchecker.com/website-dead-link-checker.asp

Perhaps is a javascript function aggregating/generating the links?

image

@alexbelgium
Copy link

alexbelgium commented Jun 13, 2023

Thanks I didn't knew that tool. I'll correct both now

Actually I've corrected only the first one - the second is based on github templates and can't be found when checking the files manually (or using vscode) : https://github.com/search?q=repo%3Aalexbelgium%2Fhassio-addons%20refname&type=code

@alexbelgium
Copy link

Btw in the initial log it seems a full backup is ongoing while refreshing the addons using an (excellent) third party tool : hassio google drive backup.
Creating full backup with slug a8e78338 completed
Given that this addon then uploads the (usually very heavy) backups online, I've seen major disruptions & errors on my systems.

To avoid that, it might be worth scheduling backups at night to avoid impacting on normal working.

@viny182
Copy link
Author

viny182 commented Jun 13, 2023

once again, you are right @alexbelgium .... I did not noticed that...

But...

I was looking into the Developers docs from HA, and the Repository configuration file should be an repository.yaml on the root, but you have instead a repository.json file in your repo.... Perhaps this is related?

Doc: https://developers.home-assistant.io/docs/add-ons/repository/

Even the Sample Repo has an .yaml file in the root: https://github.com/home-assistant/addons-example/blob/main/repository.yaml

Perhaps it is something that have changed in the last releases?

@alexbelgium
Copy link

That's not an issue : older repos were based on json (repository and config files) but then HA switched to yaml. Both are supported according to documentation. BTW, the hassio Google drive backup repo uses json : https://github.com/sabeechen/hassio-google-drive-backup

@francisp2
Copy link

do you have this repo https://github.com/alexbelgium/hassio-addons on your installation, by the way?

I can confirm, removing this repo made the supervisor integration load again.

@oleging
Copy link

oleging commented Jun 13, 2023

I can confirm, removing this repo made the supervisor integration load again.

I confirm it too.

@alexbelgium
Copy link

I can replicate that it makes this error :

23-06-13 20:02:26 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 185, in block_bad_requests
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 201, in system_validation
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 268, in token_validation
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 280, in core_proxy
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api
    answer = await method(api, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/store.py", line 178, in store_info
    ATTR_ADDONS: [
                 ^
  File "/usr/src/supervisor/supervisor/api/store.py", line 179, in <listcomp>
    self._generate_addon_information(self.sys_addons.store[addon])
  File "/usr/src/supervisor/supervisor/api/store.py", line 114, in _generate_addon_information
    ATTR_ADVANCED: addon.advanced,
                   ^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/addons/model.py", line 227, in advanced
    return self.data[ATTR_ADVANCED]
           ^^^^^^^^^
  File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data
    return self.sys_store.data.addons[self.slug]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: '243ffc37_rsync'

Can't understand what is 243ffc37_rsync though : it seems to be a slug but there is no rsync addon...

@alexbelgium
Copy link

alexbelgium commented Jun 13, 2023

Ok, I've removed all translations files and replaced all big-sized png icons. Now the repo size is reduced by 46% to 6.5Mo. Let's see if it changes something

Edit : on my system the error message is now removed. I've performed 3 quick successions repo updates without any issues although previously it was seen at each time

see log
23-06-13 20:54:06 INFO (MainThread) [supervisor.resolution.check] System checks complete
23-06-13 20:54:06 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
23-06-13 20:54:06 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-06-13 20:54:06 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
23-06-13 20:54:06 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
23-06-13 20:57:25 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
23-06-13 21:07:33 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
23-06-13 21:07:33 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/blakeblackshear/frigate-hass-addons repository
23-06-13 21:07:33 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/dianlight/hassio-addons repository
23-06-13 21:07:33 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/Poeschl/Hassio-Addons repository
23-06-13 21:07:33 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
23-06-13 21:07:33 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
23-06-13 21:07:34 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository
23-06-13 21:07:34 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
23-06-13 21:07:38 WARNING (SyncWorker_1) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta (0.12.0)
23-06-13 21:07:41 WARNING (SyncWorker_2) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta (0.12.0)
23-06-13 21:07:42 INFO (MainThread) [supervisor.store] Loading add-ons from store: 180 all - 0 new - 0 remove
23-06-13 21:07:42 INFO (MainThread) [supervisor.store] Loading add-ons from store: 180 all - 0 new - 0 remove
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/blakeblackshear/frigate-hass-addons repository
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/dianlight/hassio-addons repository
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/Poeschl/Hassio-Addons repository
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
23-06-13 21:08:06 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository
23-06-13 21:08:11 WARNING (SyncWorker_6) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta (0.12.0)
23-06-13 21:08:14 WARNING (SyncWorker_0) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta (0.12.0)
23-06-13 21:08:14 INFO (MainThread) [supervisor.store] Loading add-ons from store: 180 all - 0 new - 0 remove
23-06-13 21:08:14 INFO (MainThread) [supervisor.store] Loading add-ons from store: 180 all - 0 new - 0 remove
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/blakeblackshear/frigate-hass-addons repository
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/dianlight/hassio-addons repository
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/Poeschl/Hassio-Addons repository
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
23-06-13 21:08:18 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/alexbelgium/hassio-addons repository
23-06-13 21:08:22 WARNING (SyncWorker_4) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta (0.12.0)
23-06-13 21:08:25 WARNING (SyncWorker_2) [supervisor.addons.validate] Add-on have full device access, and selective device access in the configuration. Please report this to the maintainer of Frigate (Full Access) Beta (0.12.0)
23-06-13 21:08:26 INFO (MainThread) [supervisor.store] Loading add-ons from store: 180 all - 0 new - 0 remove
23-06-13 21:08:26 INFO (MainThread) [supervisor.store] Loading add-ons from store: 180 all - 0 new - 0 remove

@viny182
Copy link
Author

viny182 commented Jun 13, 2023

@alexbelgium I just added the repo on my clean installation, and indeed it was way faster to add than previously.

I've restarted my HA instance and supervisor integration is just fine up to now.. I'll leave the repo there for some more time and report if anything is found...

Thank you for all the efforts!

image

@alexbelgium
Copy link

alexbelgium commented Jun 13, 2023

Thanks - if indeed size is the issue then I'll see how to further optimize (like running a github action to identify any file of more than 100ko) ; looks like the real solution would be that they implement a slightly longer timeout

@viny182
Copy link
Author

viny182 commented Jun 13, 2023

almost 3 hours stable and I decided to reboot the entire host to see what would be the behavior, and no issues at all :D 🥇

Let's reinstall some addons :D

@mickcornut
Copy link

mickcornut commented Jun 14, 2023

As a simple user, I monitored this topic, and I can confirm that this morning, everything works after rebooting my HA dedicated MinowBoard! :)
image

@alexbelgium
Copy link

I did some more tests - the culprit was actually the presence of translations and not the repo size. Re-adding them crashes things.

@BertrumUK
Copy link

Having suffered from this on my Pi3B+ (supervised) and not my Pi4 (HAOS), I finally got the Pi3 to update to 2023.6.1 this morning after removing the repo before the update. Are we safe to add it back now or is there still some work to be done still to make it stable ?

@alexbelgium
Copy link

alexbelgium commented Jun 14, 2023

Hi, well I can mimic that adding the translation files prevents supervisor from loading the repo but removing them removes all error messages which seems to indicate the root cause if identified and removed. I've also further reduced the repo size vs the tests above by continuing to optimize images. So, based on that and the comments in the posts above, in theory it should be safe :)

To be on the safe side I've also removed all third party repos I wasn't using as I'm not sure if the timeout is per repo or global

@viny182
Copy link
Author

viny182 commented Jun 14, 2023

I've been running for 24h+ after adding the repo back with no issues.

I think it's safe now.

Question: what's the best way to close this issue? Thinking about further reference for others, should we do anything besides jus closing it?

@BertrumUK
Copy link

We have found the cause, and a fix around it. I see no reason to keep this issue open. It will always be visible for anyone else that has the same or a similar issue.

@viny182 viny182 closed this as completed Jun 15, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants