sabeechen / hassio-google-drive-backup

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

"The Supervisor Returned an Unexpected Response" error on backup #1053

Open DanteFragapane opened 2 weeks ago

DanteFragapane commented 2 weeks ago
Description:
On backup, the addon throws an error for "The Supervisor Returned an Unexpected Response"

Addon version: 0.112.1 Home Assistant Version: 2024.6.2 Supervisor Version: 2024.06.0 Supervisor Channel: stable Hassos Version: 12.3 Docker Version: 25.0.5 Architecture: amd64 Machine: qemux86-64 Date: 2024-06-11T19:49:15.529312+00:00 Timezone: America/New_York Failure Time: 2024-06-11T19:49:10.711482+00:00 Last Good Sync: 2024-06-11T19:49:08.858497+00:00 Next Sync: 2024-06-11T21:49:10.711482+00:00 Next Backup: 2024-06-12T06:00:00+00:00 Next Cache Warm: 2024-06-11T21:34:56.700152+00:00 Time Offset: 0.0

Exception:

  addon/backup/util/asynchttpgetter.py:203 (read)
  /site-packages/aiohttp/streams.py:439 (readexactly)
  /site-packages/aiohttp/streams.py:383 (read)
  /site-packages/aiohttp/streams.py:302 (_wait)
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed
Whose handling caused:
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:250 (sync)
  addon/backup/drive/drivesource.py:205 (save)
  addon/backup/drive/driverequests.py:304 (create)
  addon/backup/util/asynchttpgetter.py:210 (read)
backup.exceptions.exceptions.SupervisorUnexpectedError

Backups:

 {
    "HomeAssistant": {
        "backups": 1,
        "retained": 0,
        "deletable": 1,
        "name": "HomeAssistant",
        "title": "Home Assistant",
        "latest": "2024-06-11T06:00:00Z",
        "max": 2,
        "enabled": true,
        "icon": "home-assistant",
        "ignored": 33,
        "detail": "",
        "size": "2.4 GB",
        "ignored_size": "2.8 GB",
        "free_space": "61.7 GB"
    },
    "GoogleDrive": {
        "backups": 21,
        "retained": 1,
        "deletable": 20,
        "name": "GoogleDrive",
        "title": "Google Drive",
        "latest": "2024-06-10T06:00:00Z",
        "max": 20,
        "enabled": true,
        "icon": "google-drive",
        "ignored": 0,
        "detail": "<personal email>",
        "size": "49.4 GB",
        "ignored_size": "0.0 B",
        "free_space": "38.0 GB"
    }
}
Config:
 {
    "Setting.MAX_BACKUPS_IN_HA": 2,
    "Setting.MAX_BACKUPS_IN_GOOGLE_DRIVE": 20,
    "Setting.DAYS_BETWEEN_BACKUPS": 1.0,
    "Setting.BACKUP_TIME_OF_DAY": "02:00",
    "Setting.GENERATIONAL_WEEKS": 2,
    "Setting.GENERATIONAL_MONTHS": 6,
    "Setting.SEND_ERROR_REPORTS": true
}
Addon Logs:
 06-11 15:40:45 INFO [backup.debugworker] Sending error report (see settings to disable)
