home-assistant / frontend

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

Uncaught TypeError: Cannot convert undefined or null to object 0.92.0 #3125

Closed stepanov1975 closed 5 years ago

stepanov1975 commented 5 years ago

Home Assistant release with the issue: 0.92.0 Last working Home Assistant release: 0.91.4 Lovelace UI Browser and Operating System: Google Chrome Windows 10 Description of problem: Error in log after displaying the history. No visible issues. This not appeared in 0.91.4, but I am not sure because I added some additional sensors before updating to 0.92.0 and not sure if I checked history.

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

 ERROR (MainThread) [frontend.js.latest.201904240] http://ha.home.local:8123/frontend_latest/app.7ac4ac3c.js:2:60391 Uncaught TypeError: Cannot convert undefined or null to object

Additional information:

iantrich commented 5 years ago

What mode are you in?

stepanov1975 commented 5 years ago

What mode are you in?

Mode? Lovelace as mentioned. Or you mean something else?

iantrich commented 5 years ago

Auto, YAML, or storage

stepanov1975 commented 5 years ago

Auto, YAML, or storage

YAML

lovelace:
  mode: yaml
hekm77 commented 5 years ago

I get the same error when I open more_info window.

Checked on:

arch    armv7l
dev false
docker  false
hassio  false
os_name Linux
python_version  3.7.2
version 0.92.2
virtualenv  true

frontend:
  javascript_version: latest

lovelace:
  mode: yaml

macOS 10.14.4

Safari 12.1

http://192.168.1.x:8123/frontend_latest/app.7bd99ba1.js:2:60395 TypeError: undefined is not an object (evaluating 'Object.keys(this._keyBindings)')

Chrome 74.0.3729.131

http://192.168.1.x:8123/frontend_latest/app.7bd99ba1.js:2:60391 Uncaught TypeError: Cannot convert undefined or null to object
DallasO commented 5 years ago

I get this error every time I open the ZWave menu. My ZWave network also started acting up when I started seeing this error, trying to figure out if they're related.

I have a ZWave sensor reporting motion, but none of my automations fire that use it as a trigger.

  arch: armv7l
  dev: false
  docker: false
  hassio: false
  os_name: Linux
  python_version: 3.5.3
  timezone: America/Los_Angeles
  version: 0.92.2
  virtualenv: true
  Lovelace
  mode: auto-gen
capstan1 commented 5 years ago

Just want to add that I get the same error when clicking on:

Both with 0.92.2 and 0.93

capstan1 commented 5 years ago

And another addition: I just deleted all the views from my lovelace and just added a Entity card with 3 lights. I also changed to the default theme and - to make sure - rebooted. The error keeps appearing, so it doesn't seems to be the issue of some custom card.

kloggy commented 5 years ago

I just want to chime in here and say that I too am experiencing this. YAML mode here too.

Also, I'd like to add that this is probably much more widespread than is realised. Functionality is not impaired* along with the fact that the (improved) way that hassio only shows one instance of repeating errors with a count means many will not even know it is happening.

*Except last night while testing and so forcing loads of errors I was exceeding some limits which did cause that 'Log write failure...'(?) error which in turn produces a pop-up notification (bottom left of the window). Sometimes this even caused a 'reconnection'

I don't have much to add in the way of details except to say that after many hours of investigation last night I am no nearer to finding the cause. I had suspected custom cards but am not convinced by that anymore as I also get these errors by going to History and Logbook.

SeraphimSerapis commented 5 years ago

I encounter the same issue -- it occurs at least once every reboot:

https://hass.domain.com/frontend_latest/app.a259a502.js:2:59245 Uncaught TypeError: Cannot convert undefined or null to object
starkillerOG commented 5 years ago

I am getting verry similar errors: http://192.168.1.???:8123/frontend_latest/app.a259a502.js:2:59245 TypeError: can't convert undefined to object shows up 32 times.

With me those errors show up predominantly when I open my vieuws that contain input datatime entities.

Home Assistant release with the issue: 0.92.2 Lovelace UI, default mode (configuration in frontend) Browser and Operating System: HA: Pi3B Hassbian Browser: both on firefox 67.0 (windows 10) and on safari (Android smart phone)

araczkowski commented 5 years ago

I noticed the same in 0.93 it is related with input_number/slider(paper-progress) on lovelace card

iron-a11y-keys-behavior.js:423 Uncaught TypeError: Cannot convert undefined or null to object at Function.keys () at HTMLElement._listenKeyEventListeners (iron-a11y-keys-behavior.js:423) at HTMLElement.attached (iron-a11y-keys-behavior.js:319) at HTMLElement.attached (class.js:384) at HTMLElement.connectedCallback (legacy-element-mixin.js:110) at NodePart._insert (parts.ts:222) at NodePart._commitNode (parts.ts:230) at NodePart._commitTemplateResult (parts.ts:264) at NodePart.commit (parts.ts:204) at render (render.ts:56)

probably an error in PolymerElements: https://github.com/PolymerElements/iron-a11y-keys-behavior/issues/93

sirs2k commented 5 years ago

Same error here. 2019-05-31 17:14:52 ERROR (MainThread) [frontend.js.latest.201905140] https://xxx.duckdns.org/frontend_latest/app.a259a502.js:2:59245 Uncaught TypeError: Cannot convert undefined or null to object

gippas commented 5 years ago

Sane error for me too: 2019-05-31 10:34:45 ERROR (MainThread) [frontend.js.latest.201905140] https://somename.duckdns.org:8123/frontend_latest/app.a259a502.js:2:59245 Uncaught TypeError: Cannot convert undefined or null to object

tomlut commented 5 years ago

I can cause this error to occur whenever I load a Lovelace card with a history graph but only if refresh_interval is defined.

Generates the error:

cards:
  - entities:
      - entity: input_select.lounge_ac_mode
    show_header_toggle: false
    type: entities
  - card:
      entities:
        - input_select.lounge_ac_mode
      refresh_interval: 300
      type: history-graph
    style:
      border: solid 2px var(--primary-color)
      transform: scale(0.975)
    type: 'custom:card-modder'
  - columns: 3
    entities:
      - entity: sensor.lounge_room_temperature
      - entity: sensor.lounge_room_humidity
      - entity: sensor.lounge_room_condensation_chance
    show_name: false
    type: glance
title: Aircon Control
type: 'custom:vertical-stack-in-card'

Does not generate the error:

cards:
  - entities:
      - entity: input_select.lounge_ac_mode
    show_header_toggle: false
    type: entities
  - card:
      entities:
        - input_select.lounge_ac_mode
      type: history-graph
    style:
      border: solid 2px var(--primary-color)
      transform: scale(0.975)
    type: 'custom:card-modder'
  - columns: 3
    entities:
      - entity: sensor.lounge_room_temperature
      - entity: sensor.lounge_room_humidity
      - entity: sensor.lounge_room_condensation_chance
    show_name: false
    type: glance
title: Aircon Control
type: 'custom:vertical-stack-in-card'
ctrl50 commented 5 years ago

Same problem here. opening any More info card produces the error. 94.0 storage mode

ERROR (MainThread) [frontend.js.latest.201906040] http://192.168.1.19:8123/frontend_latest/app.29ef27ad.js:2:59869 Uncaught TypeError: Cannot convert undefined or null to object

daveyrb commented 5 years ago

I get this whenever I look at History or Logbook: V0.94.0

GaryOkie commented 5 years ago

Can confirm - hassio 94.1 error occurs when viewing history or logbook using Chrome (v75.0.3770.80). Tried FireFox - no errors.

frontend.js.latest.201906040] https://xxxxx:8123/frontend_latest/app.29ef27ad.js:2:59869 Uncaught TypeError: Cannot convert undefined or null to object

WhistleMaster commented 5 years ago

Same here: multiple times in the log the following error:

https://<IP>/frontend_latest/app.29ef27ad.js:2:59869 TypeError: can't convert undefined to object

System Health

arch x86_64
dev false
docker true
hassio false
os_name Linux
python_version 3.7.3
timezone Europe/Zurich
version 0.94.3
virtualenv false

Lovelace

mode storage
resources 4
views 12
tuan280195 commented 5 years ago
arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.3
timezone Asia/Ho_Chi_Minh
version 0.94.4
virtualenv false

The same