dwainscheeren / dwains-lovelace-dashboard

An fully auto generating Home Assistant UI dashboard for desktop, tablet and mobile by Dwains for desktop, tablet, mobile
Other
1.78k stars 189 forks source link

Dashboard Fails to Load under 2022.7.0 #588

Closed LordNex closed 2 years ago

LordNex commented 2 years ago

I received the following error after updating Home Assistant Core to 2022.7.0

This error originated from a custom integration.

Logger: homeassistant.config_entries Source: custom_components/dwains_dashboard/process_yaml.py:127 Integration: Dwains Dashboard (documentation, issues) First occurred: 3:55:22 PM (1 occurrences) Last logged: 3:55:22 PM

Error setting up entry for dwains_dashboard Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 353, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/dwains_dashboard/init.py", line 1570, in async_setup_entry process_yaml(hass, config_entry) File "/config/custom_components/dwains_dashboard/process_yaml.py", line 127, in process_yaml "name": filecontent["name"], TypeError: 'NoneType' object is not subscriptable

Moh9v9 commented 2 years ago

same problem +1

flex1996 commented 2 years ago

happens on my instance too

LordNex commented 2 years ago

Yea and this pretty much takes out our systems. I use this as my primary. Luckily I have a backup dashboard. But I think once 2.0 was released they took a well deserved break from coding.

LordNex commented 2 years ago

Might get some better attention on the discord site. I'll check in when I get home. Hopefully there is a quick patch

Moh9v9 commented 2 years ago

I hope so

GroupeFMY commented 2 years ago

From discord: Damava — Today at 4:36 PM Dwains Dashboard v 3.1 does not work with Home Assistant core 2022.7.0 official release. Wait before updating.

