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

Cannot read properties of undefined (reading 'template') #243

Open
1 task done
AmoebeLabs opened this issue Sep 17, 2023 · 0 comments
Open
1 task done

Cannot read properties of undefined (reading 'template') #243

AmoebeLabs opened this issue Sep 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@AmoebeLabs
Copy link
Owner

AmoebeLabs commented Sep 17, 2023

Bug report notice

Before you file a bug, make sure that you did not make a configuration mistake. The Swiss Army Knife in its current state does not yet have full configuration sanity checks!

So make sure your problem is not related to that!

  • Yes, I'm sure that it is not a configuration mistake

Swiss Army Knife version

The version you are using. See HACS or the Browser console
Development version

Bug description

A clear and concise description of what the bug is.

To Reproduce

Very difficult to reproduce, but this one seems to come and go on both desktop and iPad / iPhone.

Steps to reproduce the behavior:

  1. Start stuff
  2. Don't start at FCE2, start on other screen
  3. Do an ctrl-F5, ie reload Lovelace
  4. Got FCE2
  5. The 4the card should give an error

Note:
Before these tests:

  • browser cache is disabled and cleared
  • frontend caches are cleared

Both templates where created 4 days ago...

image

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

The card that can't load a template colorstop:

image

The error on the console showing which colorstop can't be loaded:

image

The list of colorstops in the lovelace configuration in the frontend debugger. You can see that the template does NOT exist, hence the error is valid:

image

More detail with 28 loaded colorstops:

image

The folder with the templates should be loaded by lovelace. The template is there, but why is it not loaded?

You can see 30 colorstops, so TWO are NOT loaded by lovelace!
The energy_4kw_v1 and energy_4000w_v1 were both recently added to the list, and are the ones that are NOT loaded!

Why is Lovelace loading an OLD configuration???

image

Extra

Adding a dummy colorstops file doesn't help:

  • did reload resources from within HA
  • did ctrl-F5

Nope: it is also not showing up...

image

image

image

Desktop browser (please complete the following information):

  • OS: [e.g. Windows]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 110]

Companion App on Smartphone/Tablet (please complete the following information):

  • Device: [e.g. iPhone16]
  • OS: [e.g. iOS16]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 16]

Additional context
Add any other context about the problem here.

(Optional): Suggested Solution

The solution is to RESTART Home Assistant, at least this solves this problem every time I have tried sofar...

Note:

  • reload config does NOT work
  • restarting HA from within HA does NOT work
  • restarting the container (using Portainer) DOES work!

Crashes on Desktop and Mobile are gone. The debug log (browser console) also now shows ALL the added colorstops, even the dummy colorstop used for testing...

image

@AmoebeLabs AmoebeLabs added the bug Something isn't working label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant