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

Error while loading page lovelace. on 2024.6.0 #21004

Closed
4 tasks done
remoteassist opened this issue Jun 5, 2024 · 58 comments · Fixed by #21074
Closed
4 tasks done

Error while loading page lovelace. on 2024.6.0 #21004

remoteassist opened this issue Jun 5, 2024 · 58 comments · Fixed by #21074
Assignees
Milestone

Comments

@remoteassist
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.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

Error - "error while loading page lovelace"

Issue exists on:

  • the HA Companion app (2023.12.1) on an old ipad running iOS 12.5.7 (max for the iPad)

Issue does not exist on:

  • the HA Companion app on new android tablet
  • last version of 2024.5.x

Describe the behavior you expected

To use the UI as per normal

Steps to reproduce the issue

1.Upgrade to 2024.6.0
2.Logging into old ipad running iOS 12.5.7
see #20697 for previous issue
...

What version of Home Assistant Core has the issue?

2024.6.0

What was the last working version of Home Assistant Core?

latest 2024.5.x

In which browser are you experiencing the issue with?

home assistant companion 2023.2

Which operating system are you using to run this browser?

iOS 12.5.7

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

@ccmacaluso
Copy link

ccmacaluso commented Jun 5, 2024

Having this same issue on my Fire tablets used as dashboards around the house. Moving back to 2024.5.5 brings all of my tablets back to full working state with zero configuration adjustments required.

@rlause
Copy link

rlause commented Jun 6, 2024

same issue with Home Assistant app on Galaxy S23+ (current Android and patches) and Galaxy Tab 9 (current Android and patches), starting with 2024.5 as far as I can remember
normal (user) dashboards work fine, settings won't work and show a page loading error

@ekkridon
Copy link

ekkridon commented Jun 6, 2024

Same issue using Kiosker kiosk browser or iPad Safarai browser on an older iPad. Error loading page on all pages after sign-in.

@apeiron69
Copy link

I have the same issue on iPad with 13.5.7 iOS and 2024.6.0 HA core installed. Lovelace no longer loads.

@steveworkman
Copy link

+1 - HAR file available for debugging in the duplicate bug #21015

@Madi0ne
Copy link

Madi0ne commented Jun 7, 2024

I am facing the same issue on iPad mini 2 (iPadOS 12.5.7) on 2024.6.0

@matorres86
Copy link

matorres86 commented Jun 7, 2024

Same on older ipad mini, I kept this tablet specifically to access the HA app and not have another electronic device end up in a landfill. I hope they fix it.

Edit: Happens on Chrome and HA app.

@cayco
Copy link

cayco commented Jun 7, 2024

Same here on old iPad Air

@oklih
Copy link

oklih commented Jun 7, 2024

I have the same problem. After update to 2024.6.0. Before with the latest 2024.5.x it was no problem

@shovelheadman
Copy link

Same problem on old iPad - had to revert to a 2024.5.5 backup to be able to use my dashboard again.

@slipx06
Copy link

slipx06 commented Jun 7, 2024

I can confirm this problem has started appearing on the IOS companion app after the last update. IOS version 12.5.7

@OzMike63
Copy link

OzMike63 commented Jun 8, 2024

Sadly 2024.6.1 patch did not fix this.....roll back time again!

@deltazerorsan
Copy link

Sadly 2024.6.1 patch did not fix this.....roll back time again!

Tx! So waiting...

@luq555
Copy link

luq555 commented Jun 8, 2024

After upgrade to 2024.6.1

WhatsApp Image 2024-06-08 at 14 07 44

image

@silamon silamon added this to the 2024.6 milestone Jun 8, 2024
@pichel3000
Copy link

I hope this gets a fix in upcoming patches.

@silamon
Copy link
Contributor

silamon commented Jun 9, 2024

If anyone could post the stack trace of the error, similar to what was done in #20697, that would be helpful.

@apeiron69
Copy link

apeiron69 commented Jun 9, 2024 via email

@steveworkman
Copy link

If anyone could post the stack trace of the error, similar to what was done in #20697, that would be helpful.

See #21015 for a HAR from my iPad mini

@ptfuzi
Copy link

