question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot convert undefined or null to object

See original GitHub issue

There 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:closed
  • Created 4 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
kalkihcommented, Jun 14, 2019

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.

2reactions
nuddedcommented, Jun 9, 2019

@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 places ha-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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found