Lovelace - Custom element doesn't exist - Error on upgrade to 0.88.0

Issue started with upgrade to 88.0. Everything was working fine on 87.1. Now I’m getting the following errors for two of my custom lovelace cards in place of the card. The errors appeared after I got the “New Frontend Available” message and I reloaded the front end. This error is happening across all browsers on all platforms. All the other custom lovelace cards aI use are working correctly.

Custom element doesn't exist: button-card
Custom element doesn't exist: dark-sky-weather-card

This is the current configuration for my custom cards in lovelace

title: Home
resources:
  - url: /local/custom_ui/dark-sky-weather-card.js?v=7.2
    type: module
  - url: /local/custom_ui/alarm_control_panel-card.js?v=0.4.0
    type: js
  - url: /local/custom_ui/button-card.js?v=0.0.3
    type: module
  - url: /local/custom_ui/entity-attributes-card.js?v=0.1.1
    type: js
  - url: /local/custom_ui/mini-media-player-bundle.js?v=1.0.2
    type: module
views:

I get the following errors in my log:

2019-02-21 11:33:04 ERROR (MainThread) [frontend.js.latest.201902200] https://mydomain.duckdns.org:8123/local/custom_ui/dark-sky-weather-card.js?v=7.2:4:39 Uncaught TypeError: Cannot convert undefined or null to object

2019-02-21 11:33:04 ERROR (MainThread) [frontend.js.latest.201902200] https://mydomain.duckdns.org:8123/local/custom_ui/button-card.js?v=0.0.3:1:39 Uncaught TypeError: Cannot convert undefined or null to object

Same errors in debug log

2019-02-21 11:33:04 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1841236944] Received {'type': 'call_service', 'domain': 'system_log', 'service': 'write', 'service_data': {'logger': 'frontend.js.latest.201902200', 'message': 'https://mydomain.duckdns.org:8123/local/custom_ui/dark-sky-weather-card.js?v=7.2:4:39 Uncaught TypeError: Cannot convert undefined or null to object'}, 'id': 18}

2019-02-21 11:33:04 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1841236944] Received {'type': 'call_service', 'domain': 'system_log', 'service': 'write', 'service_data': {'logger': 'frontend.js.latest.201902200', 'message': 'https://mydomain.duckdns.org:8123/local/custom_ui/button-card.js?v=0.0.3:1:39 Uncaught TypeError: Cannot convert undefined or null to object'}, 'id': 19}

This is my frontend config.

frontend:
  javascript_version: latest
  themes: !include_dir_merge_named themes

The files definitely exist in \config\www\custom_ui. I have double checked all file names/paths. I have gone back to the source files and recopied the RAW js code into the files to make sure there was no issue there. I have cleared all my browser caches (multiple times) including cookies and have reloaded HA. I have restarted HA. I have gone back to using lovelace in YAML mode. I have played with the js version numbers to try and force it to update. I have googled both the lovelace error and the log error. The log error doesn’t come up with anything related to HA. There were some issues with the update to version 85.0 that caused a similar lovelace error for some people (I did not have an issue with that version) but the solutions proposed in those threads have not helped me.

These cards have were all working for a while on previous versions with no issues. No changes were made before the update to v0.88.0. Running on an Rpi3 using Hass.io.

Anyone got a clue what’s going on here?

I can confirm I’m having the same issue after updating to 0.88.0.

This used to work just fine (and the file exists under /config/www):

resources:
  - url: /local/button-card.js
    type: module

I also tried changing it to retrieve directly from the web (but this didn’t work):

resources:
  - url: https://cdn.jsdelivr.net/gh/kuuji/button-card@master/button-card.min.js
    type: module

The error I get on the front-end Lovelace page is:

“custom element doesn’t exist button-card”

same issue here, along with the gauge card

A custom gauge card or the built in lovelace gauge card? I have a few instances of the built in gauge card going and they are still working correctly.

Just a guess but if you’re having issues with built in cards also, you may have more than one issue happening.

Just found a pull request to fix the button card for 0.88.

1 Like

I’m having the same issue with my dark sky card. Did anyone figure out a solution yet?

Updating the card to 0.10.2 and clearing the cache worked for me.

2 Likes

Thanks! That did it!

Worked for me too jazzyisj
Thanks for the quick fix iammexx!!

Bart

The most recent release, 0.0.6 from 2/23 of button-card resolved the issue :

Just be sure you clear the cache from the browser to see the changes (had to clear cache and close and re-open browser).

I am running into the button-card issue as well, even though I have v0.0.6 installed, cleared all cached files in the browser and tested on chrome and safari in incognito windows/ There is still this error in the log:

https://[REDACTED]/customcards/github/custom-cards/button-card.js?track=true:1:53 TypeError: undefined is not an object (evaluating 'Object.getPrototypeOf(customElements.get("hui-error-entity-row"))')

This is what my custom_updater shows:

Am I missing something, or is there still something not right with the button-card?

I dont use the custom_updater, but it shouldn’t matter! For kicks, did you try to do a diff between this:
https://github.com/custom-cards/button-card/blob/master/button-card.js
and what it pulled locally? (They should be identical obviously)
Did you try restarting HA? The front-end is very aggressive with caching as well, so I noticed that opening incognito and clearing browser cache wasn’t enough - I had to actually exit out of all browsers and open a brand new one.
I hope these steps do it for you! I know how frustrating it can be.

1 Like

I dont use the custom_updater,

@gadgetFun Just curious, why not? It works great! Saves me a ton of time checking for updates.

Also re the cache issue. With Chrome hitting F12 to open developer mode then right click reload icon and select “Empty Cache and Hard Reload” has never failed me.

I never got around to implementing custom_updater! I recently discovered HA and have been knee deep in creating node-red automations! So that endless rabbit hole has been keeping me busy trying to debug LOL - but I figured w/o custom_updater, I’d have more control over installations; but I see that it’s pretty flexible and widely used, so I will give it a shot this week! Thanks!

thanks, that was it. There were a lot of differences, and I figured out why: somehow I had removed the card_url for the custom_updater tracker.json… thanks for the help!