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

Custom element doesn't exist" for the homepage card #821

Open Bubba751 opened 3 months ago

Bubba751 commented 3 months ago

I've had this error before and fixed it by clearing my cache. I've tried this along with the items below, but none have fixed this error when I load Dwains Dashboard. I get the same error on my iPad with the Home Assistant app.

  1. cleared cash
  2. closed Chrome browser and reloaded
  3. restarted Home Assistant
  4. rebooted my computer
  5. I upgraded this morning to the latest version of Home Assistant Core. Would this cause my issue?
Bubba751 commented 3 months ago

I restored a backup that did not have the updated Home Assistant Core and now Dwains Dashboard loads ok. I'm afraid to update the Core now for fear that the problem will resurface.

ForumHulp commented 2 months ago

I have this problem also for a long time using firefox. Solve it by opening developer(F12) in firefox and refresh the page. Every time again and again

kelilive commented 2 months ago

I encountered the same problem...

image

image

ghost commented 2 months ago

Cache problem. Clean cache F5 on web or kill app and restart on mobile. Sometimes you have to do it more than once.

FSHelgeland commented 2 months ago

This happens all the time after the latest core update. It can not only be a cache problem. It happens on all devices, and browsers. And it is pretty annoying needing to clear cache and restart everytime the dashboard has to be updated. Everytime cache is cleared it is a lot of setup that has to be fixed, like the order of dashboard and so on. DD is still the way a dashboard should be and it is the only reason my wife accepted HA in stead of the system We used to have. I can live with this, but still hope Dwain will find time to look into this and fix it.

Bubba751 commented 2 months ago

It can’t be just a cache issue. I had the same problem in the HA app on my iPad. I did clear the cache and rebooted my PC and iPad. Didn’t fix the problem. I restored my backup so HA is fine now. But I’m not going to update my core until I there’s a solution that fixes the problem.

On Tue, Jul 9, 2024 at 6:54 AM Freddy Sandvær @.***> wrote:

This happens all the time after the latest core update. It can not only be a cache problem. It happens on all devices, and browsers. And it is pretty annoying needing to clear cache and restart everytime the dashboard has to be updated. Everytime cache is cleared it is a lot of setup that has to be fixed, like the order of dashboard and so on. DD is still the way a dashboard should be and it is the only reason my wife accepted HA in stead of the system We used to have. I can live with this, but still hope Dwain will find time to look into this and fix it.

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

ghost commented 2 months ago

I've had this issue off and on, since a year back and it's always been related to cache. At one point only the device that did an ha update (and other devices that was active) got the issue, as if they didn't understand that their cached data was now outdated. If you did the update from a pc, it always helped with a F5 but on especially the android app, you could get really stuck as there is noway to ask the app to clear chache and you had to go to settings/app/ha/data to kill that data in the cache. Ipad was a bit simpler as you can swipe down in that app. As it is now, it can appear at any random start but always more frequently after a HA version update. Also find it more likely to get this issue if you were logged in directly towards the server, exit and next time loggin in through NabuCasa. Luckily it's enough to kill app/restart one, two or three times and you are off again.

FSHelgeland commented 2 months ago

The problem has been there, but after the last DD release it was gone. Still happened occasionally, but almost nothing. After update to core 2024.7 it happens all the time. The iPad is worse though, cant refresh need to clear it, close it and then reopen. This along with the error message. DD is also the only integration affected. Clearing cache helps, but i still doubt the cache is the problem.

ghost commented 2 months ago

Just tested and I can provoke the problem by logging in via NABU, over 4G and then turn on Wifi so it will try local connection. Then it fails and needs lots of kill/restart to make it work again.

FSHelgeland commented 2 months ago

Yes, and as it is possible to do a quick fix by clearing cache and it sorts of work then it is not critical, but it would have been nice if this was not a problem. Anyway I do think Dwain is aware of the problem, and hopefully he will find the time to do a fix.

ghost commented 2 months ago

Not critical for us geeks but try to get the wife and kids to accept this kind of behaviour. "You only have to kill and restart the app 2, 3 times" forget it! That would be Home automation suicide! 🤣

dwainscheeren commented 2 months ago

I will try my best to look into this asap but as now I'm really busy with SmartHomeShop.io and manufacturing all products and still have a lot of work on the UltimateSensor (Mini) I will do my best :)

farstreet commented 1 month ago

Is there any update on this yet? Litteraly every time when I want to use my dwains dashboard, Iam getting the attached error. Both via the app and in browser, both on laptop and on mobile. Only thing that help is to completely close the app/browser and reopen it.
IMG_8606

Bubba751 commented 1 month ago

After upgrading the Home Assistant Core today the Home Assistant Companion app gives the same error message on Dwain’s Dashboard. . Nothing I do will fix it. It is now unusable.

On Wed, Aug 7, 2024 at 1:18 PM Jurgen @.***> wrote:

Is there any update on this yet? Litteraly every time when I want to use my dwains dashboard, Iam getting the attached error. Both via the app and in browser, both on laptop and on mobile. Only thing that help is to completely close the app/browser and reopen it. IMG_8606.png (view on web) https://github.com/user-attachments/assets/635965f3-1a1c-453a-80dd-0f2c3ae12f9d

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

bennitschke commented 1 month ago

After updating to 2024.8.0 I consistently see this error on the Mac app and force closing the app and re-opening does not help. See it occasionally on the iOS app too but force closing and re-opening usually does the trick.

Bubba751 commented 1 month ago

Kill and restart does not work on the companion app on my iPad. Even rebooting the iPad does not work. And I made a $100 donation for the Dwain’s Dashboard. My bad I guess.

On Thu, Aug 8, 2024 at 6:43 AM Ben Nitschke @.***> wrote:

After updating to 2024.8.0 I consistently see this error on the Mac app and force closing the app and re-opening does not help. See it occasionally on the iOS app too but force closing and re-opening usually does the trick.

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

DennisAppelman commented 1 month ago

Did you clear the front edge cache in the companion app? That worked for me ...  Op 8 aug 2024 om 18:28 heeft Bubba751 @.***> het volgende geschreven: Kill and restart does not work on the companion app on my iPad. Even

rebooting the iPad does not work. And I made a $100 donation for the

Dwain’s Dashboard. My bad I guess.

On Thu, Aug 8, 2024 at 6:43 AM Ben Nitschke @.***>

wrote:

After updating to 2024.8.0 I consistently see this error on the Mac app

and force closing the app and re-opening does not help. See it occasionally

on the iOS app too but force closing and re-opening usually does the trick.

Reply to this email directly, view it on GitHub

https://github.com/dwainscheeren/dwains-lovelace-dashboard/issues/821#issuecomment-2275867998,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/BI5RRGVT53B25DFTMACX4FTZQNYWVAVCNFSM6AAAAABKNYHEYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZVHA3DOOJZHA

.

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

@.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Bubba751 commented 1 month ago

My research found that there is no way to clear the cache for an individual app on the iPad. I deleted the Home Assistant app and reinstalled it. Still getting the error.

On Thu, Aug 8, 2024 at 9:37 AM DennisAppelman @.***> wrote:

Did you clear the front edge cache in the companion app? That worked for me ... Op 8 aug 2024 om 18:28 heeft Bubba751 @.***> het volgende geschreven: Kill and restart does not work on the companion app on my iPad. Even

rebooting the iPad does not work. And I made a $100 donation for the

Dwain’s Dashboard. My bad I guess.

On Thu, Aug 8, 2024 at 6:43 AM Ben Nitschke @.***>

wrote:

After updating to 2024.8.0 I consistently see this error on the Mac app

and force closing the app and re-opening does not help. See it occasionally

on the iOS app too but force closing and re-opening usually does the trick.

Reply to this email directly, view it on GitHub

< https://github.com/dwainscheeren/dwains-lovelace-dashboard/issues/821#issuecomment-2275867998>,

or unsubscribe

< https://github.com/notifications/unsubscribe-auth/BI5RRGVT53B25DFTMACX4FTZQNYWVAVCNFSM6AAAAABKNYHEYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZVHA3DOOJZHA>

