kiosk-mode
kiosk-mode copied to clipboard
Cannot read properties of null (reading 'shadowRoot')
2022-01-05 12:51:05 ERROR (MainThread) [frontend.js.latest.202112290] https://mydomain/local/lovelace/resources/kiosk-mode/kiosk-mode.js?v=1.2.1:13:44 Uncaught TypeError: Cannot read properties of null (reading 'shadowRoot')
keeps showing in the log, not exactly sure when or why any user action causes this. please have a look?
All functionality seems to be working, so not sure if this causes any harm at all, but the error looks nasty in the log.... HA 2022.2.0.dev20220105, but this has been there for a while now, forgot to file an issue
config:
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:
binary_sensor.kiosk_mode: 'on'
# 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
Same issue .... causing huge startup delays
since card-mod solved a few issues by loading it via the extra_url method, I figured kiosk mode could benefit from that too, maybe preventing timing issues and reach conditions, leading to the mentioned error, so I restarted using:
frontend:
extra_module_url:
- /local/lovelace/resources/lovelace-card-mod/card-mod.js
- /local/lovelace/resources/kiosk-mode/kiosk-mode.js
in configuration.yaml.
havent seen a kiosk mode error since that. its has not been a whole day yet, but this seems rather promising, as the errors were rather persistent and frequent.
just sharing so people reading this could test and see if results are good.
the 'fix' from above in the frontend extra_module_error was a complete user error on my behalf.... dont do it, as Kiosk mode wont work correctly or at all... Hence the absence of errors ;-( back to loading via the resources.
Logger: frontend.js.latest.202204050 Source: components/system_log/init.py:190 First occurred: 6:53:27 AM (1 occurrences) Last logged: 6:53:27 AM
https://mydomain/hacsfiles/kiosk-mode/kiosk-mode.js?hacstag=303101606172:13:44 Uncaught TypeError: Cannot read properties of null (reading 'shadowRoot')
Home Assistant Container version 2022.4.1 Kiosk Mode version 1.7.2
HACS Integrations: WebRTC Camera Garbage Collection Breaking Changes UI Template sensor configuration Multiscrape Alexa Media Player Weatherbit Weather Forecast for Home Assistant fontawesome browser_mod Wyze NFL Holidays
HACS Frontend: Battery Entity Row Lovelace Text Input Row Fullscreen Card FireTV Remote Card Battery State Card / Entity Row Kiosk Mode auto-entities layout-card Blue Night Theme Bar Card RGB Light Card card-mod state-switch button-card Light Entity Row Roku Card mini-graph-card Entity Attributes Card NFL Card
Home Assistant Integrations: Alexa Media Player Android TV Brother Printer Browser Mod DLNA Digital Media Renderer ESPHome FontAwesome Garbage Collection Generic Camera Glances HACS Holidays Local IP Address MJPEG IP Camera Mobile App motionEye MQTT NETGEAR OpenWeatherMap Sun UI Template sensor configuration UPnP/IGD Version Weatherbit WebRTC Camera WLED Wyze Home Assistant Integration
kiosk_mode:
hide_header: true
views:
- title: Home
type: panel
badges: []
cards:
- type: grid
columns: 2
square: false
cards:
- type: grid
cards:
- type: conditional
conditions:
- entity: sun.sun
state: above_horizon
card:
type: custom:webrtc-camera
url: xxx
- type: conditional
conditions:
- entity: sun.sun
state: below_horizon
card:
type: custom:webrtc-camera
url: xxx
columns: 1
square: false
- type: custom:webrtc-camera
url: xxx
- type: custom:webrtc-camera
url: xxx
- show_state: false
show_name: false
camera_view: auto
type: picture-entity
entity: camera.clocktower_cam
camera_image: camera.clocktower_cam
- show_name: true
name: Show Page Header
icon: mdi:page-layout-header
show_icon: true
type: button
tap_action:
action: url
url_path: >-
https://mydomain/lovelace-cams/0?disable_km
yeah, it still happens, and we have to fear Maykar has abandoned his repos. it's been such a long time since he responds to anything here, (or elsewhere in HA for that matter)