Scattermapbox throws JS error when zoomed in during selection mode

Hello everyone,

I realized scattermapbox throws the following JS error when zoomed during selection mode.

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'call')
    at Et.fire (plotly-2.14.0.min.js:20:332852)
    at r.jumpTo (plotly-2.14.0.min.js:20:1001675)
    at r.setZoom (plotly-2.14.0.min.js:20:998457)
    at b.updateLayout (plotly-2.14.0.min.js:37:1050589)
    at plotly-2.14.0.min.js:37:1048844

You can reproduce the error using scattermapbox documentation page. When you click “Zoom In” button after clicking “Box Select”, you can see the error in devtool console. It also happens with “Zoom Out” or “Lasso Select” as well.

mapbox_error_document.


This issue is critical for my dash app, because once the error is thrown, we can not update the figure anymore with callback output. We need to refresh the entire page to make figure intractable.

This is the minified version of my dash app (gist). You can not reset the map anymore after the error.

mapbox_error_dash

I would appreciate any comments. Thank you in advance.

hi @m2ku
Thank you for reporting this. We are looking into it right now. I’ll post updates here.

[Update] I just opened a github issue with this bug. Our engineers will take a deeper look at this and see what the best solution might be.

Thank you, @m2ku.

Thank you for your prompt review, will watch the GitHub issue. Thank you @adamschroeder!