home-assistant / frontend

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

Frontend 20240103.3 & 20240104.0 - Error logged on Thermostat card #19316

Open zzwhg opened 10 months ago

zzwhg commented 10 months ago

Checklist

Describe the issue you are experiencing

Whenever a Thermostat card is viewed in the iOS Homeassistant app, the card displays correctly but an error is logged in the Homeassistant log:

_2024-01-07 07:37:27.097 ERROR (MainThread) [frontend.js.latest.202401040] Uncaught error from WebKit 605.1.15 on iOS 15.6.1 TypeError: Right side of assignment cannot be destructured ref (node_modules/element-internals-polyfill/dist/index.js:360:47) this (node_modules/element-internals-polyfill/dist/index.js:772:41) this (nodemodules/element-internals-polyfill/dist/index.js:770:52) this (src/scoped-custom-element-registry.js:248:47) insertBefore ([native code]::) t (src/lit-html.ts:1454:43) i (src/lit-html.ts:1563:23) t (src/lit-html.ts:1384:33) t (src/lit-html.ts:2183:18) i (src/lit-element.ts:165:30)

The exact same error message is logged twice for each instance of the Thermostat card in the displayed Dashboard. When the same Dashboard is displayed on a laptop (via Chrome or Bing), no error is logged.

The Thermostat card is associated with a standard Google/Nest integration and has been working flawlessly for the past 2+ years until the introduction of Frontend 20240103.3.

Describe the behavior you expected

The Thermostat card should not log errors when viewed in the iOS Homeassistant app.

Steps to reproduce the issue

  1. Add Google/Nest Thermostat integration into Homeassistant
  2. Create new, blank Dashboard with UI
  3. Add Thermostat card to blank Dashboard and save
  4. Display Dashboard with Thermostat card using iOS Homeassistant app
  5. Check homeassistant.log in /config for errors. ...

What version of Home Assistant Core has the issue?

core-2024.1.2 with Frontend 20240103.3 or Frontend 20240104.0

What was the last working version of Home Assistant Core?

Any Core release prior to the introduction of Frontend 20240103.3 or later

In which browser are you experiencing the issue with?

iOS 15.6.1 + iOS Companion app 2023.12

Which operating system are you using to run this browser?

iOS 15.6.1

State of relevant entities

Physical Thermostat is online and viewable using laptop Homeassistant + Chrome with no errors logged.

Problem-relevant frontend configuration

Standard Google/Nest Thermostat integration

Javascript errors shown in your browser console/inspector

No response

Additional information

Installation: HA Supervised core - 2024.1.2 supervisor - 2023.12 frontend - 20240104.0

mbuico commented 10 months ago

same here,

Source: components/system_log/__init__.py:300
First occurred: 18:20:23 (1 occurrences)
Last logged: 18:20:23

Uncaught error from WebKit 605.1.15 on iOS 16.7.2 Script error. null @:0:0

to be honest noticed since 2023.12 on iPhone, and iPad At first I wasn't sure about the root cause but I have three thermostat card on my default dashboard, so I get this error on each app access..

Core 2024.1.3 Supervisor 2023.12.0 Operating System 11.4 Frontend 20240104.0

ios 16.7.2 Home assistant Companion app 2023.12.1

guardianbs commented 10 months ago

Exactly the same problem (or strikingly similar) when Thermostat displayed on an LG TV browser. Works fine on Chrome and Edge browsers under Windows on a PC. Error only started being displayed after updating to HA 2024.1. Error logged every time Thermostat is displayed. Error alters slightly, sometimes.

2024-01-22 21:37:32.981 ERROR (MainThread) [frontend.js.latest.202401040] Uncaught error from Chrome 79.0.3945.79 on Linux TypeError: Cannot destructure property 'labels' of 't' as it is undefined. labels (node_modules/element-internals-polyfill/dist/index.js:361:20) upgradeInternals (node_modules/element-internals-polyfill/dist/index.js:772:24) apply (nodemodules/element-internals-polyfill/dist/index.js:770:46) apply (src/scoped-custom-element-registry.js:248:41) insertBefore (src/lit-html.ts:1411:52) k (src/lit-html.ts:1454:35) $ (src/lit-html.ts:1563:11) g (src/lit-html.ts:1384:11) $AI (src/lit-html.ts:2183:7) i (src/lit-element.ts:165:30)

2024-01-22 21:41:49.650 ERROR (MainThread) [frontend.js.latest.202401040] Uncaught error from Chrome 79.0.3945.79 on Linux TypeError: Cannot destructure property 'labels' of 't' as it is undefined. labels (node_modules/element-internals-polyfill/dist/index.js:361:20) upgradeInternals (node_modules/element-internals-polyfill/dist/index.js:772:24) apply (node_modules/element-internals-polyfill/dist/index.js:770:46) apply (src/scoped-custom-element-registry.js:248:41) document.createElement (src/panels/lovelace/hui-root.ts:980:9) this._navigateToView (src/panels/lovelace/hui-root.ts:681:33)

mbuico commented 10 months ago

Issue persist after update to 2024.1.5 and on with access from macos too

