Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way in using Hassio FrontEnd (states) since 0.95.0 (retried with 0.96.1) (SOLVED!) #25299

Closed
Bettinaglio opened this issue Jul 19, 2019 · 7 comments

Comments

@Bettinaglio
Copy link

Bettinaglio commented Jul 19, 2019

Home Assistant release with the issue: from 0.95.0 to 0.96.1 (see partial errors log)

Frontend -> ...duckdns.org:8123/states
0961

**Last working Home Assistant release (if known): 0.94.4

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io supervisor 169, Host system HassOS 2.12, Deployment: production
Running on Raspberry Pi 3 Model B+ (32GB)

Component/platform:
Invalid config
The following components and platforms could not be set up:

  • group
  • script
  • switch
  • device-tracker
  • automation
  • iOS

Please check your config.
ScreenShot 2019-07-19 alle 09 03 18

Description of problem:
No way to use Home Assistant (Hassio) since 0.95.0

Errors in the log during upgrade and use of Hassio 96.1:

2019-07-19 09:10:43 ERROR (MainThread) [homeassistant.setup] Setup failed for group: Invalid config.
.
2019-07-19 09:10:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of script. Setup failed for dependencies: group
2019-07-19 09:10:52 ERROR (MainThread) [homeassistant.setup] Setup failed for script: Could not set up all dependencies.
2019-07-19 09:10:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of switch. Setup failed for dependencies: group
2019-07-19 09:10:52 ERROR (MainThread) [homeassistant.setup] Setup failed for switch: Could not set up all dependencies.
2019-07-19 09:10:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of device_tracker. Setup failed for dependencies: group
2019-07-19 09:10:52 ERROR (MainThread) [homeassistant.setup] Setup failed for device_tracker: Could not set up all dependencies.
.
2019-07-19 09:10:58 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of automation. Setup failed for dependencies: group
2019-07-19 09:10:58 ERROR (MainThread) [homeassistant.setup] Setup failed for automation: Could not set up all dependencies.
.
2019-07-19 09:11:20 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of ios. Setup failed for dependencies: device_tracker
2019-07-19 09:11:20 ERROR (MainThread) [homeassistant.setup] Setup failed for ios: Could not set up all dependencies.
.
2019-07-19 09:11:22 ERROR (SyncWorker_11) [homeassistant.components.solaredge.sensor] Missing connections in power flow data
.
2019-07-19 09:11:24 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('service_registered', '{"domain": "recorder", "service": "purge"}', 'LOCAL', '2019-07-19 07:10:40.699548', '2019-07-19 07:11:24.443891', 'b9bcb96d92d6436580b6f2522700884c', None)]
(Background on this error at: http://sqlalche.me/e/4xp6)
2019-07-19 09:11:24 ERROR (Recorder) [homeassistant.components.recorder] Error saving event: <Event service_registered[L]: domain=recorder, service=purge>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
    cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/recorder/__init__.py", line 296, in run
    session.flush()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2459, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2597, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 154, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2557, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
    uow,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
    insert,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1138, in _emit_insert_statements
    statement, params
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
    distilled_params,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 399, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 153, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 550, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('service_registered', '{"domain": "recorder", "service": "purge"}', 'LOCAL', '2019-07-19 07:10:40.699548', '2019-07-19 07:11:24.443891', 'b9bcb96d92d6436580b6f2522700884c', None)]
(Background on this error at: http://sqlalche.me/e/4xp6)
.

and is proceeds to a total of 13888 lines while a recurring error remains somehow related to:

sqlite3.DatabaseError: database disk image is malformed

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
Using custom components SONOFF switches but same error occurs even by commenting the component in configuration.yaml

Additional information:

By going back to snapshot of working HASSIO 0.94.4 (swipe and restore) everything is up and running smoothly as it did since years/month.
0944

@cgtobi
Copy link
Contributor

cgtobi commented Jul 19, 2019

Did you run your config through the validator? hass --script check_config

@itsmebhavin
Copy link

itsmebhavin commented Jul 19, 2019

I am having same issue after update from 0.94 to 0.96.1. Following stats configurations not working -

  • groups
  • scripts
  • lock
  • switch
  • sensor
  • binary_sensor
    Please help. I can attach my logs too but it's similar to OP. @Bettinaglio

@Bettinaglio
Copy link
Author

Yes, I did the validator twice before upgrading to any of the different releases since 0.95.0: it endet all the times with something like:

"configuration check partial success

group:"

thats it.

During the first validation against 0.96.1 i had the SONOFF integration active in configuration.yaml and it sends out the error:
"component SONOFF integration not found" or similar

at the second validation i did disattivate (comment) SONOFF and the error disappeared but the validation stopped anyway as described before with the word:

group:

and remained that way. So it stopped in the group: section (see my error log, this is also the first error during the installation process and the first component the upgrade will not set up.

@itsmebhavin
Copy link

UPDATE: Mine is working now with everything except 'hacs'. I followed every change log from .92 to .96 versions of HA. HACS is still not working for me so i'll keep looking.

@Bettinaglio
Copy link
Author

UPDATE: Mine is working now with everything except 'hacs'. I followed every change log from .92 to .96 versions of HA. HACS is still not working for me so i'll keep looking.

Could you please be so kind to tell us which breaking changes made native HASSIO integration like Groups, Switches, Scripts and Sensors disappear from the states frontend? It would help others not to search something you have already found and solved.

Thanks a lot in advance.

@itsmebhavin
Copy link

UPDATE: Mine is working now with everything except 'hacs'. I followed every change log from .92 to .96 versions of HA. HACS is still not working for me so i'll keep looking.

Could you please be so kind to tell us which breaking changes made native HASSIO integration like Groups, Switches, Scripts and Sensors disappear from the states frontend? It would help others not to search something you have already found and solved.

Thanks a lot in advance.

Mostly I fixed following changes and it fixed all my lovelace UI. I am not using stats UI though.
switch.mqtt doesn't have device_class option
binarysensor.mqtt doesn't have command_topic option
binarysensor.mqtt doesn't have optimistic option

If you have pollen , allergy etc. sensors, then you have to change that plateform since it's name is changed.

@Bettinaglio Bettinaglio changed the title No way in using Hassio FrontEnd (states) since 0.95.0 (retried with 0.96.1) No way in using Hassio FrontEnd (states) since 0.95.0 (retried with 0.96.1) (SOLVED!) Aug 20, 2019
@Bettinaglio
Copy link
Author

SOLVED! Wrong indexed GROUP.YAML (not shown up as error when checking configuration) and VIEW statement without parameter blocked the upgrade. Thanks

@cgtobi cgtobi closed this as completed Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants