Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI freezes after Update 2023.7.0 due to history-graphs #17203

Closed
3 tasks done
AdminOfThis opened this issue Jul 7, 2023 · 28 comments · Fixed by #17244
Closed
3 tasks done

UI freezes after Update 2023.7.0 due to history-graphs #17203

AdminOfThis opened this issue Jul 7, 2023 · 28 comments · Fixed by #17244

Comments

@AdminOfThis
Copy link

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

After updating to Version 2023.7.0, my UI was getting unresponsive, and got completely frozen.
Tried reloading, tried rebooting, same issue.
Created a new Dashboard, with all entities, and this dashboard worked fine.
So i SSHed into the server, and started removing cards from my main dashboard one by one.
After removing all history-graph cards, the UI worked again.
I restored the lovelace json from a backup and removed only the history-graphs, and the dashboard works since.

Describe the behavior you expected

A working UI, not freezing

Steps to reproduce the issue

  1. Have an old dashboard with history graphs
  2. Update to version 2023.7.0
  3. Try to open the Dashboard

What version of Home Assistant Core has the issue?

2023.7.0

What was the last working version of Home Assistant Core?

2023.6.3

In which browser are you experiencing the issue with?

Microsoft Edge Version 114.0.1823.67, Mozilla Firefox 115.0

Which operating system are you using to run this browser?

Windows 11

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@quaqo
Copy link

quaqo commented Jul 7, 2023

I can confirm that for me history-graph type is causing the page to freeze on chromium based browsers (including the HA Android companion app with WebView). I can't replicate it on Firefox thou.

On my installation (hassio / Core 2023.7.1) what causes a problem is if history-graph is nested in a horizontal-stack with at least two columns.

Example below:

type: horizontal-stack
cards:
  - type: gauge
    entity: sensor.temperature1
  - type: history-graph
    entities:
      - entity: sensor.temperature1
    hours_to_show: 3

@peterhoe
Copy link

peterhoe commented Jul 8, 2023

has there been a limit of 8 entities changed or added for history graphs?

https://community.home-assistant.io/t/2023-7-responding-services/588733/33

if less than 8 entities, seems to work ok?

----snip----
It seems there is a limit of eight entities. I don’t know if this limit is new, but I have had more than that without issues before 2023.07.00. In my case, the history graphs that are freezing have more than eight entities on them

@quaqo
Copy link

quaqo commented Jul 8, 2023

In my case I don't have more than 8 entities in a history graph (I do have more than 8 total entities in various graphs).

The configuration that hangs lovelace for me is this:

type: horizontal-stack
cards:
  - type: gauge
    entity: sensor.temperature1
  - type: history-graph
    entities:
      - entity: sensor.temperature1
    hours_to_show: 3

I removed the stack temporarily (stack that I had for ages...) and it works. Even though is not pretty nor functional for my ui.

@iz8mbw
Copy link

iz8mbw commented Jul 8, 2023

Hello. Since HA July 2023 version also on Android the interface freeze when I would like to see an entity chart.

@quaqo
Copy link

quaqo commented Jul 8, 2023

Ok, so. For about an hour, mine didn't freeze anymore, so I suspect it has also something to do with the data being displayed. I'm trying to keep an eye on what data is supposed to be displayed and when it works and when it doesn't.

Still. It only freezes if it's nested inside a stack for me. And I confirm it's ok on Firefox 114 and 115 both on Desktop and Android: I can only reproduce it in Chromium (Blink/V8) based browsers.

@silamon
Copy link
Contributor

silamon commented Jul 8, 2023

It might be introduced in #16850. There's a redrawing loop going on in the willUpdate.

Sample code with demo integration:

type: history-graph
entities:
  - entity: sensor.outside_temperature
hours_to_show: 3

@quaqo
Copy link

quaqo commented Jul 8, 2023

It might be introduced in #16850. There's a redrawing loop going on in the willUpdate.

Sample code with demo integration:

type: history-graph
entities:
  - entity: sensor.outside_temperature
hours_to_show: 3

I was also looking at this PR. I also have a feeling it might be it. I might not have time today, is somebody able to revert it and test if it still freezes?

@ronbuist
Copy link

ronbuist commented Jul 8, 2023

Hi. I was the one suggesting it could be related to the maximum of eight entities that is mentioned in the documentation. I have since then removed the two "offending" history graphs and thought that was the solution, until it started freezing up again. I have not tested removing all the history graphs. I have quite a few of those and really love them :-).

So even though I'm curious why the maximum of eight has made its way into the documentation, it doesn't seem to be the cause of the freeze. I've looked at the wayback machine (web.archive.org) and noticed that the limit of eight was put in the documentation somewhere between March 20 and June 2, but I have successfully had 12 entities on there in the 2023.06 version. Anyway, that's probably a dead end for the freeze issue.

@tpretz
Copy link

tpretz commented Jul 8, 2023

Same only on mobile browsers for me, chrome on desktop seemed ok (or at least was not freezing entirely),
in my case my history graph only had only two entities, but it was nested within both a horizontal and vertical stack
Since removal from dashboard no freezing issues.

@quaqo
Copy link

quaqo commented Jul 8, 2023

