sabeechen / hassio-google-drive-backup

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

Home Assistant Google Drive Backup is running but showes Error 502: Bad Gateway in web ui ==> couldn't decode configuration files - corrupt file system / corrupt files #1031

Closed drueppela closed 6 months ago

drueppela commented 7 months ago

After using Home Assistant Google Drive Backup ~6 month the Add-On showed Error 502: Bad Gateway while running

image

History:

  1. Home Assistant Google Drive Backup performed the last scheduled backup today at 04:00 AM
  2. Home Assistant crashed somewhen after backup. Since now I was not able to find the reason for the crash.
  3. After restarting Home Assistant Home Assistant Google Drive Backup was running but showed "Error 502: Bad Gateway" in the Web UI
  4. I could not figure out if there is any context between 2. and 3.
  5. Since I uninstalled and reinstalled and reconfigured Home Assistant Google Drive Backup from scratch Home Assistant Google Drive Backup works properly again.

image

Log

return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 1079, in args_to_inject instance: Any = self.get(interface) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 974, in get provider_instance = scope_instance.get(interface, binding.provider) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 800, in get instance = self._get_instance(key, provider, self.injector) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance return provider.get(injector) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 264, in get return injector.create_object(self._cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object self.call_with_injection(init, self_=instance, kwargs=additional_kwargs) File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 1031, in call_with_injection dependencies = self.args_to_inject( ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 1079, in args_to_inject instance: Any = self.get(interface) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 975, in get result = provider_instance.get(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 264, in get return injector.create_object(self._cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object self.call_with_injection(init, self_=instance, kwargs=additional_kwargs) File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 1031, in call_with_injection dependencies = self.args_to_inject( ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 1079, in args_to_inject instance: Any = self.get(interface) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 974, in get provider_instance = scope_instance.get(interface, binding.provider) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 800, in get instance = self._get_instance(key, provider, self.injector) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance return provider.get(injector) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 264, in get return injector.create_object(self._cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object self.call_with_injection(init, self_=instance, kwargs=additional_kwargs) File "/usr/lib/python3.11/site-packages/injector/__init__.py", line 1040, in call_with_injection return callable(*full_args, **dependencies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backup/util/data_cache.py", line 46, in __init__ self._load() File "/app/backup/util/data_cache.py", line 53, in _load self._data = JsonFileSaver.read(path) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backup/file/jsonfilesaver.py", line 35, in read return JsonFileSaver._read(backup) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backup/file/jsonfilesaver.py", line 23, in _read return json.load(f) ^^^^^^^^^^^^ File "/usr/lib/python3.11/json/__init__.py", line 293, in load return loads(fp.read(), ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/psython3.11/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

https://github.com/sabeechen/hassio-google-drive-backup/issues/783 was closed after reinstalling but perhaps it makes sense to figure out the root cause.


Supplement 2024-04-29: After changing the IP of Home Assistant the Add-On also showed Error 502: Bad Gateway. After uninstall and fresh install everything worked again.

sabeechen commented 6 months ago

This looks a lot like disk corruption, the addon failed to start properly because it couldn't decode its configuration files. there isn't much I can do for the user when the system gets corrupted

drueppela commented 5 months ago

@sabeechen : Many thanks for your time and your analytics. If possible I would suggest to show a message which tells the error reason , an error code and perhaps a link to a knowledge base. Once again. Many thanks.