Frontend error on logfile?

TypeError: undefined is not an object (evaluating ‘t.attributes’)

Problem is still occurring on macOS (v. 10.13.3) using Safari (v. 11.0.3) with Home Assistant (v. 0.65.5).

On mine it seems to be whenever I click reload groups in the frontend, I get 10 of the error lines each time I do that. I don’t see any missing functionality or anything, but the errors are worrisome.

On mine it seems to be whenever I click reload groups in the frontend, I get 10 of the error lines each time I do that.

Yup, same here.

I’m seeing the error in latest Safari, latest macOS whenever I load in the frontend interface; swapping tabs from and back to it will generate the error.

Same here, I get a lot of these errors
ERROR (MainThread) [frontend.js.latest.201804010] :0:0 Script error.
after reloading the groups.

When I open HA using http://localhost:8123/states?latest the errors are gone :thinking:

I have those too, especially when I refresh a page…

Any tips? Running 107.7

you shouldn’t get any errors like this.

If CTRL+F5 (clear cache and reload page) doesn’t clear the issues then you have stumbled upon one of the following issues:

  1. A custom card has not been updated. Solution: figure out which one and update it.
  2. You ran into a bug. Figure out what’s causing it and report it.

thnx, if i do a ctrl + f5 , i have the errors below , maybe that helps?

is there no way to debug so i have an idea where its coming from?


2020-03-31 18:06:02 ERROR (MainThread) [frontend.js.latest.202003181] https://xx.ui.nabu.casa/frontend_latest/chunk.ea4a842548b68b236f48.js:795:320 Uncaught TypeError: Cannot read property 'replaceChild' of null
2020-03-31 18:06:02 ERROR (MainThread) [frontend.js.latest.202003181] https://xx.ui.nabu.casa/frontend_latest/chunk.ea4a842548b68b236f48.js:795:320 Uncaught TypeError: Cannot read property 'replaceChild' of null
2020-03-31 18:06:02 ERROR (MainThread) [frontend.js.latest.202003181] https://xx.ui.nabu.casa/frontend_latest/chunk.ea4a842548b68b236f48.js:795:320 Uncaught TypeError: Cannot read property 'replaceChild' of null
2020-03-31 18:06:02 ERROR (MainThread) [frontend.js.latest.202003181] https://xx.ui.nabu.casa/frontend_latest/chunk.ea4a842548b68b236f48.js:795:320 Uncaught TypeError: Cannot read property 'replaceChild' of null
2020-03-31 18:06:02 ERROR (MainThread) [frontend.js.latest.202003181] https://xx.ui.nabu.casa/frontend_latest/chunk.ea4a842548b68b236f48.js:795:320 Uncaught TypeError: Cannot read property 'replaceChild' of null
2020-03-31 18:06:02 ERROR (MainThread) [frontend.js.latest.202003181] https://xx.ui.nabu.casa/frontend_latest/chunk.ea4a842548b68b236f48.js:795:320 Uncaught TypeError: Cannot read property 'replaceChild' of null

did you see this post: Stack-In-Card: Drop-in replacement for vertical-stack-in-card

maybe related to your setup?

will be fixed in 108 , was an issue in frontend (conditional card, when no conditional card is displayed)


using 108.8 this still occurs, and must admit I dont know where to look for a solution.

odd thing is many of the mentions cards in the listing are nt even on the view this is happening in (history-graph, weather-forecast)

would appreciate further pointers to a solution anyone may have found!

update

next to the conditional card mentioned by @pergola.fabio above , the error seems to come from this stack-in-card, using a markdown

type: custom:stack-in-card
cards:
  - type: markdown
    title: |
      Home Assistant --> Google Assistant
      Voice commands
#    style: |
#      ha-card {background: url('/local/various/google_assistant.png');
#               background-size: cover;
#               --keep-background: true;}
    content: |

      Ok/Hey Google,
#      --> <i>'activity/mode'</i> <b>activeren</b>
#      --> <b>turn-on/off</b> <i>'switch/verlichting'</i>
#      --> <i>'switch/verlichting'</i> <b>in-/uitschakelen</b>
  - type: entities

taking the markdown out of the stack stops the error, and even the slightest bit of markdown (as you see Ive already stripped most) makes the error popup. Could it be I’ve stumbled upon an issue between @romrider s stack-in-card and the core markdown card? Or did I make an obvious mistake in the markdown config maybe?

Remarkable thing is, the markdown card shows fine, even with all styling reinstated:

  - type: markdown
    title: |
      Home Assistant --> Google Assistant
      Voice commands
    style: |
      ha-card {background: url('/local/various/google_assistant.png');
               background-size: cover;
               --keep-background: true;}
    content: |

      Ok/Hey Google,
      --> <i>'activity/mode'</i> <b>activeren</b>
      --> <b>turn-on/off</b> <i>'switch/verlichting'</i>
      --> <i>'switch/verlichting'</i> <b>in-/uitschakelen</b>

i also still have the same issue on 108.x , still not fixed for me

yeah his is what I found so far: combination of stack-in-card with picture, picture-entity or markdown card results in these errors. Filed an issue on the GitHub : https://github.com/custom-cards/stack-in-card/issues/7

not sure how to proceed on this, as I think Ive seen Romrider write elsewhere this is for core stack-card. It only shows in my config though when using the stack-in-card, or the conditional card…

Personally I avoid the custom stack-cards because they break all the time. I’ve been using hui-items in the entities card and you can piece together anything. Just requires card mod to remove the background and shadow.

yeah, but I would have hoped the stack-in-card to be better in that department than the vertical-stack-in-card. Must say is shows just fine, only throwing this silly error, which of course isn’t good.

it uses stack cards. It’s going to have the same problems that vertical-stack-in-card has.

ok will try again, and see where the styling issues/questions arise :wink:

that is reflected in the error isn’t it? So wouldn’t it be a core issue then?

not if the card is using it outside it’s intentions.

Either way, you made the right call creating a pr against the custom card

Can you give me an example about how to use hui-items? Cannot find any documentation about this…

hui items are identical to their non-hui counterparts. e.g. hui-entities-card is the entities card. So the configuration is the same. Use the documentation for the counterparts.