custom-cards/tracker-card

Uncaught TypeError: Cannot read property 'addEventListener' of null

Closed this issue · 9 comments

Custom updater & tracker card worked for me fine until I upgraded to 0.88. After upgrading I don't see the tracker card.

Custom updater works:

screenshot 2019-02-22 at 19 59 05

Tracker card errors:

screenshot 2019-02-22 at 20 01 42

  1. cache cleared, HA restarted.

Log:

2019-02-22 20:09:14 ERROR (MainThread) [frontend.js.latest.201902200] http://192.168.1.155:8123/customcards/github/custom-cards/tracker-card.js?track=true:201:54 Uncaught TypeError: Cannot read property 'addEventListener' of null
2019-02-22 20:09:14 ERROR (MainThread) [frontend.js.latest.201902200] http://192.168.1.155:8123/customcards/github/custom-cards/tracker-card.js?track=true:201:54 Uncaught TypeError: Cannot read property 'addEventListener' of null
2019-02-22 20:09:58 ERROR (MainThread) [frontend.js.latest.201902200] http://192.168.1.155:8123/customcards/github/custom-cards/tracker-card.js?track=true:201:54 Uncaught TypeError: Cannot read property 'addEventListener' of null
madrian@ubuntudev:/usr/share/hassio/homeassistant$ curl "http://192.168.1.155:8123/customcards/github/custom-cards/tracker-card.js?track=true"
class TrackerCard extends HTMLElement

Config:

resources:
  - type: module
    url: /customcards/github/custom-cards/tracker-card.js?track=true
  - badges: []
    cards:
      - type: 'custom:tracker-card'
    icon: 'mdi:home-assistant'
    title: System

Same here, but i have never used it before, tried to set it up today. i get:

2019-02-22 21:58:38 ERROR (MainThread) [custom_components.custom_updater] Tried to serve up '/config/www/github/custom-cards/tracker-card.js' but it does not exist

@joelstahre run the service as stated in the readme

screenshot 2019-02-22 at 22 46 24

I have done that multiple times.

if that is the case open an issue where https://github.com/custom-components/custom_updater/issues

Can you try a different browser @adrianmihalko ?

I also am setting up tracker-card/ custom_updater for the first time on hassio 0.88.1. Getting the same error as @joelstahre

@ludeeus

I tried with Safar/Chrome/Firefox.

screenshot 2019-02-23 at 11 28 14

Can you try the latest version(1.2.4)?

It works now.

total 20K
drwxr-xr-x 2 root root 4.0K Feb 22 20:01 .
drwxr-xr-x 3 root root 4.0K Feb 22 20:01 ..
-rw-r--r-- 1 root root 9.2K Feb 22 20:01 tracker-card.js
@ubuntudev:/usr/share/hassio/homeassistant/www/github/custom-cards$ sudo rm tracker-card.js
@ubuntudev:/usr/share/hassio/homeassistant/www/github/custom-cards$ ls -lah
total 20K
drwxr-xr-x 2 root root 4.0K Feb 23 13:58 .
drwxr-xr-x 3 root root 4.0K Feb 22 20:01 ..
-rw-r--r-- 1 root root 9.6K Feb 23 13:58 tracker-card.js

Deleted browser cache and it shows up. 👍

Thank you.