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

Map transmissionIndices bug #547

Closed
jameshadfield opened this issue May 2, 2018 · 5 comments
Closed

Map transmissionIndices bug #547

jameshadfield opened this issue May 2, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@jameshadfield
Copy link
Member

Sometimes this error occurs:

mapHelpersLatLong.js?a8f2:402 Uncaught TypeError: Cannot read
   property 'forEach' of undefined
       at eval (mapHelpersLatLong.js?a8f2:402)
       at Array.forEach (<anonymous>)
       at eval (mapHelpersLatLong.js?a8f2:389)
       at Array.forEach (<anonymous>)
       at updateTransmissionDataColAndVis (mapHelpersLatLong.js?a8f2:387)
       at updateDemeAndTransmissionDataColAndVis
   (mapHelpersLatLong.js?a8f2:428)
       at Map.maybeUpdateDemesAndTransmissions (map.js?e5a9:312)
       at Map.componentWillReceiveProps (map.js?e5a9:105)
       at callComponentWillReceiveProps
   (react-dom.development.js?cada:6389)
       at updateClassInstance (react-dom.development.js?cada:6575)
   ----

Caused by transmissionIndices[id] being undefined.

A try-catch fix was implemented in 1.18.1 (ee4bca6) however the underlying issue persists.

@jameshadfield jameshadfield added bug Something isn't working high priority labels May 2, 2018
@jameshadfield
Copy link
Member Author

@trvrb are you familiar with colin's code here?

@trvrb
Copy link
Member

trvrb commented May 2, 2018

Can you tell if this was introduced recently? Or is persistent? And is there a reliable way to reproduce?

@jameshadfield
Copy link
Member Author

JSONs in the slack channel. May be a JSON thing, i've never seen it before.

rneher added a commit that referenced this issue Jul 30, 2018
…s, which remove transmissions from the index, which later results in 'type undefined' errors.
@rneher
Copy link
Member

rneher commented Jul 30, 2018

fundamentally, the issue here is to decide what to do/how to fail when the meta.json doesn't contain coordinates. in the case above, this happened because an ancestral state was inferred that wasn't even in the country list (I think we pinned the ancestral state to vietnam, but vietnam wasn't sampled and hence excluded from the geo fields in the meta json).

jameshadfield added a commit that referenced this issue Aug 17, 2018
@jameshadfield
Copy link
Member Author

Closed in #608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants