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.

Thanks.

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] http://192.168.1.251:8123/lovelace/Server-view:0:0 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] http://192.168.1.251:8123/lovelace/3D-Printer:0:0 Uncaught 2020-08-10 14:40:49 ERROR (MainThread) [frontend.js.latest.202008071] http://192.168.1.251:8123/lovelace/test-area:0:0 Uncaught 2020-08-10 14:40:52 ERROR (MainThread) [frontend.js.latest.202008071] http://192.168.1.251:8123/lovelace/Lounge-view:0:0 Uncaught 2020-08-10 14:42:36 ERROR (MainThread) [frontend.js.latest.202008071] http://192.168.1.251:8123/lovelace/default-view:0:0 Uncaught 2020-08-10 14:42:41 ERROR (MainThread) [frontend.js.latest.202008071] http://192.168.1.251:8123/lovelace/Server-view:0:0 Uncaught

Screenshot?

Look in the browser console, not the HA log.

2 Likes

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)
chunk.8b29f0c82629b54e915d.js:1 

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.
2 Likes

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.

Gordon

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?

/hacsfiles/config-editor-card/config-editor-card.js?hacstag=43357760344

/local/config-editor-card.js?v=1

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.