home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.1k stars 2.8k forks source link

Problem loading custom elements #21853

Open ghost opened 2 months ago

ghost commented 2 months ago

Checklist

Describe the issue you are experiencing

This problem has been with us since mid last year approx. It's been very handicapping for users that use more dynamic dashboards, where the whole dash is a custom element. I use Dwain's dashboard and that user community has thought this is a bug in Dwain's dashboard but now it seams to be a common loading of custom elements problem. A while back the problem accelerated on Apple app to the degree that it was nearly impossible to get your dash working, no matter how many restarts you did. Only luck (sound like timing issue) could make it work. On other platforms a simple restart would nearly always fix it, maybe 2, sometimes. Last update of the Apple companion app did solve this, so now it's on par with the other platforms. This might be a clue to solve it once and for all. Problem often occurs when companion app switches from local to NabuCasa and I can provoke it to happen by clearing the cache. Then you always get the problem and need to do a restart to get it to work again. Easy for us ha admins to sort out but a huge problem for the rest of the family. I'm tired of "daddy, that damned Home Assistant app is not working again. Do we really need to have it?"

I'm not a developer and I feel more than "not at home" in the cryptical and totally unuserfriendly environment of git-hub. But, I hope even non developers can report bugs, if they ever can sort out how to do it. I already posted this in the wrong place once as I thought it was core and was asked to move it to "frontend tracker". He could just as well referred me to behind the 3rd red rock on Mars. Totally confused! Took me further 30 min + plus some external help to find this place, so please help if I'm still in the wrong place or done some wrong formatting.

The issue has been discussed for a long time on Dwain's git and here is the link to one of them. dwainscheeren/dwains-lovelace-dashboard#821 (comment)

Pictures below from starting Dwain's dash and the other is individual custom element cards that fails on the default ha dash. 360982501-aea4304b-74ff-4f7e-bdfc-36d5d4d4812c FB_IMG_1725059744620

Describe the behavior you expected

As pic 1, not pic 2 Screenshot_20240902_110317_io homeassistant companion android 360982501-aea4304b-74ff-4f7e-bdfc-36d5d4d4812c

Steps to reproduce the issue

  1. Clear cache
  2. Start Home Assistant

Can also happen if you end session in local or NabuCasa and next time you start you are on the other. ...

What version of Home Assistant Core has the issue?

2023.8.3

What was the last working version of Home Assistant Core?

Don't know exactly as we thought it was a Dwain bug. 23.6 maybe

In which browser are you experiencing the issue with?

All browsers and all companion apps

Which operating system are you using to run this browser?

Android all I tested, iOS latest, anyway, Ubuntu 22.04, 23.10,24.04, Windows 10+11

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

ghost commented 1 month ago

Hallo, hallo, hallo, Is there anybody out there?

Esp32-zapper commented 3 weeks ago

This issue is still with us.

This morning it took me 5 kill/restarts to get Home assistent running on my Android companion app. Seems to be worse on Android at the moment. Screenshot_20241028-074540

patman15 commented 2 weeks ago

Just to mention, I also still run into this issue from time to time. HA 2024.10.4 and current app. Deleting app cache, closing app and restarting (I think) solves the issue for some time (unknown cause).

zerocritical commented 2 weeks ago

Same issue here. Have to perform multiple app kill and start for it to work. More persistent on apple devices but happens on Androids too.

XerxeS2K commented 1 week ago

Same issue on companion app galaxy s24 Ulta. Cache clear does not fix

therealmysteryman commented 1 week ago

This is an issue for us, common occurrence for me in Amazon tablet.

Foguet commented 1 week ago

Same issue on companion app galaxy s24 Ultra Also, FullyKiosk on Samsung J6 and FullyKiosk on NSPanel Pro

Esp32-zapper commented 1 week ago

I think this is a timing issue. Normally when it happens, It's is not until the third restart attempt that it actually works. A clue here may be that the time between start and the time the error pops up becomes longer untill it succeeds. So, if a complex custom element, with many associated files, tries to load, it will time out refreshing/loading cache but a part of the files have succeeded so on the next attempt it starts loading the objects from the cache and continues to load into cache but timeouts. On the 3rd attempt it has all the files needed in the cache and can run without errors. Just a hunch.

Ferayzen commented 6 days ago

Same Problem here with multiple devices ( 4 Android smartphones and multiple desktop browsers). It happens like 50% of the time i open the CompanionApp or via Browser.