kiosk-mode icon indicating copy to clipboard operation
kiosk-mode copied to clipboard

TypeError: null is not an object

Open Mariusthvdb opened this issue 2 years ago • 2 comments

/local/lovelace/resources/kiosk-mode/kiosk-mode.js?v=1.2.1:13:51 TypeError: null is not an object (evaluating 'e.shadowRoot.querySelector("hui-root").shadowRoot')

appearing in the homeassistant.log, tbh, I don't know yet when/why this happens. Using this config:

# https://github.com/maykar/kiosk-mode#config-options
admin_settings:
  ignore_mobile_settings: true

non_admin_settings:
  hide_menubutton: true
  hide_overflow: true
  ignore_entity_settings: true

mobile_settings:
  hide_menubutton: true
  hide_overflow: true
  ignore_entity_settings: true

entity_settings:
#Hides both the header and sidebar.
  - entity:
      input_select.mode: Kiosk
    kiosk: true
# Hides only the header
  - entity:
      input_boolean.hide_header: 'on'
    hide_header: true
# Hides only the sidebar. Disables swipe to open.
  - entity:
      input_boolean.hide_sidebar: 'on'
    hide_sidebar: true
# Hides only the sidebar menu icon. Does not disable swipe to open.
  - entity:
      input_boolean.hide_menubutton: 'on'
    hide_menubutton: true
# Hides the top right menu
  - entity:
      input_boolean.hide_overflow: 'on'
    hide_overflow: true
#      hide_overflow: "{{states('input_boolean.hide_overflow')}}"

and HA 2021.dev20211022

edit, could it be related to the hamburger no longer being visible? Didnt notice that before, but all Kiosk mode options work, except the menubutton, which has disappeared. I do believe this is a HA dev issue, because I unloaded KM, and still no hamburger...

see https://discord.com/channels/330944238910963714/460846676358332417/901116993502072842

Mariusthvdb avatar Oct 22 '21 07:10 Mariusthvdb

since the error has been taken over by the one mentioned here: https://github.com/maykar/kiosk-mode/issues/84#issuecomment-1041446352 a cross post for that is useful maybe. with the 'solution'. closing here since I havent seen this particular error anymore.

Mariusthvdb avatar Feb 16 '22 12:02 Mariusthvdb

back in all its glory....

dont know why I didn't notice this before, but with logviewer open and a browser instance in another browser, we clearly can see the error happen on each dashboard change

it has been reversed as:

2022-03-08 11:44:10 ERROR (MainThread) [frontend.js.latest.202203011] http://domain.local:port/local/lovelace/resources/kiosk-mode/kiosk-mode.js?v=1.2.1:13:51 TypeError: null is not an object (evaluating 'e.shadowRoot.querySelector("hui-root").shadowRoot')

under the new frontend, and maybe happening even more now.

Mariusthvdb avatar Mar 08 '22 10:03 Mariusthvdb