AalianKhan / mushroom-strategy

A strategy to automatically generate a dashboard using mushroom cards
MIT License
364 stars 36 forks source link

Error loading the dashboard strategy (is back) #88

Closed D-Jeffrey closed 9 months ago

D-Jeffrey commented 9 months ago

Standard default Mushroom-Strategy Config generated the error:

Error loading the dashboard strategy:

Error: Timeout waiting for strategy element ll-strategy-dashboard-mushroom-strategy to be registered
strategy:
  type: custom:mushroom-strategy
views: []

Same error on iPhone and desktop using different browsers (Chrome, Edge).

A clear and concise description of what the bug is.

Versions

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Home Assistant.'
  2. Click on 'Mushroom-Strategy' dashboard link
  3. See error

Expected behavior
The nested dashboard that did work before but stopped working in recent time.

Additional context

Could it be related to the number of devices - I have 65?

AalianKhan commented 9 months ago

Clearing the cache usually clears this issue.

Do you know if anything else on your HA instance changed since the last time it was working?

D-Jeffrey commented 9 months ago

I checked to see if there was something in the previous closed issues.

I check the Dev Console in the browser:

:8123/hacsfiles/mushroom-strategy/Helper:1 
        Failed to load resource: the server responded with a status of 404 (Not Found)
:8123/hacsfiles/mushroom-strategy/cards/SensorCard:1 
        Failed to load resource: the server responded with a status of 404 (Not Found)
:8123/hacsfiles/mushroom-strategy/cards/TitleCard:1 
        Failed to load resource: the server responded with a status of 404 (Not Found)
get-strategy.ts:118  Error: Timeout waiting for strategy element ll-strategy-dashboard-mushroom-strategy to be registered
    at get-strategy.ts:66:11
    at async o (get-strategy.ts:88:11)
    at async Object.saveConfig (ha-panel-lovelace.ts:361:23)
    at async HTMLElement.value (hui-editor.ts:284:5)

I check the contents of he directory and the .gz looks to be corrupted.

[core-ssh mushroom-strategy]$ pwd
/root/homeassistant/www/community/mushroom-strategy
[core-ssh mushroom-strategy]$
[core-ssh mushroom-strategy]$ ls -l
total 16
-rw-r--r--    1 root     root          8424 Sep 30 11:58 mushroom-strategy.js
-rw-r--r--    1 root     root          2315 Sep 30 11:58 mushroom-strategy.js.gz

I went to HACS -> Frontend -> click on 'Auto generating Mushroom dashboard strategy' -> click on ... and selected Redownload.

[core-ssh mushroom-strategy]$ ls -l
total 36
-rw-r--r--    1 root     root         26472 Nov 11 16:30 mushroom-strategy.js
-rw-r--r--    1 root     root          6271 Nov 11 16:30 mushroom-strategy.js.gz

That Fixed it... really weird.

All good now, maybe add that to the Wiki too.

DigiLive commented 9 months ago

I've added some help in the Q&A of the discussions: #90