AalianKhan / mushroom-strategy

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

Mushroom strategy dash stuck in initialization when switching between dashboards #85

Closed jstys closed 9 months ago

jstys commented 9 months ago

Describe the bug

Switching between dashboards and navigating back to the mushroom strategy dash will leave it stuck in the loading spinner state. This seems to happen more frequently on mobile for me for some reason even though the network logs would indicate the frontend is working properly. When it gets stuck in this state the websocket calls to config/entity_registry, config/device_registry, and config/area_registry do not receive a response resulting in the dashboard never generating.

Versions

To Reproduce
Steps to reproduce the behavior:

  1. Open the mushroom strategy dash
  2. If it opens successfully (sometimes gets stuck on even initial load), navigate to another dashboard
  3. Navigate back to the mushroom strategy dashboard
  4. Repeat until mushroom strategy is stuck on loading spinner

Expected behavior
The mushroom strategy dash should generate consistently

Additional context
Hooking up the chrome remote debugger to the companion app is when I noticed the websocket was not responding during mushroom strategy initialization, didn't notice any alarming console logs, seems network related.

DigiLive commented 9 months ago

Unfortunately I can't reproduce this issue. Also, I don't think there's anything we can do about an unresponsive web socket.

I can do a sort of "timing out" and show an error, but that would still leave you without a dashboard.

jstys commented 9 months ago

Hmm yeah I see that the websocket usage is literally taken from the example code HASS provides for custom strategies so probably out of scope of this repo then. I'll keep playing around with it to make sure that isn't a red herring, now that I'm testing over a VPN it seems to work consistently even on mobile.

DigiLive commented 9 months ago

Ok, Sorry I can't help you out. Feel free to re-open this issue if you think I can help within the scope of this repo.