home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.52k stars 290 forks source link

After app has sat idle switching to new dashboard pages causes the app to hang for 30-45s (iPadOS) #2812

Open KidA001 opened 2 months ago

KidA001 commented 2 months ago

iOS device model, version and app version iPad (6th Generation) Model MR7F2LL/A iPadOS 17.5.1

Homeassistant App version: 2024.05

Home Assistant Core Version 2024.5.5

Describe the bug I run my iPad in Kiosk mode, it always has the HA app open. Up until this point I have never had issues. When the app has been sitting for a while (30m to an 1-hr) and I tap a new dashboard page it hangs and doesn’t fully render the page. I either have to wait 30-45s or force quit and re-open. When I force quit and re-open everything works as expected and I can navigate through pages, but the same issue persists after it has sat for a while.

It happens regardless of what dashboard I open. Simple page vs more complex page which graphs, they all will hang.

I’ve taken a video of what happens which you can see here: PXL_20240530_000001942.mp4 - Google Drive

To Reproduce I can repro this after my app has sat open and untouched for 30min to 1-hour. I have factory reset my iPad and re-installed the HomeAssistant app and this issue still persists.

Expected behavior It doesn't hang when I go to new dashboard pages. This was not an issue for me until this most recent update.

Screenshots I’ve taken a video of what happens which you can see here: PXL_20240530_000001942.mp4 - Google Drive

KidA001 commented 2 months ago

This issue still persists.

KidA001 commented 2 months ago

@bgoncal any other info I can provide to help diagnose this?

KidA001 commented 1 month ago

Issue still persists and has made my iPad dashboard unusable when switching dashboard pages. by the time it loads i've already opened my phone complete whatever action I was waiting for on my iPad

bgoncal commented 1 month ago

Hi @KidA001, before moving forward can you try using an older version of the App? Use testflight to navigation to an older app version and see if it behaves the same, otherwise then we have to consider a frontend/core update may have caused this.

KidA001 commented 1 month ago

@bgoncal I'm familiar with testflight, do you need to assign me access to get different versions of the app or can you point me to where I'll find details for this? Thank!

bgoncal commented 1 month ago

Take a look here:

image

KidA001 commented 1 month ago

Yes I'm familiar with that, I wasn't sure how to be invited to test the HA app in testflight. I see you need to go to https://testflight.apple.com/join/1AlPbnLZ

I just installed 2024.4.1 and will report back, thank you.

KidA001 commented 1 month ago

@bgoncal I can confirm that the issue does not persist in 2024.4.1, when I switch between dashboards after the app has sat for an hour it's not hanging like it does is 2024.5.x

bgoncal commented 1 month ago

Please also try 2024.6

KidA001 commented 1 month ago

@bgoncal I tried 2024.6 overnight and the issue is present. Reverting to 2024.4 for now - Any thoughts on what it might be? Any other details I can provide to help debug?

bgoncal commented 1 month ago

I need to check what's new since 2024.4 and evaluate what might have caused that.

You don't have a crash at any moment right?

KidA001 commented 1 month ago

No crash, just the lagging when switching views on the dashboard as shown in the video. It can be up to 30-45 seconds before the view becomes available to interact with.

bgoncal commented 1 month ago

Can you tell me which exaclt is the last version that works well for you? You said 2024.4.1, can you tell the build number? (someting like 2024.XXX after the version)

KidA001 commented 1 month ago

the last working build seems to be 2024.677

bgoncal commented 1 month ago

While I investigate what may have caused the issue, can you create a fresh dashboard and try to reproduce the issue there using the minimum cards possible? Just to we evaluate the relation to cards/webview performance

bgoncal commented 1 month ago

Quickly went over our thread again and I dont think you have tried to clean front end cache yet right? Companion App settings >> debugging >> reset frontend cache

KidA001 commented 1 month ago

Quickly went over our thread again and I dont think you have tried to clean front end cache yet right? Companion App settings >> debugging >> reset frontend cache

I have factory reset the iPad and reinstalled iOS and HA before posting this GH Issue to ensure it wasn't the iPad. The issue still persisted. I'll reset the frontend cache just to be sure.

Sure thing, I'll create a new minimal dashboard and use the latest build and see if it has the same behavior. I'm also a dev, if there's any more advanced debugging I can help with let me know.

Thanks for helping with this

KidA001 commented 1 month ago

I am on 2024.7 build 2024.700 and I also reset the frontend cache. It seems to be working but I'm going to wait a couple hours to verify.

Is resetting the frontend cache a serverside/host cache reset or is it local app cache?

KidA001 commented 1 month ago

Just to confirm I've installed 2024.05 which previously had the issue I've been describing here, and it seems to be working fine. I'm going to let it run overnight to confirm before I close. I'm curious again though if resetting the frontend cache is a local or serverside reset and before I posted this I had completely erased my ipad and reinstalled everything to confirm it wasn't an issue like that.

I'll report back.

bgoncal commented 1 month ago

It's just a local web data store reset

Screenshot 2024-07-02 at 11 08 49
KidA001 commented 1 month ago

I am on the current app store version 2024.6 since last night with no issues. I'm a little confused as to why resetting the frontend cache worked as I had previously erased the entire iPad ¯\_(ツ)_/¯ - alas everything is working. Unless you have any other questions I think this issue could be closed. appreciate the help debugging

bgoncal commented 1 month ago

I couldn't reproduce on my side so... no questions for now, let me know in case it happens again.

KidA001 commented 1 month ago

@bgoncal can we re-open this issue? The same problem is happening, clearing the cache will temporarily solve it (not fully) but the more days the app sits without clearing the cache the more lag happens after switching views