Same only on mobile browsers for me, chrome on desktop seemed ok (or at least was not freezing entirely),
in my case my history graph only had only two entities, but it was nested within both a horizontal and vertical stack
Since removal from dashboard no freezing issues.

Did you try removing it from the stacks? That stopped it from freezing for me.

@MariusArmand
Copy link

Can confirm it's stacks containing a history card that cause it. Horizontal, vertical or even grid.
If browser doesn't crash, try editing the stack card. It'll freeze.
Changing history card to another one fixes issue.

@peterhoe
Copy link

peterhoe commented Jul 8, 2023

Hi. I was the one suggesting it could be related to the maximum of eight entities that is mentioned in the documentation. I have since then removed the two "offending" history graphs and thought that was the solution, until it started freezing up again. I have not tested removing all the history graphs. I have quite a few of those and really love them :-).

So even though I'm curious why the maximum of eight has made its way into the documentation, it doesn't seem to be the cause of the freeze. I've looked at the wayback machine (web.archive.org) and noticed that the limit of eight was put in the documentation somewhere between March 20 and June 2, but I have successfully had 12 entities on there in the 2023.06 version. Anyway, that's probably a dead end for the freeze issue.

Agree, I have a history card with over 30 entities included, and post update to 2023.7.1, I am not experiencing the lockup issue with history graphs on android mobile app or chrome desktop browser

@ildar170975
Copy link
Contributor

My experience was with grids only:
#17242
See no problems with vertical stack.
Just tested with horizontal-stack - yes, hanging again.

2023.7.0.
Will check with 7.1.

@quaqo
Copy link

quaqo commented Jul 9, 2023

My experience was with grids only:
#17242
See no problems with vertical stack.
Just tested with horizontal-stack - yes, hanging again.

As I wrote before I have the same. Only in horizontal stacks.

2023.7.0.
Will check with 7.1.

Not fixed for me in 7.1.

@karwosts
Copy link
Contributor

karwosts commented Jul 9, 2023

I reproduced the issue with the grid card and filed a fix that seems to help it, at least in my testing.

@ildar170975
Copy link
Contributor

@karwosts
Thanks a lot!
Haven't you tested with horizontal-stack?

@ildar170975
Copy link
Contributor

@karwosts
Also, not related to the topic but also related to the history-graph: I experience same bug with a combination "history-graph inside vertical-stack + custom card with canvas":
one
two
three

Although this is an off-topic here - but is there any chance that any Dev person take a look at this issue?

@karwosts
Copy link
Contributor

@karwosts
Thanks a lot!
Haven't you tested with horizontal-stack?

Not yet, I can try later. I believe stacks and grid use the same code under the hood, so I'd be pretty confident it's likely the same issue.

@DanielBaulig
Copy link

Also encountering this issue. It seems a fix was filed? When can we expect this to get merged and deployed? Just updated to 2013.7.2 and am still experiencing the hang.

@karwosts
Copy link
Contributor

Unfortunately there wasn't a frontend bump included in .2, so seems we'll have to wait for the next release that includes one.

@CHoerby
Copy link

CHoerby commented Jul 27, 2023

image
:(

@joostlek
Copy link
Member

2023.8 will fix the issue!

@windsurferwill
Copy link

I am having exactly the same issue - Android app freezing when displaying entity history, Android Chrome window - same. Desktop Chrome window works fine. I just upgraded to the latest everything and problem still exists:
Home Assistant 2023.8.4
Supervisor 2023.08.1
Operating System 10.5
Frontend 20230802.1 - latest

Any ideas?

@iz8mbw
Copy link

iz8mbw commented Aug 26, 2023

I don't have anymore this issue since version 2023.8.

@developerfromjokela
Copy link

developerfromjokela commented Sep 3, 2023

I still have this issue on latest version.

      - type: vertical-stack
        cards:
          - show_name: true
            show_icon: true
            show_state: true
            type: glance
            entities:
              - entity: sensor.awss_temperature
              - entity: sensor.awss_pressure
              - entity: sensor.awss_humidity
            state_color: false
          - type: history-graph
            hours_to_show: 48
            show_names: true
            entities:
              - entity: sensor.bedroon_temperature
              - entity: sensor.awss_temperature
              - entity: sensor.awss_pressure
              - entity: sensor.awss_humidity
              - entity: sensor.bedroom_humidity

@developerfromjokela
Copy link

Tested, without vertical stack- same issue occurs

@developerfromjokela
Copy link

Issue occurs only on iOS app, Android works excellently.

@ildar170975
Copy link
Contributor

ildar170975 commented Oct 17, 2023

This view still freezes my HA:

  - title: nine
    path: nine
    badges: []
    cards:
      - type: vertical-stack
        cards:
          - type: history-graph
            show_names: false
            hours_to_show: 24
            entities:
              - entity: sun.sun
          - type: grid
            columns: 2
            square: false
            cards:
              - type: history-graph
                show_names: false
                hours_to_show: 24
                entities:
                  - entity: sun.sun
              - type: history-graph
                show_names: false
                hours_to_show: 24
                entities:
                  - entity: sun.sun

изображение

When I select "edit" - the browser's tab becomes irresponsive:
изображение

2023.10.2
Win10+Chrome

Update:
2024.5 - see no issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.