Add-on Store is broken 'Failed to fetch add-on info'

I agree with @bucksbass (at least the first bit) which is that 0.93 does not resolve this in case anyone was curious

Yes i have unfortunately. I even did ls -R / to search the entire root folder. cmd+f yield no files named “repository.json”.

After much cursing and head scratching I’m now running 0.93 but the store is still broken. I’ve tried following the many different fixes with wildly different locations but I’ve no idea which is the right fix. My /mnt has nothing in it, my /usr/share is devoid of a hassio directory.

Unlike others I hadn’t touched anything in the store, no new repository added, it just stopped working.

Still getting the same error:

18-06-22 11:12:38 ERROR (MainThread) [hassio.utils.json] Can't read json from /data/addons/git/7bce6681/repository.json: [Errno 2] No such file or directory: '/data/addons/git/7bce6681/repository.json'
18-06-22 11:12:38 WARNING (MainThread) [hassio.store.data] Can't read repository information from /data/addons/git/7bce6681/repository.json
18-06-22 11:12:38 INFO (MainThread) [hassio.store] Load add-ons from store: 62 all - 62 new - 0 remove
18-06-22 11:12:39 INFO (MainThread) [hassio.addons] Found 6 installed add-ons
18-06-22 11:12:39 INFO (SyncWorker_5) [hassio.docker.interface] Attach to homeassistant/armv7-addon-configurator with version 3.3
18-06-22 11:12:39 INFO (SyncWorker_6) [hassio.docker.interface] Attach to hassioaddons/appdaemon3-armv7 with version v3.0.1
18-06-22 11:12:39 INFO (SyncWorker_4) [hassio.docker.interface] Attach to homeassistant/armv7-addon-ssh with version 5.4
18-06-22 11:12:39 INFO (SyncWorker_9) [hassio.docker.interface] Attach to esphome/esphome-hassio-armhf with version 1.12.2
18-06-22 11:12:39 INFO (SyncWorker_7) [hassio.docker.interface] Attach to hassioaddons/home-panel-armv7 with version v0.4.1
18-06-22 11:12:39 INFO (SyncWorker_11) [hassio.docker.interface] Attach to homeassistant/armv7-addon-letsencrypt with version 3.0
18-06-22 11:12:39 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
18-06-22 11:12:44 WARNING (MainThread) [hassio.updater] Can't fetch versions from https://s3.amazonaws.com/hassio-version/stable.json: Cannot connect to host s3.amazonaws.com:443 ssl:None [Try again]

As long you wont access the root OS you wont be able to cretae that missing file. If you have a virtual machine or another machine running Linux, you can connect the SD card and add that file manually. If thats not an option, follow this tutorial to enable root SSH access.

esphome added a new repository especially for hassio. So the Core esphome removed the repository.json which than disappeared on our machines and broke them.

Now we need to place that file back, boot the system, remove the old repository and add the new updated one.

1 Like

That’s fine (Well no it’s not actually, I’m pretty peeved that my system has been done over by someone changing a file or two outside of my system) but where does one get a copy of the missing file from?

Is there likely to be an update that will fix it for those who don’t have the time or experience to fix it manually?

  1. Create the file for the OLD esphomerep.
    sudo nano /usr/share/hassio/addons/git/7bce6681/repository.json

Paste those lines:

{
	“name”: “ESPhome”,
	“url”: “https://github.com/esphome/esphome”,
	“maintainer”: “Ottowinter”
}

Immediately reboot system. Watch your system until it becomes responsive. Go to your addon page, delete the old esphome repository (delete the repository only, not esphome as you might want to backup that first :wink: DO NOT USE THE RELOAD ICON IN THE UPPER RIGHT CORNER. This will remove the repository file immediately.

After removing add the new esphome repository using this URL:
https://github.com/esphome/hassio

This way i got the new esphome repo, but i have my old installation still running. After copying all configs i will delete and reinstall esphome.

Perhaps @OttoWinter should be aware of this issue as well.

I too am suffering from this issue and would like to add to the available information. I run a Hassio VM from a NUC with Proxmox. Over time before I made changes, I made clones of the currently working VM. I also maintained a copy of the original bare setup (ver 0.91.1). At all of the prior stages I was able to enter the add-on store since I was adding add-ons. However, today all versions display the ADD-ON Store ‘Failed to fetch add-on’ error message when run separately.

Unless something is being changed in Hassio during the attempt to connect to the add-on store, it appears that the problem rests on the other side.

For everybody on Raspberry PI

  • check the system log in GUI and look for an error message:
    “Can’t read json from /data/addons/git/18c35ad6/repository.json” <<< number might be different
  • configure SSH access to the system using this guide:
    https://developers.home-assistant.io/docs/en/hassio_debugging.html
  • SSH into the system, at hassio > prompt type login. Change to root directory cd …
  • search for the number, like :
    ls -R / | grep 18c35ad6
    /mnt/data/supervisor/addons/data/core_ssh/git/18c35ad6
  • change directory to
    cd /mnt/data/supervisor/addons/data/core_ssh/git/18c35ad6
  • create repository.json file with vi editor for example
    vi repository.json
  • paste/type (example)
    {
    “name”: “Configurator”,
    “url”: “https://github.com/esphome/esphome”,
    “maintainer”: “Ottowinter”
    }
  • esc, :wq <- save file
  • reboot sytem
  • enjoy
  • file might disappear again so you need to repeat next day

I lost my repository.json file also somewhere during a restart.
So, I did exactly what you described. And now it is finally solved, I guess. I restarted the system and the add ons ‘tab’ is still working. What I also noticed is now the number in the path has changed to 15ef4d2f and the file structure looked more like the other directories.
Thank you for your investigations today.

Just follow @Luca’s steps to remove the old add on repo url and add the new one and it should be solved permanently.

None of this works, I now have the repository.json files in what appears to be two esphome directories and a still broken Add-on store. This is becoming a real PITA

Unfortunately all the fixes I’ve seen on here won’t work for me. I’m running Hassio as a Docker container on CentOS 7. Esphome doesn’t show up anywhere on my system and I have repository.json file in /usr/share/hassio/addons/git/a0d7b954. This is where all the non-core addons reside on my system. I see this in the system log and can’t track down what the error is.

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/hassio/hassio/api/security.py", line 144, in token_validation
    return await handler(request)
  File "/usr/src/hassio/hassio/api/utils.py", line 32, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/hassio/hassio/api/addons.py", line 158, in list
    ATTR_NAME: repository.name,
  File "/usr/src/hassio/hassio/store/repository.py", line 41, in name
    return self.data.get(ATTR_NAME, UNKNOWN)
  File "/usr/src/hassio/hassio/store/repository.py", line 36, in data
    return self.sys_store.data.repositories[self.slug]
KeyError: 'c7a94ee9'

have updated to 0.93.0 restarted and rebooted and still will not fetch add on store?

Its not directly an hassio issue. I think they will implement at some point a more robust solution of the gui that is not affected but giving hints what fails.

But until then, i think you must fix it using ssh.

Can you go to Hass.io in the menu on the left, then go to the system tab. Does it show any helpful information? (in particular, I think it should mention the file it is missiing).
Also, it could be that you are not having the exact same issue as I/we had.

Please follow this steps

Rebooting fixed the issue. Wish I knew why. Thought after stopping all Docker containers and restarting them it would have worked.

I agree. Yesterday I placed the repository.json file and restarted the containers also. I thought the trick didn’t work, but as someone later on stated that after a reboot it worked I tried the reboot and I had exactly the same thought like you.

I know I have a bogus REPO in my config. No amount of adding repository.json is helping to solve my issue. Is it possible to truly remove an entire repo via SSH?

I’ve attempted removing the directories inside “/usr/share/hassio/addons/git.” as well as removing the repo URLs from “/usr/share/hassio/addons.json”, and after reboot it all comes right back.