I tried returning to 2022.6.7 via SSH (https://community.home-assistant.io/t/downgrade-core-on-ha-os/316293) but no luck Dashboard still not showing up.

LordNex commented 2 years ago

So each time there is an update we have to cross our fingers and hope he pushes out a release that fixes it? I kind of seen this one coming when he wasn’t giving out the new version unless you paid him. I hope that’s not the case, but if it is, I can imagine the community being upset about it. Let’s just hope it doesn’t take too long or he at least pulls an employee or two off the assembly lines long enough to refactor the code.

On Jul 6, 2022, at 10:38 PM, Groupe_FMY @.***> wrote:



From discord: Damava — Today at 4:36 PM Dwains Dashboard v 3.1 does not work with Home Assistant core 2022.7.0 official release. Wait before updating.

— Reply to this email directly, view it on GitHubhttps://github.com/dwainscheeren/dwains-lovelace-dashboard/issues/588#issuecomment-1177016159, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJAW2WM4KSJJIEAN6VDVSZGKBANCNFSM523EK3VA. You are receiving this because you authored the thread.Message ID: @.***>

dwainscheeren commented 2 years ago

I'm working on a solution for this. But I also got a normal job which has priority of course. The problem is something related to the new Python version in HA 2022.7. Because this project is publicly visible I would say feel yourself or anybody else free to fix it yourself and make a PR for it :) It is this file: https://github.com/dwainscheeren/dwains-lovelace-dashboard/blob/3.0/custom_components/dwains_dashboard/process_yaml.py

flex1996 commented 2 years ago

Dwain coming to save the day! The Dashboard is also usable a long a it is not edited. I removed it out of the integration and hacs. Deleted the folders with samaba, reinstalled and its working again.

@groupFMY downgrading only works if you reinstall the dashboard. Because the entities.yaml suddenly overwrites itself when the dashboard bugs out (0 bytes). So even after downgrading the dashboard has nothing to show

ADavis321 commented 2 years ago

So each time there is an update we have to cross our fingers and hope he pushes out a release that fixes it? I kind of seen this one coming when he wasn’t giving out the new version unless you paid him. I hope that’s not the case, but if it is, I can imagine the community being upset about it. Let’s just hope it doesn’t take too long or he at least pulls an employee or two off the assembly lines long enough to refactor the code.

On Jul 6, 2022, at 10:38 PM, Groupe_FMY @.***> wrote:



From discord: Damava — Today at 4:36 PM

Dwains Dashboard v 3.1 does not work with Home Assistant core 2022.7.0 official release. Wait before updating.

Reply to this email directly, view it on GitHubhttps://github.com/dwainscheeren/dwains-lovelace-dashboard/issues/588#issuecomment-1177016159, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJAW2WM4KSJJIEAN6VDVSZGKBANCNFSM523EK3VA.

You are receiving this because you authored the thread.Message ID: @.***>

He's a one man crew who does this in his free time. He's not obligated to do any of this and your expectation that he updates something he does as a hobby on your time frame is not only the epitome of arrogance, but is wholly unreasonable. And asking for a couple bucks to support his work is not only warranted, but a lot of us would give even if he didn't ask. If you're unhappy with the product, don't use it. But get out of here with your complaining. I trust he'll get a fix when he has time for it.

Karlkani85 commented 2 years ago

After upgrading HA to 2022.7.0

get the follow error

2022-07-07 18:20:27 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration dwains_dashboard which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-07-07 18:20:31 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for dwains_dashboard File "/config/custom_components/dwains_dashboard/init.py", line 1570, in async_setup_entry File "/config/custom_components/dwains_dashboard/process_yaml.py", line 127, in process_yaml

Remove the dashboard and all the files did not work.

Hopefully Dwain has some time to check it out ^_^

canedje commented 2 years ago

So each time there is an update we have to cross our fingers and hope he pushes out a release that fixes it? I kind of seen this one coming when he wasn’t giving out the new version unless you paid him. I hope that’s not the case, but if it is, I can imagine the community being upset about it. Let’s just hope it doesn’t take too long or he at least pulls an employee or two off the assembly lines long enough to refactor the code. On Jul 6, 2022, at 10:38 PM, GroupeFMY @.***> wrote:  From discord: Damava — Today at 4:36 PM Dwains Dashboard v 3.1 does not work with Home Assistant core 2022.7.0 official release. Wait before updating. — Reply to this email directly, view it on GitHub#588 (comment), or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJAW2WM4KSJJIEAN6VDVSZGKBANCNFSM523EK3VA. You are receiving this because you authored the thread.Message ID: @_.***>

He's a one man crew who does this in his free time. He's not obligated to do any of this and your expectation that he updates something he does as a hobby on your time frame is not only the epitome of arrogance, but is wholly unreasonable. And asking for a couple bucks to support his work is not only warranted, but a lot of us would give even if he didn't ask. If you're unhappy with the product, don't use it. But get out of here with your complaining. I trust he'll get a fix when he has time for it.

Good saying!!! Indeed its a hobby project pleasing a lot of people, don't complain like this!

LordNex commented 2 years ago

complain liket his!

No one's fucking complaining.

LordNex commented 2 years ago

I'm working on a solution for this. But I also got a normal job which has priority of course. The problem is something related to the new Python version in HA 2022.7. Because this project is publicly visible I would say feel yourself or anybody else free to fix it yourself and make a PR for it :) It is this file: https://github.com/dwainscheeren/dwains-lovelace-dashboard/blob/3.0/custom_components/dwains_dashboard/process_yaml.py

I can see where in the file this is being called. But name not being scriptable I don't understand. It also might fail on the next line for "icon". MariaDB just came out with an update upto the new alpine python as well so that might help. Still waiting for it to compete as I have a pretty large install and database running.

lexiismadd commented 2 years ago

+1 on this issue too. Thanks Dwain for jumping on this so quickly especially given this is a project of love..

davros123 commented 2 years ago

As identified by @flex1996, the issue is the entities.yaml is empty (0 bytes). I replaced entities.yaml from a backup and the dash now works again (\192.168.0.11\config\dwains-dashboard\configs\entities.yaml) Just do not edit the dash.

Dwain coming to save the day! The Dashboard is also usable a long a it is not edited. I removed it out of the integration and hacs. Deleted the folders with samaba, reinstalled and its working again.

@groupFMY downgrading only works if you reinstall the dashboard. Because the entities.yaml suddenly overwrites itself when the dashboard bugs out (0 bytes). So even after downgrading the dashboard has nothing to show

LordNex commented 2 years ago

As identified by @flex1996, the issue is the entities.yaml is empty (0 bytes).

I replaced entities.yaml from a backup and the dash now works again (\192.168.0.11\config\dwains-dashboard\configs\entities.yaml)

Just do not edit the dash.

Dwain coming to save the day! The Dashboard is also usable a long a it is not edited. I removed it out of the integration and hacs. Deleted the folders with samaba, reinstalled and its working again.

@groupFMY downgrading only works if you reinstall the dashboard. Because the entities.yaml suddenly overwrites itself when the dashboard bugs out (0 bytes). So even after downgrading the dashboard has nothing to show

@davros123 Not sure if I have a direct backup of that specific file. Would deleting it and allowing it to recreate work? I do have some full backups of home assistant as of a few days ago. Not sure if doing a complete restore would work or not though and would prefer not to have to rebuild the dashboard from scratch.

davros123 commented 2 years ago

Just unzip your full backup.tar unzip homeassistant.tar Open "data" folder then look in dwains-dashboard\configs\entities.yaml Copy this to your HA folder (ie...\192.168.0.11\config\dwains-dashboard\configs\entities.yaml)

Profit :)