.

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

@.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

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

ghost commented 1 month ago

Done some testing Linux/Chromium - Shift F5 and you are fine Android app - none of mine gets stuck. A simple kill/restart worked for all but one. I had to go to settings and clear cache on that one. Ipad - not consistent. Have 2 exactly identical ipads. One of them got through after 5or6 kill/restarts but the other one refuses totally. Have tried all the tricks in the book, including delete app&reinstall. Just refuses. This has never happened before. Something definitely changed with 2024.8.

therealmysteryman commented 1 month ago

Upgraded to 2024.8 and now everytime I refresh I need to clear cache to get it working on Android (Full Kiosk Browser) or Silk. Before it use to be occasional and a refresh would fix it but now it no longer the case.

thebatfink commented 1 month ago

I also have this issue since latest core update.

This happened around the time I updated to the latest version of Home Assistant 2024.8, it was not fixed by 2024.8.1. Dashboard will not load at all and no workaround that I have found so far. This happens on a iPad Pro 12.9” (5th gen) using the official Home Assistant companion app. It seems to work OK when viewing the dashboard via web using Safari on the same device. Also tested on an iPhone 15 Pro using the companion app and that too seems to work OK. iPad OS and companion app are both fully up to date.

Have attempted to repeatedly refresh the page in the app, kill the running process and restart the app, clear front end cache in the app, removed and reinstalled the app. None resolve the issue. Whenever refreshing the Dwains dashboard and seeing the error ‘Custom element doesn’t exist: homepage-card’, I also see this entry in the HA Core log:


