thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.08k stars 168 forks source link

mod-card 'doesnt exist' on first load #185

Closed Mariusthvdb closed 2 years ago

Mariusthvdb commented 2 years ago

My Home Assistant version: 2022.4.0.dev20220307

My lovelace configuration method (GUI or yaml): Yaml

What I am doing:

using mod-card seeing the error popup on first load on the few mod-cards I use. a page reload always solves it.

card-mod is loaded via

frontend:
  extra_module_url:
    - /local/lovelace/resources/card-mod/card-mod.js

seeing this since a few updates, and sorry but can not be exact about it, it probably is since the 2022.4 dev (thought could be since 2022.3 ) What I expected to happen:

no error

What happened instead:

Schermafbeelding 2022-03-07 om 08 44 41

Minimal steps to reproduce:

# The least amount of code possible to reproduce my error

# End of code

Error messages from the browser console: no errors

By putting an X in the boxes ([]) below, I indicate that I:

sdotter commented 2 years ago

I've experienced exact same error... havent found a solution

Only thing i noticed... it happened a lot more when using / loading as module as: (and indeed since dec / jan update ive noticed it)

lovelace: 
  resources:

When i whas loading card mod from ui-lovelace.yaml as resources (card mod wasnt loaded as module i think?) i think that kinda fixed the error... but a lot slower

theglus commented 2 years ago

I'm experiencing the same issue as well. I ended up having to revert back to 2022.2.9 in order to mitigate the issue.

sdotter commented 2 years ago

Yep in 2022.2.9 problem isnt there

dmatik commented 2 years ago

Same here... Only since 2022.3.X

ildar170975 commented 2 years ago

2022.3.3. Do not see the bug. Using extra_module_url.

Dino-Tech commented 2 years ago

2022.3.3

frontend:
  extra_module_url:
    - /local/card-mod.js

it's there, but several screen reloads and sometimes it will load