lexiismadd commented 2 years ago

Just unzip your full backup.tar unzip homeassistant.tar Open "data" folder then look in dwains-dashboard\configs\entities.yaml Copy this to your HA folder (ie...\192.168.0.11\config\dwains-dashboard\configs\entities.yaml)

Profit :)

This worked!

deku-m commented 2 years ago

Well i got the problem with more_page by checking the more_page folder. I notice i had many new folders of same blueprint. Removed those and left one then editted the config.yaml from specific more_page blueprint as this was empty.

Example:

icon: mdi:monitor-dashboard
name: Systemmonitor
show_in_navbar: false
sort_order: <position of page in more_page>

Or check a backup for the file config. Working again.

So just a temp fix till dwain got it fixed. Would suggest not to edit anything in meantime.

LordNex commented 2 years ago

Just unzip your full backup.tar unzip homeassistant.tar Open "data" folder then look in dwains-dashboard\configs\entities.yaml Copy this to your HA folder (ie...\192.168.0.11\config\dwains-dashboard\configs\entities.yaml)

Profit :)

This worked!

Didn't for me. I replaced the file and rebooted HA and it's still failing. Of course I'm not removing and reading the integration ether as I don't want to have to reconfigure my entire dashboard. I'm wondering if replacing the whole directory with the backup would work. Basically the whole /config/dwains-desktop/ folder

If anyone has any other ideas I'm all ears.

CaptainBalou commented 2 years ago

I know most of you know but just to document it for all the others: Reverting to the backup made before upgrading to 2022.7.0 also works and takes out urgency until this is fixed.

LordNex commented 2 years ago

I know most of you know but just to document it for all the others:

Reverting to the backup made before upgrading to 2022.7.0 also works and takes out urgency until this is fixed.

@CaptainBalou You mean rolling HA back completely? Or just reinstalling DD from backup?

CaptainBalou commented 2 years ago

I know most of you know but just to document it for all the others: Reverting to the backup made before upgrading to 2022.7.0 also works and takes out urgency until this is fixed.

@CaptainBalou You mean rolling HA back completely? Or just reinstalling DD from backup?

I restored the whole core backup which was done automatically before the upgrade.

image

Sure, now I am again back on the old version and this may be a problem for some because they need new functionality and the fixes out of 2022.7.0 but at least the DD issue is gone then. :-)

davros123 commented 2 years ago

Didn't for me. I replaced the file and rebooted HA and it's still failing

I assume the file you replaced was from a backup where entities.yaml non zero length :) If so - sorry - all out of ideas other than a restore.

LordNex commented 2 years ago

Didn't for me. I replaced the file and rebooted HA and it's still failing

I assume the file you replaced was from a backup where entities.yaml non zero length :)

If so - sorry - all out of ideas other than a restore.

Yes and actually when I went to replace it, I noticed that the existing file was 8k and had data. But I went ahead and replaced the file from the one from backup as they should be the same anyway. I didn't change anything in DD, just upgraded HA which had a python upgrade. So I imaging it just needs to be refactored for the new alpine version

kamilk91 commented 2 years ago
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/dwains_dashboard/__init__.py", line 823, in ws_handle_edit_entity_card
    entity = entities.get(msg["entityId"])
AttributeError: 'NoneType' object has no attribute 'get'
ruurddouwe commented 2 years ago

I had the same problem, I just went back to 2022.6.7. But now i see that 2022.7.1 is already available, does it fix the problem with dwains dashboard?

jonas834 commented 2 years ago

Unfortunately HA 2022.7.1 does not fix the the problem. As Dwain said 'The problem is something related to the new Python version in HA 2022.7'.

ruurddouwe commented 2 years ago

Unfortunately HA 2022.7.1 does not fix the the problem. As Dwain said 'The problem is something related to the new Python version in HA 2022.7'.

Then I will be a patient men end wait for a solution. I realy like the dashboard itself so i don't want to lose it!

ElyFNV commented 2 years ago

I tried to revert to version 2022.6.7 with a full backup. In fact at first the dashboard worked again. However after doing a restart of HA, the dashboard was gone again... Without updating anything or adding anything!!! I don't know why. Regarding the "solution" someone is talking about (the one relating to the "entities.yaml" file being empty) I can say that I have the file full of stuff but the dashboard does not load anyway... Anyone has a fix for this problem?? I cant live without my Dwains Dashboard!