TypeError: Illegal constructor (custom element class must be registered with global customElements registry to be newable)
src/scoped-custom-element-registry.js:169:8
e=window,r=e.trustedTypes,h=r?r.emptyScript:"",o=e.reactiveElementPolyfillSupport,n={toAttribute(t,i){switch (/node_modules/@lit/reactive-element/reactive-element.js:6:552)
t{constructor(){super (/node_modules/lit/node_modules/lit-element/lit-element.js:6:53)
constructor (/src/dwains-navigation-card.js:109:8)
createElement ([native code]::)
(!root.shadowRoot.querySelector (/src/dwains-dashboard.js:152:73)
(!root.shadowRoot.querySelector (/src/dwains-dashboard.js:161:)
buildDwainsNavigation (/src/dwains-dashboard.js:116:42)
reload (/src/dwains-dashboard.js:119:4)
this.getLovelace (/src/dwains-dashboard.js:98:17)```
patman15 commented 1 month ago

I also constantly hit the issue using Firefox or the HA app since 2024.8.

thebatfink commented 1 month ago

He said 5 days ago in Discord he was going to take a look at the issue. But he hasn’t given any update yet..

ghost commented 1 month ago

It was rather acute after 2024.8, especially on the Apple app. After 8.2 it settled down a bit. It's welcome that he will try to fix it. A simple kill/restart, that normally fixes the problem, is something I, as an ha enthusiast, can live with. The problem is our family members that expect it to "just work". They don't have the patience for this. Ok, so I need to fix a separate dash for the family, job done! Then again, isn't the whole purpose of this dash to be the dash to rule them all, regardless of physical platform?

thebatfink commented 1 month ago

Except a kill and restart doesn’t work on my ipad. Completely broken with no workaround. Luckily web via safari instead of the ios app works.

ghost commented 1 month ago

Yes, 24.8 was cruel. Took me 20 kill/restart in a row to get it to run again and the problem could reappear again after the screensaver kicked in and would come back at every restart of the app. Now, after 8.2 it's enough with one or two restart again when it occurs and it doesn't occur on every start.

ghost commented 1 month ago

Problem with Ipad and I suspect iPhone to

Thought the problem settled down after 8.2 but I was only lucky a couple of times. Now it's back to nearly impossible to get around the problem on Apple. 20 kills/restarts in a row can temporarily solve the problem but at next start, the problem is back. I gave up on the companion app and thought I should try web interface instead. Well, same problem on Safari. Tested also Firefox and Chrome with same result. Then I came to think of how web browser tech works on Apple. Even if you install another browser, it's always Safari engine behind the scen. If companion app is only a wrapped web page, it also needs to use the Safari engine. I think this is the rote to the problem.

patman15 commented 1 month ago

Just to mention, I have the issue on the companion app 2024.7.3 on Android and Firefox 129.0.1/Ubuntu 22.04, so not only Apple issue ...

ghost commented 1 month ago

Yes, you can get it on android and also on a pc, using a web browser. Difference is that it is very easy to fix on android or browser. On browser it nearly always is enough with a simple Shift-F5 and it will stay fixed until you update frontend or switch between local/cloud. Nearly same on android. Often enough with one or two kill/restarts. Sometimes you need to clear cache through setting/app, but that is very seldom. It will also stay fixed until frontend is updated or you switch local/cloud. Apple is different. Will come back at every app start. Will not be fixed by cleaning cache. You are just extremely lucky if a kill/restart will temporarily fix it. Can take just one kill/restart, if you are lucky, but it can also be so many that you just give up.

ghost commented 1 month ago

Can it actually be a timing issue, where the files just aren't downloaded to cache fast enough so the object requested are just not there, YET.

thebatfink commented 1 month ago

Probably better to just wait for Dwain to look at it. You say that it isn’t working on ios safari web, but it is for me thus far (on both iphone and ipad) and also I have no issue with companion app on an iphone (yet my ipad is definitely refusing to work with companion app and DD). Not to mention you have Pat stating it isn’t specific to iOS.

List your iOS versions and app versions, that might be useful for him.

thebatfink commented 1 month ago

Guess was a companion app issue. New version lists custom card loading in the change log fixes and it would seem that it fixed the problem for me.

ghost commented 1 month ago

Tested a bit and yes. Now on par with android & web You still get the error sometimes but now it's recoverable

ghost commented 1 month ago

Actually I just got the exact same custom element missing problem with the card from the new "Ultra Vehicle Card" https://github.com/WJDDesigns/Ultra-Vehicle-Card.

thebatfink commented 1 month ago

Maybe better served raising it as a companion app or frontend issue on HA github

ghost commented 1 month ago

Starting to suspect that this is actually not directly a Dwain's bug but a bug in the frontend. Maybe a size limitation of loading a custom element.

The thing they changed in the Apple companion helped a lot but did not solve the problem, only made is not permanent. Anyway, it must be a good clue.

ghost commented 1 month ago

Tested to provoke on Android. Every time I start HA android app after I've cleared the cache, both Dwain's and Ultra Vehicle card fails. After a kill/restart, they both work. Can someone else verify? Screenshot_20240823_133357_io homeassistant companion android~2 Screenshot_20240823_154300

ghost commented 1 month ago

Yes, this is a ha "loading custom element" bug You can get the same problem, with individual custom element cards. Problem, for us, is that the entire dash is a custom element.

Pictures of some mushroom cards on the default dash

FB_IMG_1725059744620

theharshl commented 4 days ago

I am running HA Core 2024.9.3 with Frontend 20240909.1. This dashboard works perfectly fine in the browser for me, but not in the HA mobile app on Android, version 2024.7.3-full io.homeassistant.companion.android. I have tried closing the app by swiping it away, clearing cache on the app. None of that fixed it, but clearing storage on the app did fix the issue. We'll see if it continues to work, but so far so good.

buhito81 commented 4 days ago

I am running HA Core 2024.9.3 with Frontend 20240909.1. This dashboard works perfectly fine in the browser for me, but not in the HA mobile app on Android, version 2024.7.3-full io.homeassistant.companion.android. I have tried closing the app by swiping it away, clearing cache on the app. None of that fixed it, but clearing storage on the app did fix the issue. We'll see if it continues to work, but so far so good.

Close it, run it again - 4 out of 5 times it doesn't work for me.

ghost commented 4 days ago

Works reasonably for me atm. Most starts it works fine but especially if you close app connected to local and next start through NabuCasa, or vice versa, the problem will almost always appear. Usually it takes 2 starts/swipes until it works again.