home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.95k stars 2.68k forks source link

Web Dashboard - Freeze tabs #21085

Closed AudricSan closed 3 months ago

AudricSan commented 3 months ago

Checklist

Describe the issue you are experiencing

Since the last update 2024.6.2 on "Microsoft Edge Chromium," the interface freezes, making the "tab unresponsive" notification.

I've encountered this problem on several Chromium-based browsers except for Google Chrome (Opera, Edge, Brave...). Do you know what might be causing this and how to fix it?

Describe the behavior you expected

not freezing..

Steps to reproduce the issue

  1. open web dashboard.
  2. no more able to click anywhere, and a few secounds after browser popup "tab not responding" appeared

What version of Home Assistant Core has the issue?

2024.6.2

What was the last working version of Home Assistant Core?

2024.6.0

In which browser are you experiencing the issue with?

Edge Chromium Version 126.0.2592.56

Which operating system are you using to run this browser?

Windows 11 24H2

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

the bug not appeared on Google Chrome.

genesispc commented 3 months ago

I am seeing the same issue: Microsoft Edge Version 125.0.2535.92 (Official build) (64-bit) on windows 11

EpicLPer commented 3 months ago

Same issue here since today, haven't had an issue the past few days despite updating to 2024.6.2. I actually think this might be a Chromium Engine bug, but I'm not 100% certain.

DISCLAIMER: I'm neither a debugging guy nor a programmer, these are just my uneducated best guesses.

Going by the performance analysis in Edge it seems to be stuck at trying to process autofill information, further expanding the options below reveals it seems to try and detect if input fields are ready for autofill??? I'm not entirely sure... However I can consistently reproduce a ~20 second freeze whenever I load into the Helper page or my main dashboard. image image

ThePatricide commented 3 months ago

For me it happens as well since today. I was on 2024.6.0 when it started. When I go directly to the local IP-address in Edge, all is well. On Android phone all is well. I tried updating to 2024.6.2 but to no avail. I've tried to reboot everything and clear caches to no avail. When accessing via domain (via Cloudflare and NGINX) it freezes after a second.

caiphus2k22 commented 3 months ago

I have these issues since at least yesterday as well on Chrome 126.6478, 2024.6.2 and Frontend 20240610.0

Switching off the auto-fill function (or im my case the bitwarden extention to Chrome) does consistently solve the issue, switching it on again causes the issue to re-appear.

ThePatricide commented 3 months ago

I have these issues since at least yesterday as well on Chrome 126.6478, 2024.6.2 and Frontend 20240610.0

Switching off the auto-fill function (or im my case the bitwarden extention to Chrome) does consistently solve the issue, switching it on again causes the issue to re-appear.

Can confirm the same workaround. Bitwarden is also the culprit here. Disabling it solves the freezing. It makes sense, they recently had an update where it would work also in InPrivate mode. Therefore, my go-to solution for checking if incompatibility comes from an extension also didn't work.

sushain97 commented 3 months ago

I'm seeing this as well. I've started navigating directly to settings pages to avoid ever loading a dashboard.

Versions:

@caiphus2k22 how did you disable Bitwarden's auto-fill to prevent this? I'd like to not entirely disable it (although that does fix things).

I have these settings and still experience the hang:

image

EpicLPer commented 3 months ago

Can confirm it seems Bitwarden related, so this issue should be closed.

I've already mentioned them on Twitter to bring up the issue, I confirmed this by updating Bitwarden on Brave to 2024.6 (previously had 2024.5.something installed), now I also have the issue there.

AudricSan commented 3 months ago

The source of the problem has been found, and a temporary solution has been identified. I am closing the issue.

caiphus2k22 commented 3 months ago

@sushain97 - You should goto Chrome extension settings - you can disable Bitwarden there - not possible to do so w/i Bitwarden.

birdwing commented 3 months ago

Issue is being tracked on the bitwarden repository. https://github.com/bitwarden/clients/issues/9617

birdwing commented 3 months ago

Turning off bitwarden's auto-fill doesn't seem to fix the issue for everyone. Best workaround as of right now, is to Right click on the extension, mouse over "This can read and change site data" then change it to "When you click the extension".

image

This will prevent the extension from loading on Home assistant, unless you click on it. It solves the issue, and is way simpler to revert once Bitwarden fixes the issue.

kspearrin commented 3 months ago

