[frontend.js.latest.xxxx] :0:0 Script error

i have lots of them in my log file
how can i troubleshoot this, where is it coming from?
everytime i refresh a page, those are filled up
already happening since 102.xx , want to fix it now

thnx


2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.
2020-03-31 14:41:19 ERROR (MainThread) [frontend.js.latest.202003181] :0:0 Script error.

this is debug, not much more …

2020-03-31 15:10:39 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139833795471248] Received {'type': 'call_service', 'domain': 'system_log', 'service': 'write', 'service_data': {'logger': 'frontend.js.latest.202003181', 'message': ':0:0 Script error.'}, 'id': 29}
2020-03-31 15:10:39 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.139833795471248] Received {'type': 'call_service', 'domain': 'system_log', 'service': 'write', 'service_data': {'logger': 'frontend.js.latest.202003181', 'message': ':0:0 Script error.'}, 'id': 30}
2020-03-31 15:10:39 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=system_log, service=write, service_data=logger=frontend.js.latest.202003181, message=:0:0 Script error.>
2020-03-31 15:10:39 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=system_log, service=write, service_data=logger=frontend.js.latest.202003181, message=:0:0 Script error.>

those debug lines are just the logger telling you what it’s writing to the log.

Your issue lies in the frontend. As I said before, this is most likely a custom card erroring. Make sure all your cards are up to date.

yeah, they normally are, using HACS

you had the issue too? conditional cad combined with button card
i have them too, maybe thats the cullprit

sorry, copy pasted wrong lines

here are the ones when i do ctrl + f5

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

are you running chrome?

yes on desktop
and on Android i am using HA official app, those generate errors too

in chrome, hit F12. Then CTRL+F5. Then take a screenshot of the errors at the bottom of dev page

aha, getting closer

its related to hui-stack-card ?

it is, but that’s just a vertical or horizontal stack. The error lies in whatever card is in those stacks.

EDIT: Unless you are directly calling hui-stack-card which (i believe, could be wrong) is the parent class for horizontal or vertical stacks.

no, i dont call it direcly
but still have no idea how to fix :slight_smile: , or what can be the cause of it

It’s a custom card. Gotta narrow it down. Count the number of errors, then find a stack with that many cards of the same type. Then comment out that section. See if those errors go away. Rinse and repeat until you find the correct card. Then when you do, make sure that card is up to date. If it’s up to date, write up a bug against the card.

ok, thnx for the info

already much closer to the source of issue

i started with a simple view, where i was using a declutter template like example below, that one gave me an error…

any idea whats wrong here? if i remove in the template the horizontal stack card, the error is gone
any idea whats wrong with it?

example :

############ card:


      - type: custom:decluttering-card
        template: notification-card
        variables:
          - color: rgba(0, 0, 0, 0.5)
          - icon: robot-vacuum
          - content: "{{ states.vacuum.roborock.state }}"

########" template card (i i remove the horizontal stack, no error anymore:

default:
  # Icon
  - icon: home
  # Content
  - content: default text

card:
  type: horizontal-stack
  cards:
    - !include ../includes/blank-card.yaml
    - type: markdown
      style: |
        ha-card {
          background: [[color]];
          border-radius: var(--border-radius);
          font-size: 13px;
          font-family: Helvetica;
          color: white;
        }
      content: >
        <ha-icon icon="mdi:[[icon]]"></ha-icon> [[content]]
    - !include ../includes/blank-card.yaml

what’s in those blank cards?

nothing special, just a blank button to fill up spaces
but its not related , already removed them, error still there
but seems its not related to horizontal, but i think its related to markdown

in templates where i used markdown, erros are showing up it seems
or maybe a combination with markdown and horizontal

type: 'custom:button-card'
color_type: blank-card
styles:
  card:
    - width: 10px

ok, the culprit at the end was not markdown
but the use of conditional cards… it throws an error when no card is displayed…

so i reverted them all to -state-switch card , you had that issue too i saw on github?

the only cosmetic issue left for me, is when using state-switch cards now, when no card id displayed, there is blanc invisible card with some margin height

si if there are several hidden state-switch cards, the next visible is shifted down , because of all other invisible cards…

Hi @petro
conditional card fix is coming, just waned to let you know
so i can revert back to conditional cards instead of state-switch

thnx for all info!

Hi did you find the issue. Sorry to restart this post, but I been painfully try to troubleshoot this issue for 3 months and still can’t find the cause and no where to turn too. Below is my curl data as it doesn’t show much. Also I have no way to recreate the issue it just come randomly something middle of day with lot of traffic data. Sometime in the 3 am in the morning with no nothing going on. My log file is VERY bad with this error, it often trigger over 50K log under 1 minute sometime.