Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.62k stars 46 forks source link

Reload issue popped up again #342

Closed Nazze closed 4 months ago

Nazze commented 7 months ago

Describe the bug The dashboard get into a reload-loop. And then gets stuck. It is the same issue we had previously. It is showing up on all versions of 1.6.x. And a downgrade to 1.5.3. does not seem to work..

To Reproduce Steps to reproduce the behavior:

  1. Install version 1.6.3 with HACS
  2. Delete cache on all devices
  3. Reload the screen on the HA companion app for iOS
  4. Error appears (see video)

Expected behavior It should reload once and remain stable

Screenshots https://github.com/Clooos/Bubble-Card/assets/33813707/b7f16f4c-80d4-4491-a2a7-333091605b48

Smartphone (please complete the following information):

Clooos commented 7 months ago

Hi! I will fix that now once for good! ๐Ÿป

Nazze commented 7 months ago

Where can I check the current Version of bubble cards? Because I am not sure if the download to 1.5.3. was successful. If it was successful, I am not sure, if the latest version of mushroom cards triggers it. Will try to downgrade that, too.

Clooos commented 7 months ago

You can check the version in the Bubble Card editor ๐Ÿ™‚

Nazze commented 7 months ago

Oh yeah, it shows 1.6.1, although I explicitely selected 1.5.3 from HACS. Don't know, if this is an issue with HACS? Will reboot HA now and try again.

Nazze commented 7 months ago

I don't know, why HACS was always downloading the latest version, although I picked 1.5.3. I have overwritten the 2 files in www/comunity_files with the one from github and I could roll-back now to 1.5.3, which is stable for me.

BTW, the version information inside the js file is not correct, that's why it was showing "1.6.1" instead of "1.6.2" in the Bubble Card Editor..

Clooos commented 7 months ago

This is fixed in the new 1.6.3!

https://github.com/Clooos/Bubble-Card/releases/tag/v1.6.3

Nazze commented 7 months ago

Yeah, it's not crashing anymore, but the perfomance is slower than 1.5.3. But I understood that you are looking into performance issues https://github.com/Clooos/Bubble-Card/issues/260

bexem commented 7 months ago

Thank you for fixing it so quickly! It has solved most of the reload issues for me on my iPhone but Iโ€™ve noticed that if I have a popup card with a webrtc camera stream in the Lovelace front end it will start the reload loop, to solve it I had to removed those cards (but Iโ€™ve kept other with more static content). Not a big loss but except some oddities with the 1.5.3 it was working fine before updating to 1.6.x (and it does work fine on desktop).