06-11 15:48:20 INFO [backup.model.coordinator] Syncing Backups
06-11 15:48:20 INFO [backup.watcher] A backup directory file was modified, we'll check for new backups soon.
06-11 15:48:20 INFO [backup.drive.drivesource] Uploading 'Full Backup 2024-06-11 02:00:00' to Google Drive
06-11 15:48:20 DEBUG [backup.drive.driverequests] Attempting to resume a previously failed upload where we left off
06-11 15:48:20 DEBUG [backup.drive.driverequests] Resuming upload at byte 538181632 of 2528808960
06-11 15:48:20 DEBUG [backup.drive.driverequests] Sending 256 KB to Google Drive
06-11 15:48:21 DEBUG [backup.drive.drivesource] Uploading Full Backup 2024-06-11 02:00:00 21.29%
06-11 15:48:23 ERROR [backup.model.coordinator] The supervisor gave an unexpected response
06-11 15:48:23 INFO [backup.model.coordinator] I'll try again in 2 hours
06-11 15:48:31 DEBUG [backup.watcher] Checking backup source for changes...
06-11 15:48:38 INFO [backup.model.coordinator] Syncing Backups
06-11 15:48:39 INFO [backup.drive.drivesource] Uploading 'Full Backup 2024-06-11 02:00:00' to Google Drive
06-11 15:48:39 DEBUG [backup.drive.driverequests] Attempting to resume a previously failed upload where we left off
06-11 15:48:39 INFO [backup.watcher] A backup directory file was modified, we'll check for new backups soon.
06-11 15:48:39 DEBUG [backup.drive.driverequests] Resuming upload at byte 538443776 of 2528808960
06-11 15:48:39 DEBUG [backup.drive.driverequests] Sending 256 KB to Google Drive
06-11 15:48:39 DEBUG [backup.drive.drivesource] Uploading Full Backup 2024-06-11 02:00:00 21.30%
06-11 15:48:40 ERROR [backup.model.coordinator] The supervisor gave an unexpected response
06-11 15:48:40 INFO [backup.model.coordinator] I'll try again in 2 hours
06-11 15:48:49 DEBUG [backup.watcher] Checking backup source for changes...
06-11 15:49:08 INFO [backup.model.coordinator] Syncing Backups
06-11 15:49:09 INFO [backup.watcher] A backup directory file was modified, we'll check for new backups soon.
06-11 15:49:09 INFO [backup.drive.drivesource] Uploading 'Full Backup 2024-06-11 02:00:00' to Google Drive
06-11 15:49:09 DEBUG [backup.drive.driverequests] Attempting to resume a previously failed upload where we left off
06-11 15:49:09 DEBUG [backup.drive.driverequests] Resuming upload at byte 538705920 of 2528808960
06-11 15:49:09 DEBUG [backup.drive.driverequests] Sending 256 KB to Google Drive
06-11 15:49:09 DEBUG [backup.drive.drivesource] Uploading Full Backup 2024-06-11 02:00:00 21.31%
06-11 15:49:10 ERROR [backup.model.coordinator] The supervisor gave an unexpected response
06-11 15:49:10 INFO [backup.model.coordinator] I'll try again in 2 hours
Supervisor Logs:
     resp, reset = await task
                  ^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    reset = await self.finish_response(request, resp, start_time)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 630, in finish_response
    await prepare_meth(request)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_fileresponse.py", line 303, in prepare
    return await self._sendfile(request, fobj, offset, count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_fileresponse.py", line 96, in _sendfile
    await loop.sendfile(transport, fobj, offset, count)
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1220, in sendfile
    return await self._sendfile_native(transport, file,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 732, in _sendfile_native
    return await self.sock_sendfile(transp._sock, file, offset, count,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 913, in sock_sendfile
    return await self._sock_sendfile_native(sock, file,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/unix_events.py", line 375, in _sock_sendfile_native
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/unix_events.py", line 402, in _sock_sendfile_native_impl
    sent = os.sendfile(fd, fileno, offset, blocksize)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 5] I/O error
2024-06-11 15:49:15.539 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from cebe7a76_hassio_google_drive_backup
Home Assistant Core Logs:
   File "/usr/src/homeassistant/homeassistant/components/xbox/media_source.py", line 42, in async_get_media_source
    client = hass.data[DOMAIN][entry.entry_id]["client"]
             ~~~~~~~~~^^^^^^^^
KeyError: 'xbox'

2024-06-11 15:48:01.750 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by integration 'gdacs' at homeassistant/components/gdacs/__init__.py, line 115: await self._feed_manager.update() (offender: /usr/local/lib/python3.12/site-packages/dateparser/languages/loader.py, line 215: import_module("dateparser.data.date_translation_data." + lang),), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+gdacs%22
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/components/gdacs/__init__.py", line 115, in async_update
    await self._feed_manager.update()

2024-06-11 15:48:03.604 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for kauf-bulb-df349d @ 192.168.1.61: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.61', port=6053))]: [Errno 113] Connect call failed ('192.168.1.61', 6053) (SocketAPIError)
2024-06-11 15:48:03.606 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for kauf-bulb-df314a @ 192.168.1.131: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.131', port=6053))]: [Errno 113] Connect call failed ('192.168.1.131', 6053) (SocketAPIError)
2024-06-11 15:48:07.624 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 642: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues