home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.96k stars 2.69k forks source link

TypeError: i.setConfig is not a function (In 'i.setConfig(t)', 'i.setConfig'is undefined) #17864

Closed AmoebeLabs closed 9 months ago

AmoebeLabs commented 1 year ago

Checklist

Describe the issue you are experiencing

As of HA versions > 2023.6 users of my custom card (Swiss Army Knife) report this error:

image

Some report this error is persistent, some say after F5 the error is gone. However, it keeps coming back!

See: https://community.home-assistant.io/t/lovelace-versatile-swiss-army-knife-custom-card/432419/244?u=amoebelabs for instance.

I myself can't reproduce the problem.

The crash is as you can see on line 97 where the custom card is created, and the 'setConfig' is called while the element is undefined!

image

Describe the behavior you expected

No error at all. If the custom card is known on other cards/dashboards, it should be known to HA.

Steps to reproduce the issue

1. 2. 3. ...

What version of Home Assistant Core has the issue?

2023.6

What was the last working version of Home Assistant Core?

2023.6

In which browser are you experiencing the issue with?

Chrome, Edge, Safari and Firefox show these problems

Which operating system are you using to run this browser?

No response

State of relevant entities

No response

Problem-relevant frontend configuration

Some users use storage mode, others YAML.

As an example: even very simple cards show this behaviour like:

    - type: grid
      columns: 2
      square: false
      cards:
        # ================================================================
        - type: 'custom:swiss-army-knife-card'
          entities:
            - entity: sensor.dsmr_reading_electricity_currently_delivered
              name: 'Electricity'
          layout:
            toolsets:
              - toolset: just-a-name
                position:
                  cx: 50
                  cy: 50
                tools: 
                  - type: circle
                    position:
                      cx: 50
                      cy: 50
                      radius: 45
                    styles:
                      circle:
                        stroke-width: 2em
                        stroke: red 
                        stroke-opacity: 0.5
                        fill: bisque
                        fill-opacity: 0.5
                  - type: state 
                    position: 
                      cx: 50
                      cy: 70
                    entity_index: 0
                    styles:
                      state: 
                        font-size: 15em

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

github-actions[bot] commented 9 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.