ptfuzi commented Jun 10, 2024

Also had to downgrade to 2024.5.5

@deltazerorsan
Copy link

If anyone could post the stack trace of the error, similar to what was done in #20697, that would be helpful.

See #21015 for a HAR from my iPad mini

Here you have my best...
photo_2024-06-10_20-54-47

@smithbill17

This comment was marked as duplicate.

@apeiron69

This comment was marked as duplicate.

@steverep
Copy link
Member

Folks, I can look into this, but from a volunteer developer perspective, it would be helpful if:

  1. Please paste the actual full text of the error and stack trace from the browser console (not a screenshot or zip file which just it harder or impossible to read and search for easily). There's a reason our template asks for it when opening an issue and @silamon followed up asking for the same. It pinpoints the exact lines in the code to debug.
  2. Please avoid comments that just confirm the issue and don't contribute new information. It's just more fluff for newcomers just arriving to the issue. Just give the OP a thumbs up and subscribe to the issue instead.

@lispington

This comment was marked as off-topic.

@steverep
Copy link
Member

@lispington thank you for the text, but we're looking for the error and trace from the browser, not from the HA core log. Try to open in the browser, press F12 to get the console, and the error(s) should be there.

@steveworkman
Copy link

@lispington thank you for the text, but we're looking for the error and trace from the browser, not from the HA core log. Try to open in the browser, press F12 to get the console, and the error(s) should be there.

Here is the har file https://github.com/user-attachments/files/15685653/homeassistant.local.webarchive.zip

@steverep
Copy link
Member

@steveworkman I get errors trying to load it. Again, just the text of the error and stack would be appreciated.

@nickcmaynard
Copy link

nickcmaynard commented Jun 11, 2024

Folks,

This is what I have from a remote debug session to an iPhone running iOS 12.5.7.

Screenshot 2024-06-11 at 21 02 28

Transcript:

[Error] Unhandled Promise Rejection: SyntaxError: Unexpected token '.'
	(anonymous function)
	rejectPromise
	promiseReactionJob

[Error] Error loading page – "lovelace"
TypeError: (0,n.CoerceOptionsToObject) is not a function. (In '(0,n.CoerceOptionsToObject)(e)', '(0,n.CoerceOptionsToObject)' is undefined)
a — index.js:309
y — utils.js:95
(anonymous function) — utils.js:151
forEach
(anonymous function) — utils.js:147
forEach
(anonymous function) — utils.js:143
m — BestFitMatcher.js:18
L — ResolveLocale.js:15
A — index.js:4
(anonymous function) — intl-polyfill.ts:24
h — regeneratorRuntime.js:45
(anonymous function) — regeneratorRuntime.js:133
r — asyncToGenerator.js:3
s — asyncToGenerator.js:17
promiseReactionJob
	(anonymous function) (app.HklW542yG5A.js:2:98761)
	promiseReactionJob

[Error] Unhandled Promise Rejection: TypeError: (0,n.CoerceOptionsToObject) is not a function. (In '(0,n.CoerceOptionsToObject)(e)', '(0,n.CoerceOptionsToObject)' is undefined)
	(anonymous function) (app.HklW542yG5A.js:2:328171)
	map
	a (app.HklW542yG5A.js:2:328139)
	(anonymous function) (45959.ZjjpSmFaFnU.js:1:35629)
	h (app.HklW542yG5A.js:2:268946)
	(anonymous function) (app.HklW542yG5A.js:2:270291)
	r (app.HklW542yG5A.js:2:255251)
	s (app.HklW542yG5A.js:2:255455)
	promiseReactionJob

[Error] Unhandled Promise Rejection: TypeError: (0,n.CoerceOptionsToObject) is not a function. (In '(0,n.CoerceOptionsToObject)(e)', '(0,n.CoerceOptionsToObject)' is undefined)
	(anonymous function)
	rejectPromise
	promiseReactionJob

[Error] Unhandled Promise Rejection: TypeError: (0,n.CoerceOptionsToObject) is not a function. (In '(0,n.CoerceOptionsToObject)(e)', '(0,n.CoerceOptionsToObject)' is undefined)
	dispatchException (app.HklW542yG5A.js:2:273130)
	(anonymous function) (app.HklW542yG5A.js:2:270222)
	r (app.HklW542yG5A.js:2:255251)
	c (app.HklW542yG5A.js:2:255491)
	promiseReactionJob