2024-01-21 23:27:41.054 ERROR (MainThread) [frontend.js.latest.202401040] Uncaught error from WebKit 605.1.15 on Mac OS 10.15.6
TypeError: Right side of assignment cannot be destructured
ref (node_modules/element-internals-polyfill/dist/index.js:360:47)
this (node_modules/element-internals-polyfill/dist/index.js:772:41)
this (node_modules/element-internals-polyfill/dist/index.js:770:52)
this (src/scoped-custom-element-registry.js:248:47)
insertBefore ([native code]::)
t (src/lit-html.ts:1454:43)
i (src/lit-html.ts:1563:23)
t (src/lit-html.ts:1384:33)
t (src/lit-html.ts:2183:18)
i (src/lit-element.ts:165:30)

I'd add some "frontend" tag to be sure anybody will take care of this issue. Not sure it'll be addressed by this old proposed change https://github.com/home-assistant/frontend/pull/18638

taw123 commented 9 months ago

Additional failure scenario:

UI component: Lovelace display of Climate.Ecobee Client Platform: Mac OS X 10.15.7 / Safari v15.6.1 HA Platform: Core 2024.2.1 - Docker

Loged error: _ TypeError: Right side of assignment cannot be destructured ref

Logger: frontend.js.latest.202402071
Source: components/system_log/__init__.py:306 
First occurred: February 11, 2024, 10:55:15 AM (64 occurrences) 
Last logged: 9:04:19 AM

Uncaught error from Safari 15.6.1 on Mac OS 10.15.7 TypeError: Right side of assignment cannot be destructured ref (node_modules/element-internals-polyfill/dist/index.js:360:47) this (node_modules/element-internals-polyfill/dist/index.js:772:41) this (node_modules/element-internals-polyfill/dist/index.js:770:52) this (src/scoped-custom-element-registry.js:248:47) insertBefore ([native code]::) t (src/lit-html.ts:1454:43) i (src/lit-html.ts:1563:23) t (src/lit-html.ts:1384:33) t (src/lit-html.ts:2183:18) i (src/lit-element.ts:165:30)

Issue APPEARS to have started with 2024.1x or possibly as late as 2024.2. Additional config data available upon request and since I have over a year of logs I can further qualify onset if helpful.

yangrusen commented 9 months ago

It was indeed caused by the Thermostat card, so I initially removed it from the dashboard to avoid further issues. However, I eventually had to add it back because I require its functionality. I am uncertain whether adding it back will have any negative impact on the system’s performance.

guardianbs commented 8 months ago

Still a problem on HA 2024.3.1 with LG Webos Browser.

2024-03-17 13:18:49.000 ERROR (MainThread) [frontend.js.latest.202403070] Uncaught error from Chrome 79.0.3945.79 on Linux TypeError: Cannot destructure property 'labels' of 't' as it is undefined. labels (node_modules/element-internals-polyfill/dist/index.js:361:20) upgradeInternals (node_modules/element-internals-polyfill/dist/index.js:772:24) apply (nodemodules/element-internals-polyfill/dist/index.js:770:46) apply (src/scoped-custom-element-registry.js:248:41) insertBefore (src/lit-html.ts:1411:52) k (src/lit-html.ts:1454:35) $ (src/lit-html.ts:1563:11) g (src/lit-html.ts:1384:11) $AI (src/lit-html.ts:2183:7) i (src/lit-element.ts:165:30)

guardianbs commented 6 months ago

Still a problem on HA 2024.5.4 with LG Webos Browser.

2024-05-19 09:42:51.530 ERROR (MainThread) [frontend.js.latest.202405011] Uncaught error from Chrome 79.0.3945.79 on Linux TypeError: Cannot destructure property 'labels' of 't' as it is undefined. labels (node_modules/element-internals-polyfill/dist/index.js:365:20) upgradeInternals (node_modules/element-internals-polyfill/dist/index.js:776:24) apply (node_modules/element-internals-polyfill/dist/index.js:774:46) apply (src/scoped-custom-element-registry.js:248:41) _createPanel (src/layouts/hass-router-page.ts:318:9) loadProm.then( (src/layouts/hass-router-page.ts:214:13)

silamon commented 6 months ago

Most likely a bug in the polyfill: https://github.com/calebdwilliams/element-internals-polyfill/issues/127

github-actions[bot] commented 3 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

taw123 commented 2 months ago

PLEASE don't close this until verified as resolved with I have seen NO evidence. Thanks...

taw123 commented 1 month ago

TY

FidgetyRat commented 1 month ago

I still get this using my old phone as a dashboard.

2024-10-16 09:34:49.707 ERROR (MainThread) [frontend.js.modern.202410023] Uncaught error from WebKit 605.1.15 on iOS 15.8.3 TypeError: Right side of assignment cannot be destructured ref (node_modules/element-internals-polyfill/dist/index.js:364:47) this (node_modules/element-internals-polyfill/dist/index.js:776:41) this (node_modules/element-internals-polyfill/dist/index.js:774:52) this (src/scoped-custom-element-registry.js:248:47) insertBefore ([native code]::) t (src/lit-html.ts:1454:43) i (src/lit-html.ts:1563:23) t (src/lit-html.ts:1384:33) t (src/lit-html.ts:2183:18) i (src/lit-element.ts:165:30)

Though I can't say what card is causing it.

Latest 2024.10.2