TypeError: Cannot convert undefined or null to object
See original GitHub issueThere is a problem when mini-media-player has as source virtual entity like “media_player.spotify” from https://github.com/hassio-addons/addon-spotify-connect, other media_player sources work fine
error from the dev console on chrome:
app.a259a502.js:2 Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at HTMLElement._listenKeyEventListeners (app.a259a502.js:2)
at HTMLElement.attached (app.a259a502.js:2)
at HTMLElement.attached (app.a259a502.js:651)
at HTMLElement.connectedCallback (app.a259a502.js:2)
at Va._insert (mini-media-player-bundle.js?v=1.1.3:1)
at Va._commitNode (mini-media-player-bundle.js?v=1.1.3:1)
at Va._commitTemplateResult (mini-media-player-bundle.js?v=1.1.3:1)
at Va.commit (mini-media-player-bundle.js?v=1.1.3:1)
at db (mini-media-player-bundle.js?v=1.1.3:1)
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
Cannot convert undefined or null to object - Stack Overflow
Generic answer. This error is caused when you call a function that expects an Object as its argument, but pass undefined or null...
Read more >Cannot convert undefined or null to Object in JavaScript
The "Cannot convert undefined or null to Object" error occurs when we pass a null or an undefined value to a function that...
Read more >Object.keys(null) possible - cannot convert undefined or null to ...
Conditions above this line allow msg===null to get into Object.keys(msg);. livedata_connection.js:1626 Uncaught TypeError: Cannot convert ...
Read more >Cannot convert undefined or null to object - JavaScript
JavaScript : How to resolve TypeError : Cannot convert undefined or null to object [ Gift : Animated Search Engine ...
Read more >Cannot convert undefined or null to object at Function.entries
This page uses a programList object provided by Wix that lists all the program. I noticed that whenever I get the concerned error...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @nudded, switching to ha-slider seems to indeed prevent these errors. the ha-slider component was introduced sometime in december last year so changing to it would make the card incompatible with HA versions prior to ~ 0.85.0, but we could add a check and define it if it doesn’t exist.
@kalkih I did some investigation and it’s related to the
ha-paper-slider
. It seems like the registered callback is not called, which causes_keyBindings
to be empty. In other placesha-slider
is used, which does not have this problem.There is also this https://github.com/home-assistant/home-assistant-polymer/blob/dev/hassio/src/hassio-main.ts#L33 interesting comment, which seems like an ugly work-around for the same problem.