[Error] Unhandled Promise Rejection: TypeError: (0,n.CoerceOptionsToObject) is not a function. (In '(0,n.CoerceOptionsToObject)(e)', '(0,n.CoerceOptionsToObject)' is undefined)
	(anonymous function)
	rejectPromise
	promiseReactionJob

[Error] Unhandled Promise Rejection: TypeError: (0,n.CoerceOptionsToObject) is not a function. (In '(0,n.CoerceOptionsToObject)(e)', '(0,n.CoerceOptionsToObject)' is undefined)
	dispatchException (app.HklW542yG5A.js:2:273130)
	(anonymous function) (app.HklW542yG5A.js:2:270222)
	r (app.HklW542yG5A.js:2:255251)
	c (app.HklW542yG5A.js:2:255491)
	promiseReactionJob

[Error] Unhandled Promise Rejection: TypeError: (0,n.CoerceOptionsToObject) is not a function. (In '(0,n.CoerceOptionsToObject)(e)', '(0,n.CoerceOptionsToObject)' is undefined)
	(anonymous function)
	rejectPromise
	promiseReactionJob

I'm afraid I don't seem to have sourcemaps, so this might be the best we can do without those.

@steveworkman
Copy link

image

This is where the sourcemap resolves the error to the @formatjs/intl-locale package and it's looking for CoerceOptionsToObject which is provided by the @formatjs/ecma402-abstract package. I don't really understand why that wouldn't be there as there's not much to it

Its called from var desiredLocale = new Intl.Locale(desired).maximize(); within @formatjs/intl-localematcher/lib/abstract/utils.js

Futher down the stack it comes from this code in the intl-polyfill:

  if (shouldPolyfillDateTimeFormat(locale)) {
    polyfills.push(
      import("@formatjs/intl-datetimeformat/polyfill-force").then(() =>
        polyfillTimeZoneData()
      )
    );
  }

@rarroyo6
Copy link

I have several Android tablets throughout the house running FullyKiosk, the tablets are running several different dashboards. As of 2024.6.0, some of the dashboards work on all the tablets, and the others don't work on any of the tablets. So there is something specific on some dashboards that is making them fail. All the dashboards use Browser-Mod and Custom Button Cards, everything else is pure HA.
I don't know how to get the log or the stack dump from FullyKiosk, so I can't help much more. But if someone can show me how to do it, I'll be happy to post it here.

@steveworkman
Copy link

steveworkman commented Jun 11, 2024

Given that it's failing at Intl.Locale() and that #20798 the polyfill for Intl.Locale is now added for < iOS 14 it seems like that's the issue. I've got a debugger on it and it appears that the required ecma402-abstract library is still pending in a promise

image

What I don't understand is why that would be a Promise at all. Inside formatjs that should be a require call and it just grabs it from the bundle. I can see from the intl-polyfill file that if Locale is required it should wait for that before moving on to any other polyfills. It seems to do that, move on, and just fail the first time it tries to use new Intl.Locale.

I can't see any open issues on formatjs about this, so I'm assuming it's the ES5 bundle.

Update: I can see that the ecma402-abstract library code is being loaded (chunk 45959) before it is being used, and yet still saying that it's a promise...

@steverep
Copy link
Member

@nickcmaynard and @steveworkman that's the awesome info I needed. I have some suspicions as to what's happening here but I won't be able to dig in until later tonight. I think this is maybe a bug in the order we polyfill Intl that has been around for quite a while, but wasn't exposed until #20798. That change basically will delay loading them until they are needed more so than before, so if the loading isn't perfect, errors would be expected.

@steverep
Copy link
Member

Just a quick update.... I can reproduce the problem myself now, but still tracking down the root cause. I'll pick it up again tomorrow.

@FA9US

This comment was marked as duplicate.

@Maeckes89

This comment was marked as duplicate.

@steverep
Copy link
Member

PR #21074 is in to fix this. Should come in 2024.6.3.

@ekkridon
Copy link

Thank you for the work @steverep - sent a couple bucks your way to help in your efforts (which I now realize are broader and more amazing than this silly bug). Kudos!

@steverep steverep self-assigned this Jun 12, 2024
@steverep steverep changed the title Error while loading page lovelace. on 2024.6.0 was fixed #20741 previously Error while loading page lovelace. on 2024.6.0 Jun 12, 2024
@matorres86
Copy link

Where do we donate, thank you so much!

@ekkridon
Copy link

Click his name and look for options to sponsor him. After reading about the cool accessibility work he's doing and feeling inferior for your own contributions to humanity.

@pvmil
Copy link

pvmil commented Jun 12, 2024

Thanks, found it, @steverep: thanks for your efforts!

@steveworkman
Copy link

Great work @steverep - if you have some more gnarly UI bugs, let me know, it was pretty fun to get stuck into this codebase

@matorres86
Copy link

Click his name and look for options to sponsor him. After reading about the cool accessibility work he's doing and feeling inferior for your own contributions to humanity.

Thank you, doing this now, it's so much appreciated, another device kept out of the landfills!

@sebastian3107
Copy link

Thanks a lot. Were some unit tests added so this bug doesn't show up a third time? 🧪

@jaymunro
Copy link

jaymunro commented Jun 14, 2024

Thanks a lot. Were some unit tests added so this bug doesn't show up a third time? 🧪

I was thinking the same too, but wasn't sure how to word it. Maybe to clarify, although these were "technically" different bugs, the main issue is that some of OS's are not being tested against.

I hope this doesn't end up with older devices becoming unsupported. They are so useful for kiosk type uses. Mine is in the kitchen on the fridge and used by the whole family.

@steverep
Copy link
Member

Thanks a lot. Were some unit tests added so this bug doesn't show up a third time? 🧪

As I said above, although the symptom looked the same, this was not a second regression of the same bug. The first was an error in a dependency that I maintain which is now tested. This one is more difficult to test.

I was thinking the same too, but wasn't sure how to word it. Maybe to clarify, although these were "technically" different bugs, the main issue is that some of OS's are not being tested against.

Actually, none are tested. Lack of end to end testing is something I'm working on right now.

I hope this doesn't end up with older devices becoming unsupported. They are so useful for kiosk type uses. Mine is in the kitchen on the fridge and used by the whole family.

There's no plan to drop such support, and developers are well aware of such uses. These bugs happened because of optimizing our legacy browser build for better performance (so the opposite of dropping support).

@deltazerorsan
Copy link

2024.6.3 WORKING with iOS 12.5.7

@apeiron69
Copy link

apeiron69 commented Jun 16, 2024 via email

@rlause
Copy link

rlause commented Jun 16, 2024

An error still exists on up-to-date Android devices like Samsung Galaxy Tab 9 or Samsung Galaxy S23+. The settings dashboard shows Error while loading page dashboard. It doesn't matter wether I use Chrome, Firefox or the Home Assistant app for Android.

All other dashboards (even the developer dashboard) work well.

As I already pointed out there seems to be no possibility to track the problem down, as neither the browsers nor the Home Assistand app provide any messages, trace logs or similar.

As this might be important: language setting is German.

PS: The settings dashboard is displayed correctly in any browser under Windows 11.

@steverep
Copy link
Member

@rlause if you are only experiencing a problem loading the Settings page and no others, then this is not the same issue. Please open a new one (or perhaps find another that better matches).

@rlause
Copy link

rlause commented Jun 17, 2024

@rlause if you are only experiencing a problem loading the Settings page and no others, then this is not the same issue. Please open a new one (or perhaps find another that better matches).

@steverep Fortunately, after an automatic reload of the frontend (Home Assistant app) this morning the settings dashboard works again (after a long time). Well, let me thank you for your efforts even if there is a chance that you are not responsible for this "sudden healing".

@aeonoea
Copy link

aeonoea commented Jul 19, 2024

Anyone still experiencing issues with the homepage? I get the same error Error while loading page lovelace. on HA 6.4 (20240610.1) on Safari running on the latest iOS Beta. Everything else seems to work, it's just the homepage.

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.