Update: Iโ€™ve tried with the picture card and it does the same but Iโ€™ve noticed that if reduce the amount of popup cards with cameras [from 5 (with two of them display two feeds) to 3 (one of them is displaying two camera feed] (either webrtc or picture card) the loop doesnโ€™t happen.

The iPhone is 15Pro, with latest iOS and Home Assistant app.

Clooos commented 7 months ago

I've changed something related to the camera pop-ups, it might be the issue. I'm working on it!

joaopedros2 commented 7 months ago

I am also having the same issue with version 1.6.3.

I have 3 popup cards, where one has 2 camera feeds from Frigate with go2rtc, and the other two have 1 feed each. What happens to me is that sometimes it plays all 4 simultaneously, and sometimes it doesn't open the popup itself...

Nazze commented 7 months ago

This is fixed in the new 1.6.3!

https://github.com/Clooos/Bubble-Card/releases/tag/v1.6.3

Hey @Clooos ! I was running 1.6.4. for a day or two, but the reload is still happening. Had to revert to 1.5.3 again, which is stable for me.

HAlover99 commented 6 months ago

Ciao Cloos,

reload loop it's still present also with the 1.6.4 version.

holt3000 commented 6 months ago

@Clooos yea I've been having the iOS reload loop still as well. It appeared with 1.6x updates

Clooos commented 6 months ago

I'm still actively working on this issue, I will release a new beta as soon as possible.

brainstorm82 commented 6 months ago

@Clooos I run into this issue and investigated it. In my case it starts with a big set of popup elements >10 . When i reduce the popup down to max 10 it is working fine.

HAlover99 commented 6 months ago

today i update to 1.7.0... issue still present...

Clooos commented 6 months ago

Thanks for your feedback, I'm still not sure of what is causing this. Do you have any related logs in Home Assistant or in your browser console? I really want to fix that!

holt3000 commented 6 months ago

In the iOS companion app, going into settings>companion settings>debugging,>reset frontend cache, seemed to help this.

HAlover99 commented 6 months ago

@holt3000 i already tried without success :( i don't understand because if use few popups work without problem... I hope that @Clooos will found root cause, btw there is a strange behavior because with pc browser i don't have this issue, seems appear only with phone, this week i'll try to enable web inspector on Iphone and use MAC to using console to hope will found some error.

Legrand5382 commented 6 months ago

My iPhone do the same, reload loop. Canโ€™t use it at all. I was hoping this update would have fix it but unfortunatly not. I use a iPhone 14 Pro Max with latest IOS. Work perfectly fine on my iPads.

Nazze commented 6 months ago

Hi! I had the issue again with 1.7.0, especially when swiping UP. But I cleared the cache a couple of times and I am not seeing it anymore. I hope it stays like this for the next couple of days. But so far, this is the best release, I've seen... I love it, @Clooos !

hellomarb commented 6 months ago

Can confirm that heavy dashboards with > 8 popups crash the iOS app scrolling down on my dashboard. When I remove 3 of them all is fine. They contain mini-media-player, apex charts and sankey-chart which are all memory heavy. So looks like a memory issue on iOS.

Gyldenlow commented 6 months ago

Can also confirm that the reload loop is present. Goes away when i limit the number of pop-up cards to a max of 10.

iPhone 15 pro, bubble-card v1.70

Clooos commented 6 months ago

Thanks a lot for your feedback everyone, I will try to add more pop-ups on my test dashboard to reproduce this issue.

Nazze commented 6 months ago

I actually had the issue today, too. But strangely it recovered and I am able to use the dashboard again. iPhone 15 pro and HA companion app. No related logs seen.

Nazze commented 6 months ago

Some additional remarks: I had still the pre-1.7.0 style in my dashboard (means, optimized mode and custom:bubble-pop-up). Changed it to the new style added the fix to configuration yaml and rebooted the server. Still the reboot was happening. And it was happening with HA companion app and Firefox. Rebooting the iPhone solved for now. It really smells like a memory leak, which seems to affect the OS (closing the apps and restarting and also different apps not working). Only rebooting the iPhone seems to help. And now it is quicker than ever.

Clooos commented 6 months ago

This is my guess too, just a question, do you have one or more cameras in your pop-ups? If yes what card do you use for that?

Nazze commented 6 months ago

No, I am not using camera cards.

Legrand5382 commented 6 months ago

No camera also here, a few small pictures on somes.

Clooos commented 6 months ago

This issue is my priority right now, I was able to replicate it on my iPad so it's a good start.

Gyldenlow commented 6 months ago

No cameras here either. Today I tried restarting my iPhone as suggested by @Nazze, which seemed to fix it for some time.

Clooos commented 6 months ago

I've released the new v1.7.1, but I can't say for sure that this is fixed.

https://github.com/Clooos/Bubble-Card/releases/tag/v1.7.1

Edit: After some more testing I haven't add a single reload issue since and everything seems to not slow down anymore after some time on iOS. I really think that this is finally fixed! ๐Ÿคž

holt3000 commented 6 months ago

Unfortunately still experiencing this issue @Clooos. I have 12 popups and one has a few cameras

Legrand5382 commented 6 months ago

Same here, seem to stay longer then before but still go on loop after maybe 3-4 seconds.

Clooos commented 6 months ago

Even after clearing the cache / rebooted the iOS device? I really have no more issues.

But if it persists I still have an idea, but I just want to be sure that this is still an issue.

Nazze commented 6 months ago

Last time it took a couple of days to show up. So I am still testing. But at the moment 1.7.1 looks stable to me.

hellomarb commented 6 months ago

Still an issue (without cameras in popups, but apex-charts + sankey charts + > 8 popups), crash on scroll. I'm testing in a new copy of my installation, so frontend caching isn't the problem.

Clooos commented 6 months ago

I will release a test version here probably today. I might have an idea on how to fix that ๐Ÿคž

Gyldenlow commented 6 months ago

I've had the bug happen only once after updating to 1.7. However, since rebooting my phone it has yet to appear again

Clooos commented 6 months ago

Here is a test version that I really hope could fix this issue, just install it with the Without HACS installation method.

This version is removing and recreating the content of each pop-ups when they are opened, so in theory even with 1000 pop-ups it should works ๐Ÿคž This part of the code was previously used for only removing the videos, so don't use the background_camera: true feature in this test version.

I can't wait to have your feedback on this!

bubble-card.js.zip

hellomarb commented 6 months ago

Yes, I can confirm that in my usecase the reload on scroll bug is solved by the new approach. I will test it over the day, but for now it seems much faster and bubblecard isn't getting in the way of card_mod anymore while inital load.

Is there a branch with the src so I can build it on my own? I put my css modifications in the core bubble-pop.js file to have it global for all popups (z-index issues and a lot of styling).

Clooos commented 6 months ago

I will modify this a bit and I will release that as the 1.7.2 version ๐Ÿ™‚

Clooos commented 6 months ago

The update is now available!

https://github.com/Clooos/Bubble-Card/releases/tag/v1.7.2

Gyldenlow commented 6 months ago

Absolute chad ๐Ÿ‘†๐Ÿป

Legrand5382 commented 6 months ago

This version work perfectly well on my iPhone (no more reload at all) and also seem faster on my Ipad, thank you for your wonderful work ๐Ÿ˜Š

Clooos commented 6 months ago

Finally! I can rest in peace now! ๐Ÿป

holt3000 commented 6 months ago

Thanks @clooos ! Great work

Nazze commented 6 months ago

Man, it feels like a big step forward. I will monitor for a couple of days. But I think you deserve more beer already ๐Ÿ˜…๐Ÿป

HAlover99 commented 5 months ago

Ciao Cloods

Refresh page solved but when try to open a popup-card loop start again. I already clear cache and reboot iPhone.

Clooos commented 5 months ago

I had this issue too, BUT this is already fixed and I will release a new version soon!

Edit: The new update is available!