Nerwyn / android-tv-card

A completely customizable universal remote card for Home Assistant. Supports multiple platforms out of the box.
Apache License 2.0
254 stars 13 forks source link

Slider is not rendered: TypeError: Cannot read properties of undefined (reading 'state') #106

Closed jsamr closed 4 months ago

jsamr commented 4 months ago

Checklist:

Release with the issue: 3.8.1

Last working release (if known): Not sure. I have tried 3.8.0 and 3.7.4 and could reproduce. Have cleared cache between each install.

Browser and Operating System:

Could also reproduce in the Android companion app

Description of problem:

The slider is not rendered.

Javascript errors shown in the web inspector (if applicable):

android-tv-card.min.js:187 Uncaught (in promise) 
TypeError: Cannot read properties of undefined (reading 'state')
    at c.setSliderState (android-tv-card.min.js:187:5287)
    at c.buildSlider (android-tv-card.min.js:195:51)
    at c.render (android-tv-card.min.js:217:38)
    at c.update (android-tv-card.min.js:390:101089)
    at c.performUpdate (android-tv-card.min.js:390:89065)
    at c.scheduleUpdate (android-tv-card.min.js:390:88601)
    at c._$EP (android-tv-card.min.js:390:88509)

Your Full Remote Config The minimal reproduction:

type: custom:android-tv-card
remote_id: remote.tcl_tv
rows:
  - - slider

image image

Note that other buttons work perfectly fine, I just omitted these for the purpose of minimally reproducing the issue.

Additional information:

DOM snapshot:

image

Nerwyn commented 4 months ago

Read the README. You didn't provide a slider_id or media_player_id.

jsamr commented 4 months ago

@Nerwyn Oh crap, thank you!