Every lovelace page refresh/view results in a frontend.js.latest.xxxxx error

Has been happening for quite some time now, I think it started when I went to 112.
Every time I either refresh or view a lovelace page, i get the following error:

2020-08-06 18:35:46 ERROR (MainThread) [frontend.js.latest.202007160] https://***.ui.nabu.casa/lovelace/default_view:0:0 Uncaught

This happens (as above) when using the Nabucasa Remote UI, or when viewing local. When local, the error is instead

ERROR (MainThread) [frontend.js.latest.202007160] local/lovelace/default_view:0:0 Uncaught)

Any idea what is causing this? Everything I have is currently up to date in both HACS and HA. I’ve googled and searched the forums but can’t find much that describes this error or what would cause it.


Can you give all of it? I don’t see the exception that’s happening, just “Uncaught”.

I’m also seeing this error if I refresh the page; 2020-08-10 14:22:34 ERROR (MainThread) [frontend.js.latest.202008071] Uncaught the URL changes to reflect the page being refreshed.

I just see Uncaught. Please copy and paste all of it.

That is all of it :slight_smile: 2020-08-10 14:40:43 ERROR (MainThread) [frontend.js.latest.202008071] Uncaught 2020-08-10 14:40:49 ERROR (MainThread) [frontend.js.latest.202008071] Uncaught 2020-08-10 14:40:52 ERROR (MainThread) [frontend.js.latest.202008071] Uncaught 2020-08-10 14:42:36 ERROR (MainThread) [frontend.js.latest.202008071] Uncaught 2020-08-10 14:42:41 ERROR (MainThread) [frontend.js.latest.202008071] Uncaught


Look in the browser console, not the HA log.


Wow, that gives some more info. Here’s what I’m seeing. So looks like either Simple Thermostat or my Vacuum card causing it I guess?

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "simple-thermostat" has already been used with this registry
    at https://***.ui.nabu.casa/hacsfiles/simple-thermostat/simple-thermostat.js:1:45393
    at https://***.ui.nabu.casa/hacsfiles/simple-thermostat/simple-thermostat.js:1:165
    at https://***.ui.nabu.casa/hacsfiles/simple-thermostat/simple-thermostat.js:1:169

/local/xiaomi-vacuum-card.js?v=3.0.1:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Uncaught (in promise) https://***.ui.nabu.casa/local/xiaomi-vacuum-card.js?v=3.0.1

It looks like

  • You’re trying to load Simple Thermostat a second time. Make sure that it isn’t added twice in your resources.
  • You don’t have Vacuum Card in /config/www/xiaomi-vacuum-card.js. If you installed it using HACS, then it should work fine without you manually adding it.

I removed the simple thermostat and all is well now. Thanks

Thanks very much, this helped me to track it down to a duplicate entry in my resources.

“your resources” ?! What might that be?
I couldn’t find a file named resources.yaml and I couldn’t find a section named resources in any of the other YAML-files. So what exactly are you referring to when you say “my resources” ?

I wish I could help you, but this was over two years ago, and I really can’t remember where the duplicates were.


Edit Lovelace dashboard, click 3 dots, ‘manage resources’ and check for duplicates.

Ooh, finally someone with the right knowledge :+1:
And indeed, there seems to be duplicates! But how do I know which one to remove?



I had similar duplicates and deleted the longer ones. Why? Dunno, I just guessed and hoped it would work, which it did :wink: Copy/paste whatever entry you are deleting so you can restore it in case something breaks.