LordNex commented 2 years ago

I tried to revert to version 2022.6.7 with a full backup. In fact at first the dashboard worked again. However after doing a restart of HA, the dashboard was gone again... Without updating anything or adding anything!!! I don't know why.

Regarding the "solution" someone is talking about (the one relating to the "entities.yaml" file being empty) I can say that I have the file full of stuff but the dashboard does not load anyway...

Anyone has a fix for this problem?? I cant live without my Dwains Dashboard!

I was successful in rolling back to the core backup that was made when 2022.7 was installed. Once it came back up I did all of the other installs except the Home Assistant Core and they've now released an update OS version. I'm not sure if it's actually running on the older version of python or not because I've already upgraded the MariaDB SQL database too. I could definitely tell a pretty big difference between the 2 versions as my boot time increased by about 3-5 more min moving back. Shows the streamlining they did really did work well.

LordNex commented 2 years ago

I'm worried about having bugs from the rollback though. I'll feel better when everything's updated and back working the way it should.

LordNex commented 2 years ago

System Health

version core-2022.6.7
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.12
os_name Linux
os_version 5.15.41
arch x86_64
timezone America/Chicago
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.25.5 Stage | running Available Repositories | 1140 Downloaded Repositories | 57
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | March 2, 2023, 6:00 PM relayer_connected | true remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | us-east-1-2.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 8.1 -- | -- update_channel | stable supervisor_version | supervisor-2022.07.0 agent_version | 1.2.1 docker_version | 20.10.14 disk_total | 503.3 GB disk_used | 204.6 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | MariaDB (2.5.0), File editor (5.3.3), Samba share (10.0.0), Check Home Assistant configuration (3.11.0), Terminal & SSH (9.6.0), Z-Wave JS (0.1.64), Duck DNS (1.15.0), chrony (2.4.0), AirCast (3.4.0), AirSonos (3.4.0), AppDaemon (0.9.0), Network UPS Tools (0.11.0), Traccar (0.17.0), Tor (4.0.0), Spotify Connect (0.12.1), Bookstack (1.2.0), motionEye (0.18.0), Folding@home (0.6.0), Mosquitto broker (6.1.2), AdGuard Home (4.6.0), Nginx Proxy Manager (0.12.0), Vaultwarden (Bitwarden) (0.17.0), NGINX Home Assistant SSL proxy (3.1.5), Node-RED (12.0.2), Double Take (1.12.1), Exadel CompreFace (1.0.0), Facebox (1a1358d), DeepStack (CPU) (2021.09.1), Tailscale (0.7.0), ESPHome (2022.6.2), Matrix (0.10.0)
Dashboards dashboards | 2 -- | -- resources | 29 views | 8 mode | yaml
Recorder oldest_recorder_run | April 19, 2022, 11:57 PM -- | -- current_recorder_run | July 8, 2022, 4:47 AM estimated_db_size | 8475.31 MiB database_engine | mysql database_version | 10.6.8
Spotify api_endpoint_reachable | ok -- | --
LordNex commented 2 years ago

Try just rolling back the core upgrade. That should just roll back the alpine upgrade without effecting much else. Seemed to work for me at least. Just won’t be able to take advantage of the faster speed of 2022.7.1 until dwain has time to finally patch this. I know where and what the issue is, but I’m not an experience enough coder to know what to do to correct it.

On Jul 8, 2022, at 5:53 AM, ElyFNV @.***> wrote:



I tried to revert to version 2022.6.7 with a full backup. In fact at first the dashboard worked again. However after doing a restart of HA, the dashboard was gone again... Without updating anything or adding anything!!! I don't know why. Regarding the "solution" someone is talking about (the one relating to the "entities.yaml" file being empty) I can say that I have the file full of stuff but the dashboard does not load anyway... Anyone has a fix for this problem?? I cant live without my Dwains Dashboard!

— Reply to this email directly, view it on GitHubhttps://github.com/dwainscheeren/dwains-lovelace-dashboard/issues/588#issuecomment-1178847075, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACGXNJHFAA3OPEPUJ4M2U4LVTACBTANCNFSM523EK3VA. You are receiving this because you authored the thread.Message ID: @.***>

kamilk91 commented 2 years ago

guys rollback isn't fix. Stop talking about it and start fixing this Python error, because its propably one small change that fix everything

ElyFNV commented 2 years ago