Hi all. Kyle here from Bitwarden. I am also a homeassitant user. I use Brave browser and have not experienced this problem. Do you all have any further information on how I might reproduce the problem so I can get our engineers to look into how to fix it?

johannes-z commented 3 months ago

@kspearrin I haven't narrowed it down, but not all pages are hanging, e.g. the config page still works. Rolling back the extension from 2024.6.0 to 2024.5.2 also fixed the issue.

birdwing commented 3 months ago

@kspearrin It is also happening on: https://photoshop.adobe.com/id?learnid=7b050fa34872

So this isn't just a Home Assistant issue. Someone in the thread (https://github.com/bitwarden/clients/issues/9617#issuecomment-2165798006) pointed out that it looks like bitwarden has an infinite recurse on Shadow dom elements. Which HA uses very heavily on dashboards.

This explains why the issue only happens on HA dashboards, but not on settings or config pages.

It also explains why it appears random on other websites as well. Shadow dom's aren't used all that often, so sites that do use them are affected.

kspearrin commented 3 months ago

Thanks @johannes-z and @birdwing . I can reproduce the issue now. We'll work on a fix ASAP.

kspearrin commented 3 months ago

If you are using Bitwarden cloud-hosted version, you can simply re-sync your vault and the problem should now go away. We are working on submitting a new version to the browser stores to address the issue for self-hosted Bitwarden users. You can also downgrade your browser extension client to 2024.5.x in the meantime to resolve the issue as well.

broyuken commented 3 months ago

How do you downgrade the extension?

danielbrunt57 commented 3 months ago

How do you downgrade the extension?

See https://github.com/bitwarden/clients/issues/9617 Specifically...

@raidolo Where do you find the older unpacked extension?

In the releases... https://github.com/bitwarden/clients/releases/download/browser-v2024.5.2/dist-chrome-2024.5.2.zip you have to unzip the file somewhere and open that directory with the "Load Unpacked" button (enable developer option in extensions)

The releases can be found here: https://github.com/bitwarden/clients/releases Chrome 2024.5.2 is here: https://github.com/bitwarden/clients/releases/tag/browser-v2024.5.2

kspearrin commented 3 months ago

Version 2024.6.1 has been submitted to the chrome web store with the fix but will take some time for approval and rollout.

broyuken commented 3 months ago

How do you downgrade the extension?

See bitwarden/clients#9617 Specifically...

@raidolo Where do you find the older unpacked extension?

In the releases... https://github.com/bitwarden/clients/releases/download/browser-v2024.5.2/dist-chrome-2024.5.2.zip you have to unzip the file somewhere and open that directory with the "Load Unpacked" button (enable developer option in extensions)

The releases can be found here: https://github.com/bitwarden/clients/releases Chrome 2024.5.2 is here: https://github.com/bitwarden/clients/releases/tag/browser-v2024.5.2

thanks, downgraded

danktankk commented 3 months ago

Version 2024.6.1 has been submitted to the chrome web store with the fix but will take some time for approval and rollout.

thank you!

loryanstrant commented 2 months ago

Just to throw a spanner in the works here I'm experiencing it currently on Firefox where there is no Bitwarden. I mean, I am also experiencing it on Edge with the Bitwarden extension (whether locked or unlocked). In Firefox I can navigate and use automations, dev tools, etc. But if I go to a dashboard or browser_mod, the tab will become unresponsive.

danktankk commented 2 months ago

2024.6.1 is still not available :| how long does it take?

kspearrin commented 2 months ago

Usually a day or so, but I guess Google isn't reviewing over the weekend. I would expect something tomorrow.

darnasii commented 2 months ago

Hello, On version 2024.6.1 installed from Chrome Web Store, problem still exist!

ThePatricide commented 2 months ago

On Edge with 2024.6.1 installed, the issue is gone. All works again as usual.

cagonzalezcs commented 2 months ago

@darnasii

I'm a dev with Bitwarden. The changes in v2024.6.1 should have resolved the behavior that this thread describes.

If you have time, could you please provide some details (OS, other extensions installed, console logs, etc...) on this thread? https://github.com/bitwarden/clients/issues/9617

We'd appreciate your help in narrowing down the bug that is giving you trouble. Thank you.

danktankk commented 2 months ago

Updated and it did not work at first. I needed to close the browser and reopen it. It now works as expected so far. Many thanks for this fix!

cagonzalezcs commented 2 months ago

@danktankk Thank you for the update, glad to hear things are working now.