Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot read properties of undefined (reading 'map') #2064

Closed
Llannelongue opened this issue May 23, 2022 · 2 comments · Fixed by #2065
Closed

[BUG] Cannot read properties of undefined (reading 'map') #2064

Llannelongue opened this issue May 23, 2022 · 2 comments · Fixed by #2065
Assignees

Comments

@Llannelongue
Copy link

Llannelongue commented May 23, 2022

Hi, I've just updated to the last version of dash, and now get a cryptic error Cannot read properties of undefined (reading 'map') (on chrome) or y is undefined (on firefox) (full traceback below). The update is the only change. Any suggestions? :)

It's probably related to the go.Choropleth part of the code as it doesn't display properly. I haven't been able to create a minimal example but full code here.

Thanks!

I updated from:

dash==1.4.1
dash-core-components==1.3.1
dash-html-components==1.0.1
dash-renderer==1.1.2
dash-table==4.4.1

to:

dash==2.4.1
dash-bootstrap-components==1.1.0
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-renderer==1.1.2
dash-table==5.0.0

EDIT: I've narrowed it down to 2 specific releases of dash:

  • 1.8.0 is when the choropleth map stopped displaying (showing an empty div instead) but with no error message
  • 2.4.0 is when the error message mentioned here appeared

Full traceback on Chrome:

TypeError: Cannot read properties of undefined (reading 'map')

    at http://127.0.0.1:8050/_dash-component-suites/dash/dcc/async-dropdown.js:2:4888

    at commitHookEffectListMount (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:19866:28)

    at commitPassiveHookEffects (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:19904:13)

    at HTMLUnknownElement.callCallback (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:182:16)

    at Object.invokeGuardedCallbackDev (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:231:18)

    at invokeGuardedCallback (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:286:33)

    at flushPassiveEffectsImpl (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:22988:11)

    at unstable_runWithPriority (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:2685:14)

    at runWithPriority$1 (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:11174:12)

    at flushPassiveEffects (http://127.0.0.1:8050/_dash-component-suites/dash/deps/[email protected]_4_1m1653310444.14.0.js:22955:14)
@zirondi
Copy link

zirondi commented May 24, 2022

I had a similar issue where I was trying to change a value in a callback that was not properly initialized, see link.

I could not identify it in your code, but I think somewhere you're updating the Y value of some component and it isn't loaded properly yet.

This error message is rather cryptic.

@T4rk1n T4rk1n self-assigned this May 24, 2022
@T4rk1n
Copy link
Contributor

T4rk1n commented May 24, 2022

The dropdown was refactored in last release and is now missing a nil check when a value is provided but there is no options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants