Cloud component does not load on start of home assistant.
configuration.yamlhomeassistant:
customize: !include customize.yaml
packages: !include_dir_named packages
time_zone: Europe/Amsterdam
whitelist_external_dirs:
- /home/homeassistant/.homeassistant/
default_config:
################################################################################
breaking_changes:
#Device trackers
device_tracker:
- platform: nmap_tracker
hosts:
<REDACTED>
home_interval: 5
scan_options: " --privileged -sP "
consider_home: 180
interval_seconds: 15
exclude:
<REDACTED>
new_device_defaults:
track_new_devices: true
frontend:
themes: !include_dir_merge_named themes/
input_boolean:
sleeping:
name: Sleeping
initial: off
lovelace:
mode: yaml
mqtt:
notify:
- platform: pushbullet
name: <REDACTED>
api_key: <REDACTED>
panel_iframe:
configurator:
title: Configurator
icon: mdi:wrench
url: <REDACTED>
require_admin: yes
python_script:
recorder:
auto_purge: true
purge_keep_days: 3
db_url: <REDACTED>
remote:
- platform: broadlink
host: <REDACTED>
mac: <REDACTED>
type: rm_mini
rfxtrx:
device: <REDACTED>
tts:
- platform: google_translate
weather:
- platform: buienradar
name: 'Amsterdam'
forecast: true
zwave:
usb_path: /dev/ttyACM0
#device_config: !include zwave_device_config.yaml
network_key: <REDACTED>
binary_sensor: !include binary_sensor.yaml
light: !include light.yaml
logbook: !include logbook.yaml
group: !include groups.yaml
history: !include history.yaml
automation: !include automations.yaml
scene: !include scenes.yaml
sensor: !include sensor.yaml
script: !include scripts.yaml
switch: !include switch.yaml
timer: !include timer.yaml
zone: !include zones.yaml
Log Details (ERROR)
Logger: homeassistant.setup
Source: components/cloud/__init__.py:234
First occurred: May 11, 2020, 11:41:57 PM (1 occurrences)
Last logged: May 11, 2020, 11:41:57 PM
Error during setup of component cloud
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 171, in _async_setup_component
hass, processed_config
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/cloud/__init__.py", line 234, in async_setup
await cloud.start()
File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/__init__.py", line 228, in start
info = await self.run_executor(load_config)
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/__init__.py", line 225, in load_config
return json.loads(self.user_info_path.read_text())
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/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)
It looks like an older version of libraries, would you mind upgrading to 0.109.6?
Hmm weird. You are using 109.2 but your Home Assistant installation is not using hass-nabucasa==0.34.2 as is pinned in that version of Home Assistant. Because in 0.34.2 I put in a guard for exactly this error and so line 225 is now starting with that guard clause: https://github.com/NabuCasa/hass-nabucasa/blob/master/hass_nabucasa/__init__.py#L225
Can you check your Home Assistant config folder and remove the deps folder? You shouldn't have one as you run it from a venv.
cloud documentation
cloud source
(message by IssueLinks)
Hey there @home-assistant/cloud, mind taking a look at this issue as its been labeled with a integration (cloud) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
I got the same error after my instance ran out of disk space (possibly due to recorder changes - I still had the old purge_interval config); I shut it down, purged some data from the sqlite database myself and fired it back up - and started getting this error. I was on 0.109.0, so I've updated to the latest - and now the cloud component starts, but it notified me that it was Unable to load authentication from .cloud/production_auth.json. - so I followed the link to sign back in. The login fields are present, but don't allow me to focus them in order to enter my credentials.
Edit: Manually going to the Configuration page and then to Cloud allowed me to focus and type into the fields, so I'm now signed back in.
Hmm weird. You are using 109.2 but your Home Assistant installation is not using
hass-nabucasa==0.34.2as is pinned in that version of Home Assistant. Because in 0.34.2 I put in a guard for exactly this error and so line 225 is now starting with that guard clause: https://github.com/NabuCasa/hass-nabucasa/blob/master/hass_nabucasa/__init__.py#L225Can you check your Home Assistant config folder and remove the
depsfolder? You shouldn't have one as you run it from a venv.
Thanks @balloob for the quick reply. The dep folder was there, empty though. Removed it and restarted. The dep folder was there again, empty. Same error.
It looks like an older version of libraries, would you mind upgrading to 0.109.6?
Thanks @frenck. Upgraded to latest beta. Maybe interesting for debugging:
hass-nabucasa 0.34.1 has requirement pytz~=2019.3, but you'll have pytz 2020.1 which is incompatible.
I got the same error after my instance ran out of disk space (possibly due to
recorderchanges - I still had the oldpurge_intervalconfig); I shut it down, purged some data from the sqlite database myself and fired it back up - and started getting this error. I was on 0.109.0, so I've updated to the latest - and now the cloud component starts, but it notified me that it wasUnable to load authentication from .cloud/production_auth.json.- so I followed the link to sign back in. The login fields are present, but don't allow me to focus them in order to enter my credentials.Edit: Manually going to the Configuration page and then to Cloud allowed me to focus and type into the fields, so I'm now signed back in.
Thanks @pauln. Exactly the same for me, also started getting this error when purged (not on sql though, still .db file). Also after update to latest beta, the cloud integration succesfully loaded, was able to fill in the credentials and the connection was made successfully.
@pauln duh that is it. We open the file for writing every hour, but if the user ran out of disk space we only truncate the file without actually writing to it. Will put in a fix that it won't happen again!
Most helpful comment
Hmm weird. You are using 109.2 but your Home Assistant installation is not using
hass-nabucasa==0.34.2as is pinned in that version of Home Assistant. Because in 0.34.2 I put in a guard for exactly this error and so line 225 is now starting with that guard clause: https://github.com/NabuCasa/hass-nabucasa/blob/master/hass_nabucasa/__init__.py#L225Can you check your Home Assistant config folder and remove the
depsfolder? You shouldn't have one as you run it from a venv.