sabeechen / hassio-google-drive-backup

Automatically create and sync Home Assistant backups into Google Drive
MIT License
3.09k stars 189 forks source link

An unexpected error occurred: 404, message='Not Found', url=URL('http://hassio/snapshots') #652

Closed katonage closed 1 year ago

katonage commented 2 years ago

Last night it was still syncing, today I have found a big red warning on the snapshots page. Restarting core or host not helped.

Description:
If you have anything else that could help explain what happened, click "Markdown" above and write it here.

Addon version: 0.102.0 Home Assistant Version: 2022.6.5 Supervisor Version: 2022.06.2 Supervisor Channel: stable Hassos Version: 8.1 Docker Version: 20.10.14 Architecture: aarch64 Machine: raspberrypi4-64 Date: 2022-07-06T19:17:05.104645+00:00 Timezone: Europe/Budapest Failure Time: 2022-07-06T19:10:26.965514+00:00 Last Good Sync: 2022-07-06T19:10:26.943948+00:00

Exception:

  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:136 (sync)
  addon/backup/model/model.py:221 (_syncSnapshots)
  addon/backup/ha/hasource.py:214 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:102 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:207 (_getHassioData)
  addon/backup/ha/harequests.py:174 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1000 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

Snapshots:

 {
    "HomeAssistant": {
        "snapshots": 0,
        "retained": 0,
        "deletable": 0,
        "name": "HomeAssistant",
        "latest": null,
        "size": "0.0 B"
    },
    "GoogleDrive": {
        "snapshots": 0,
        "retained": 0,
        "deletable": 0,
        "name": "GoogleDrive",
        "latest": null,
        "size": "0.0 B"
    }
}
Config:
 {
    "Setting.MAX_SNAPSHOTS_IN_HASSIO": 8,
    "Setting.MAX_SNAPSHOTS_IN_GOOGLE_DRIVE": 8,
    "Setting.DAYS_BETWEEN_SNAPSHOTS": 1.0,
    "Setting.SNAPSHOT_TIME_OF_DAY": "02:00",
    "Setting.GENERATIONAL_DAYS": 2,
    "Setting.GENERATIONAL_WEEKS": 2,
    "Setting.GENERATIONAL_MONTHS": 2,
    "Setting.GENERATIONAL_YEARS": 1,
    "Setting.ENABLE_SNAPSHOT_STALE_SENSOR": false
}
Addon Logs:
 07-06 21:00:05 DEBUG [backup.model.syncer] Sync requested by Coordinator
07-06 21:00:05 INFO [backup.model.coordinator] Syncing Snapshots
07-06 21:00:05 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 21:00:05 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:136 (sync)
  addon/backup/model/model.py:221 (_syncSnapshots)
  addon/backup/ha/hasource.py:214 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:102 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:207 (_getHassioData)
  addon/backup/ha/harequests.py:174 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1000 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 21:00:05 INFO [backup.model.coordinator] I'll try again in 20 seconds
07-06 21:00:25 DEBUG [backup.model.syncer] Sync requested by Coordinator
07-06 21:00:25 INFO [backup.model.coordinator] Syncing Snapshots
07-06 21:00:25 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 21:00:25 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:136 (sync)
  addon/backup/model/model.py:221 (_syncSnapshots)
  addon/backup/ha/hasource.py:214 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:102 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:207 (_getHassioData)
  addon/backup/ha/harequests.py:174 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1000 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 21:00:25 INFO [backup.model.coordinator] I'll try again in 40 seconds
07-06 21:01:05 DEBUG [backup.model.syncer] Sync requested by Coordinator
07-06 21:01:05 INFO [backup.model.coordinator] Syncing Snapshots
07-06 21:01:05 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 21:01:05 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:136 (sync)
  addon/backup/model/model.py:221 (_syncSnapshots)
  addon/backup/ha/hasource.py:214 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:102 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:207 (_getHassioData)
  addon/backup/ha/harequests.py:174 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1000 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 21:01:05 INFO [backup.model.coordinator] I'll try again in 1(ish) minutes
