nextstrain / auspice.us

http://auspice.us
13 stars 8 forks source link

Measurements sidecar files crash the app #24

Closed jameshadfield closed 2 years ago

jameshadfield commented 2 years ago

Current Behavior

Dropping on a measurements sidecar file crashes auspice.us. Console logs:

Uncaught TypeError: collection.fields.get(...) is undefined
    groupingOptions measurementsOptions.js:47
    MeasurementsOptions
...
The above error occurred in the <MeasurementsOptions> component

Expected behavior

Measurements sidecars should load (and measurements panel should display).

How to reproduce

Steps to reproduce the current behavior:

  1. Example dataset + sidecars: https://github.com/joverlee521/nextstrain-testing/tree/main/auspice

Note that https://nextstrain.org/community/joverlee521/nextstrain-testing/flu/seasonal/h1n1pdm/ha/09-17 works correctly.

Possible solution

(optional)

Your environment: if browsing Nextstrain online

auspice.us version 0.11 using auspice 2.34.1 (note that there are no changes to the measurements panel between auspice 2.34.0 and 2.34.1).

This :bug: was noticed during development of https://github.com/nextstrain/auspice.us/pull/23 but I didn't want to let this hold up that PR as there are very few measurements sidecars at the moment.

joverlee521 commented 2 years ago

@jameshadfield I don't see any errors when dragging on the measurements sidecar JSON. Looking at the testing files you had posted in Slack, you may be testing with an outdated version of the measurements sidecar JSON.

jameshadfield commented 2 years ago

you may be testing with an outdated version of the measurements sidecar JSON.

🤦