Lovelace showing strange Js errors | Darksky does not initialize

hi all,

Getting this error on both Lovelace and default UI:

Oct 13 20:50:58 hassbian hass[490]: 2018-10-13 20:50:58 ERROR (MainThread) [frontend.js.latest.201810120] https://<url>/frontend_latest/a165dd73e19a69791eb4.chunk.js:629:461 TypeError: entityIds is undefined

Lovelace does not load at all, default UI does not show the entity. I have tried both the Darksky sensor and weather components.

Can someone help to findout what can be the issue?
Thanks in advance!

I am getting that error myself about 50% of the time after a restart now… which is often since I upgraded to v 0.80.0.

Can you search your log files for the actual darksky error?

I tried, no other error shown in home-assistant.log.

no darksky here but d have this:

[frontend.js.latest.201810120] :0:0 Script error.

unable to reload the frontend. Once again…

What I did so far:

I cleared the cache in Firefox and tried in pivate browsing mode but got the same result, lovelace does not load in Firefox.
However tried to load Lovelace in Chrome which surprisingly works…

Darksky still does not initialy but seems like it has nothing to do with darksky. I took out all the configuration related to darksky but still getting some error like this:

/frontend_latest/ee75d8d43fc454407590.chunk.js:584:478 Uncaught TypeError: Cannot read property 'some' of undefined

It shows up randomly in the log, for example if I close a popup window of a sensor or mediaplayer etc.

seems like it does not relate to darksky at all…

I’ll be honest. I wouldn’t worry about this error if your page loads. If it forces your page to not load, then you have an issue. This is essentially a null reference error in js. Meaning, the object doesn’t exist in the file: /frontend_latest/ee75d8d43fc454407590.chunk.js at line 584. And because the object doesn’t exist (because it equals null), js cannot access any property of it.

To me, the js script just needs to check for the object before accessing information. If you have access to chunk.js, then you can fix it. I’m not sure you do have access as it looks like a auto-generated file. Also, some browsers even hold on to old js files even when you clear cache. You may need to dive into the firefox dev environment and have it clear cache there. You could verify this by going into incognito mode possibly. I don’t know how to do it in firefox, I use chrome. If you’re on chrome and having this issue. Go to: … > More Tools -> Developer Tools -> Network. Then check Disable Cache. With the dev tools still open, reload the page.

EDIT: I forgot one last bit.

If a custom component is causing this problem, the above ‘devolopertools clear cache’ still may not work. You need to make sure you have a question mark at the end of your resource. This ensures the newest version is used as well:

example:

resources:
  - url: /local/custom_ui/weather-card.js?
    type: js