07-06 21:02:26 DEBUG [backup.model.syncer] Sync requested by Coordinator
07-06 21:02:26 INFO [backup.model.coordinator] Syncing Snapshots
07-06 21:02:26 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 21:02:26 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:136 (sync)
  addon/backup/model/model.py:221 (_syncSnapshots)
  addon/backup/ha/hasource.py:214 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:102 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:207 (_getHassioData)
  addon/backup/ha/harequests.py:174 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1000 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 21:02:26 INFO [backup.model.coordinator] I'll try again in 2(ish) minutes
07-06 21:05:06 DEBUG [backup.model.syncer] Sync requested by Coordinator
07-06 21:05:06 INFO [backup.model.coordinator] Syncing Snapshots
07-06 21:05:06 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 21:05:06 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:136 (sync)
  addon/backup/model/model.py:221 (_syncSnapshots)
  addon/backup/ha/hasource.py:214 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:102 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:207 (_getHassioData)
  addon/backup/ha/harequests.py:174 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1000 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 21:05:06 INFO [backup.model.coordinator] I'll try again in 5(ish) minutes
07-06 21:10:26 DEBUG [backup.model.syncer] Sync requested by Coordinator
07-06 21:10:26 INFO [backup.model.coordinator] Syncing Snapshots
07-06 21:10:26 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 21:10:26 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:136 (sync)
  addon/backup/model/model.py:221 (_syncSnapshots)
  addon/backup/ha/hasource.py:214 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:102 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:207 (_getHassioData)
  addon/backup/ha/harequests.py:174 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1000 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 21:10:26 INFO [backup.model.coordinator] I'll try again in 10(ish) minutes
Supervisor Logs:
 22-07-06 20:59:59 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
22-07-06 20:59:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_IPV6_ERROR/ContextType.DNS_SERVER
22-07-06 20:59:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
22-07-06 20:59:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
22-07-06 20:59:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
22-07-06 20:59:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.DNS_SERVER_FAILED/ContextType.DNS_SERVER
22-07-06 20:59:59 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.SUPERVISOR
22-07-06 21:00:00 INFO (MainThread) [supervisor.resolution.check] System checks complete
22-07-06 21:00:00 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
22-07-06 21:00:00 INFO (MainThread) [supervisor.host.services] Updating service information
22-07-06 21:00:00 INFO (MainThread) [supervisor.host.network] Updating local network information
22-07-06 21:00:01 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
22-07-06 21:00:01 INFO (MainThread) [supervisor.host.manager] Host information reload completed
22-07-06 21:00:02 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
22-07-06 21:00:02 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
22-07-06 21:00:02 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
22-07-06 21:00:04 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
22-07-06 21:00:04 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_appdaemon
22-07-06 21:00:04 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
22-07-06 21:00:05 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 21:00:25 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 21:01:05 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 21:02:26 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 21:05:06 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 21:10:26 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 21:15:24 WARNING (MainThread) [supervisor.api.ingress] No valid ingress session None
22-07-06 21:16:01 INFO (MainThread) [supervisor.backups.manager] Found 8 backup files
22-07-06 21:16:01 INFO (MainThread) [supervisor.backups.manager] Found 8 backup files
22-07-06 21:17:05 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from cebe7a76_hassio_google_drive_backup
Home Assistant Core Logs:
 2022-07-06 20:47:01 WARNING (MainThread) [homeassistant.components.automation.esp_2_blue_led_automation] ESP 2 blue LED automation: Already running
2022-07-06 20:47:20 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esp-nyitas @ 192.168.0.18: Error connecting to ('192.168.0.18', 6053): [Errno 113] Connect call failed ('192.168.0.18', 6053)
2022-07-06 20:57:12 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /backups - System is not ready with state: shutdown
2022-07-06 20:57:12 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /os/info - System is not ready with state: shutdown
2022-07-06 20:57:12 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /host/info - System is not ready with state: shutdown
s6-rc: info: service legacy-services: stopping
2022-07-06 20:57:20 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /host/reboot request Server disconnected
2022-07-06 20:57:20 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /host/reboot - 
[18:57:22] INFO: Home Assistant Core finish process exit code 0
[18:57:22] INFO: Home Assistant Core service shutdown
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
2022-07-06 20:59:42 WARNING (MainThread) [rflink.protocol] dropping invalid data: 20;01;MySensors=OFF;NO NRF24L01;
2022-07-06 20:59:44 ERROR (MainThread) [homeassistant.components.automation] Blueprint Motion-activated Light generated invalid automation with inputs OrderedDict([('motion_entity', 'bejárat'), ('light_target', OrderedDict([('device_id', '5123b77dd46265b3b670977370ba8374')]))]): Entity bejárat is neither a valid entity ID nor a valid UUID for dictionary value @ data['entity_id']. Got None
2022-07-06 20:59:47 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esp-nyitas @ 192.168.0.18: Error connecting to ('192.168.0.18', 6053): [Errno 113] Connect call failed ('192.168.0.18', 6053)
dgooglr commented 2 years ago

