Debug something not updating on particular callback, inscrutable JS "promise" error

My graph displays the appropriate selected values when the app loads, I select a different value from the dropdown and it updates fine. But when I try returning to the original state, nothing updates and the following appears in the browser console

Uncaught (in promise) TypeError: Cannot read property 'length' of null(…)

Any hints for debugging this?

Don’t return None ever. I had a callback generating options for a Dropdown that would occasionally be hidden so I lazily put:

    return None

Fatal mistake.

I repeat: Don’t do this ever

1 Like

Thanks for looping back here @rad! The debugginer experience is really rough for things like this.

The good news is that we might have a few customers lined up that would support enhancing the Dash debugging experience (future readers - if your company or organization would like to help sponsor the effort here, please reach out: Part of this effort should include looking out for errors like this and maybe doing more validation when returning callbacks. Thanks again for posting!

1 Like

Oh that’s very promising. I’m going to try to write a blog post of tips for Dash development over the holidays.

I do also want to highlight to future readers the particularly puzzling piece of this debugging was that the component that was receiving None (a dropdown) wasn’t even displayed, but this was affecting subsequent components (which were partially dependent on Input/State of the dropdown).