Can't Acces Frontend after update to 0.65.4

Hello :slight_smile: All is in the tittle, just got the “Loading data” screen.
My pi seems fine,I can ssh it, samba share is ok too. With the log command in putty eveything is “green”
If think i will perhaps try to reinstall hassio (i’ve got a copy of my config folder).
Got the Google assistant component and i Can control all my lights. So hassio seems fine except the web interface.

My log file is below:

2018-03-14 20:06:00 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:00 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:05 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:05 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:06 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
2018-03-14 20:06:09 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:12 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:18 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:18 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:22 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:22 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:25 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:26 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:30 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:30 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:33 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:33 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:36 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:36 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:40 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6)
2018-03-14 20:06:40 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: (sqlite3.DatabaseError) database disk image is malformed [SQL: 'CREATE INDEX ix_states_event_id ON states (event_id)'] (Background on this error at: http://sqlalche.me/e/4xp6) (retrying in 3 seconds)
2018-03-14 20:06:40 ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Component failed to initialize.
2018-03-14 20:06:40 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of history. Setup failed for dependencies: recorder
2018-03-14 20:06:40 ERROR (MainThread) [homeassistant.setup] Setup failed for history: Could not setup all dependencies.
2018-03-14 20:06:41 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of logbook. Setup failed for dependencies: recorder
2018-03-14 20:06:41 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: Could not setup all dependencies.
2018-03-14 20:08:26 ERROR (SyncWorker_9) [homeassistant.util.yaml] Unable to read file /usr/lib/python3.6/site-packages/homeassistant/components/media_player/services.yaml: 'utf-8' codec can't decode byte 0xda in position 3: invalid continuation byte
2018-03-14 20:08:26 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 70, in load_yaml
    return yaml.load(conf_file, Loader=SafeLineLoader) or OrderedDict()
  File "/usr/lib/python3.6/site-packages/yaml/__init__.py", line 70, in load
    loader = Loader(stream)
  File "/usr/lib/python3.6/site-packages/yaml/loader.py", line 24, in __init__
    Reader.__init__(self, stream)
  File "/usr/lib/python3.6/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/usr/lib/python3.6/site-packages/yaml/reader.py", line 124, in determine_encoding
    self.update_raw()
  File "/usr/lib/python3.6/site-packages/yaml/reader.py", line 178, in update_raw
    data = self.stream.read(size)
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xda in position 3: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/websocket_api.py", line 472, in get_services_helper
    descriptions = await async_get_all_descriptions(self.hass)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 156, in async_get_all_descriptions
    loaded = await hass.async_add_job(load_services_files, missing)
  File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/service.py", line 139, in load_services_files
    loaded[yaml_file] = load_yaml(yaml_file)
  File "/usr/lib/python3.6/site-packages/homeassistant/util/yaml.py", line 76, in load_yaml
    raise HomeAssistantError(exc)
homeassistant.exceptions.HomeAssistantError: 'utf-8' codec can't decode byte 0xda in position 3: invalid continuation byte
1 Like

I have been seeing this crap since 65.0. If you delete the database and reboot it will run for awhile before it can’t store or read the database. But the errors start up almost immediately after the reboot! I have used 3 quality cards, 2 fresh installs and it persists.

I have opened a git issue and it has not been responded to yet. It also seems to affect some http based automations that use a simple curl command line.

Not sure what is broken, but it is broken.

1 Like

Hey, thank you for your quick answer!

So in order to run (even a few) the web interface i must delete the database file?
I’m not sure but is it the “home-assistant_v2” (approx 1gig) file in the config folder?

Thanks a lot for your reply :slight_smile:

yes, that is the file!

Here is my issue, brand new install, brand new card and restore with snapshot.

1 Like

Ok thanks, i will try that then !

Updated to 0.65.4 from 0.64.3 and had the issue. Deleting the database file as suggested got the frontend back up again.

If it’s happening even on a fresh install, can’t it be a hardware problem? A sort of incompatibility with just some raspberry’s.

Not working for me :confused:
I’ve renamed the old file and rebooted the Pi. Got a new file (approx 200ko ) but still no frontend.

Got “only” 2 errors in the logs

2018-03-15 19:49:26 ERROR (SyncWorker_11) [homeassistant.util.yaml] Unable to read file /usr/lib/python3.6/site-packages/homeassistant/components/media_player/services.yaml: 'utf-8' codec can't decode byte 0xda in position 3: invalid continuation byte
2018-03-15 19:49:26 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved

I hope next release will fix it :slight_smile:

I thought the last 4 might fix it. I have opened an issue to no response and it has been days…

Got my frontend back in buisness with last update 0.65.5.
I dont know if it will stay like that for long tbh.