I got the same issue

musachibr commented 2 years ago

I got the same issue

jsole commented 2 years ago

I got the same issue too

katonage commented 2 years ago

Side question: New core came out, and my OS is also not the latest. To Upgrade or Not To Upgrade? That is the question. Buddies: any experience with upgrading?

katonage commented 2 years ago

https://github.com/sabeechen/hassio-google-drive-backup/issues/655 They say reinstall the add-on.

domotiquemaison07 commented 2 years ago

Found a solution

https://github.com/sabeechen/hassio-google-drive-backup/issues/658#issuecomment-1177233116

Ziepoeskenetnie commented 2 years ago

Go to add on store in home assistant, click 3 dots upper right corner, add this repo: https://github.com/sabeechen/hassio-google-drive-backup Click install, then search for Google Drive backup, click it and then click update. Should work!

sabeechen commented 2 years ago

The addon needs to be updated, Home Assistant has made breaking changes to its API and the addon needs to be updated to match it. The current latest version of the addon is 0.108.2, if Home Assistant says you're using an earlier version then you need to update the addon.

A problem it seems many are running in to is that either auto-update doesn't work or Home Asisstant doesn't report that a new verison of the addon is available. I don't know why this is happening, the addon has no control over when Home Assistant decides to check for updates. If anyone sees anything in their supervisor logs that might explain it, please let me know.

A workaround that seems to have worked for many is to remove and add re-add the addon repository. Do as follows:

  1. Make a note of the settings you have configured in the add-on.
  2. Uninstall the Addon Settings > Add-ons > Home Assistant Google Drive Backup > Uninstall
  3. Remove the add-on repository Settings > Add-ons > Add-on Store > ... (upper right menu) >Repositories > Home Assistant Google Drive Backup Repository (trash Icon)
  4. Re-add the add-on repository Settings > Add-ons > Add-on Store > ... (upper right menu) >Repositories Add the URL: https://github.com/sabeechen/hassio-google-drive-backup
  5. Hard refresh the page, which is CTRL+F5 in chrome. If the addon' still doesn't show up the add-on store at this point, check the supervisor logs for errors.
  6. Install the addon, ensuring the version listed is 0.108.2 or higher.
  7. Open the add-on web-ui and before reconnecting it to Google Drive modify the settings to your preference.
jakubka commented 2 years ago

Something is indeed wrong with the updater.

I am running version 0.103.1. It's not listed in the Releases page. And when I try to click the Changelog link in HA, I get this:

image

Sadly no ideas how to fix it.

sabeechen commented 2 years ago

I'm getting reports from some that after auto-update stopped working that the custom repository for this addon stopped appearing in their list of custom repos. I suspect that something caused my custom repository to be removed. Perhaps during a HA update and perhaps very long ago.

sabeechen commented 2 years ago

Its also worth saying that to the best of my knowledge this issue is resoled by my comment above. There is nothing else I can do from the add-on side of things to force an update to happen. I'm leaving this issue open so that its easily findable, people keep reporting this exact error over and over.

drkng commented 2 years ago

Same issue. I reinstall the add-on and everything works fine

hmolina2018 commented 2 years ago

Hola estimados, funciona perfecto desinstalando, eliminando el repo y volviendo a registrar el repo e instalar. Gracias!!

Floppy commented 2 years ago

Thanks for the detailed instructions on how to fix. One thing that might be relevant is that this repository had disappeared from my addon repositories list already - perhaps that's why it wasn't being checked for updates?

sabeechen commented 2 years ago

That seems likely to be the problem for many, id like to know how the addon store got removed

sabeechen commented 1 year ago

Closing this now since its been a while since anyone reported the issue.