Yeah I agree with kamilk91. I tried to go back to downgrade both the entire Home Assistant and just the core. The strange thing is that it works in the beginning. I can work on it for a few minutes; I can click objects and edit them. Then suddenly I reload the page and the dashboard disappears... I have no idea what the problem is. I can't explain why this problem is present even when restoring a backup prior to version 2022.7. I just can't understand how that's possible!

kamilk91 commented 2 years ago

I had same behaviour as ElyFNV. I edited object then everything disapeared. I was after update of hass and just edited some object into DD. I tried to couple of tricks i remember from python but it looks like that it is something i can't debug easly without Pycharm.

tiagof commented 2 years ago

The dashboard areas.yaml and entities.yaml get to 0bytes when you edit the dashboard. Just use it without editing until a fix is available. If your using hass in a docker container just revert to a 2022.6 image. Worked for me.

kamilk91 commented 2 years ago

@tiagof can you provide non-zero bytes areas and entities? Are they static files? maybe we can recover like that?

ElyFNV commented 2 years ago

The dashboard areas.yaml and entities.yaml get to 0bytes when you edit the dashboard. Just use it without editing until a fix is available. If your using hass in a docker container just revert to a 2022.6 image. Worked for me.

Mmmm... My "areas.yaml" file is 1.1kb and my "entities.yaml" file is 34.4kb. However my Dashboard doesnt load up....

lbouriez commented 2 years ago

@tiagof can you provide non-zero bytes areas and entities? Are they static files? maybe we can recover like that?

You just have to take your last backup file, they are inside. They are different for everyone so we cannot share them.

tiagof commented 2 years ago

I replaced the empty ones with the ones from a backup and it worked. Also deleting them and refreshing the dashboard seems to generate proper ones... until you edit the dashboard and they get zeroed out.

kamilk91 commented 2 years ago

@

@tiagof can you provide non-zero bytes areas and entities? Are they static files? maybe we can recover like that?

You just have to take your last backup file, they are inside. They are different for everyone so we cannot share them.

Got it, thank you. I will try to make some "First aid" instruction until Dwain will have a time (he said he is working and will take a look after he will have time for DD)

lbouriez commented 2 years ago

The dashboard areas.yaml and entities.yaml get to 0bytes when you edit the dashboard. Just use it without editing until a fix is available. If your using hass in a docker container just revert to a 2022.6 image. Worked for me.

Mmmm... My "areas.yaml" file is 1.1kb and my "entities.yaml" file is 34.4kb. However my Dashboard doesnt load up....

There are different issues.

ElyFNV commented 2 years ago

The dashboard areas.yaml and entities.yaml get to 0bytes when you edit the dashboard. Just use it without editing until a fix is available. If your using hass in a docker container just revert to a 2022.6 image. Worked for me.

Mmmm... My "areas.yaml" file is 1.1kb and my "entities.yaml" file is 34.4kb. However my Dashboard doesnt load up....

There are different issues.

  • if you edit the dashboard from the UI, you will loose all your configuration so don't, you can still do it manually in the yamls files.
  • the dashboard is loading with error or not loading... If you are there I guess wait for a fix or rollback

How come I can't see the dashboard even if my "entities" and "areas" files are not 0 bytes?

lbouriez commented 2 years ago

The dashboard areas.yaml and entities.yaml get to 0bytes when you edit the dashboard. Just use it without editing until a fix is available. If your using hass in a docker container just revert to a 2022.6 image. Worked for me.

Mmmm... My "areas.yaml" file is 1.1kb and my "entities.yaml" file is 34.4kb. However my Dashboard doesnt load up....

There are different issues.

  • if you edit the dashboard from the UI, you will loose all your configuration so don't, you can still do it manually in the yamls files.
  • the dashboard is loading with error or not loading... If you are there I guess wait for a fix or rollback

How come I can't see the dashboard even if my "entities" and "areas" files are not 0 bytes?

As I just said, there are different issues. Open the dev console (F12) and check if you get some errors. Also check the logs in HA

ElyFNV commented 2 years ago

Sorry for my ignorance... How can I copy and paste the errors from the dev console here?

kamilk91 commented 2 years ago

@ElyFNV use ` this sign under escape on your keyboard. Paste it 3 times on start and 3 on end

ElyFNV commented 2 years ago

dwains-homepage-card.js:4021 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'state')
    at _.render (dwains-homepage-card.js:4021:55)
    at _.update (lit-element.js:220:37)
    at _.performUpdate (updating-element.js:555:22)
    at _._enqueueUpdate (updating-element.js:508:29)
render @ dwains-homepage-card.js:4021
update @ lit-element.js:220
performUpdate @ updating-element.js:555
_enqueueUpdate @ updating-element.js:508```