zooniverse / front-end-monorepo

A rebuild of the front-end for zooniverse.org
https://www.zooniverse.org
Apache License 2.0
104 stars 29 forks source link

Missing tasks in Offal Watching survey workflow #6084

Closed eatyourgreens closed 6 months ago

eatyourgreens commented 6 months ago

Package

Choose from the list:

Describe the bug

https://www.zooniverse.org/projects/embeller/offal-wildlife-watching/classify/workflow/25727

Choose Both or All Unknown for the second question, then press Next. The task area will be empty, but you can still submit a classification by pressing Done.

Screenshots

https://github.com/zooniverse/front-end-monorepo/assets/59547/b0851052-00a9-402f-9064-c2c857af2030

Expected behavior

There's a final survey task that should show up. Apparently it loads if you view this workflow in PFE.

Additional context

https://www.zooniverse.org/talk/2354/3326062?comment=5485133&page=5

eatyourgreens commented 6 months ago

The console error says that T0 isn't a supported task type, so I think this workflow is using an invalid task snapshot. Error messaging could be better here, when a task snapshot doesn't match any of the task models. Maybe show the error in the task area, rather than the console?

T0 survey is not a supported task type.
No matching type for union (boolean | undefined?)
Error messages in the Firefox console. T0 survey is not a supported task type. No matching type for union (boolean | undefined?)

From the error message, it could be that a boolean field has been saved as a string, rather than a boolean eg. 'true' instead of true or '' instead of false.

eatyourgreens commented 6 months ago

workflow.tasks.T0.alwaysShowThumbnails is an empty string, for that workflow, but that field doesn't allow strings. It should be set to false, true or undefined.

https://github.com/zooniverse/front-end-monorepo/blob/ddb4f1a2829b57619b5908814c8ff7df3ce910f6/packages/lib-classifier/src/plugins/tasks/survey/models/SurveyTask.js#L32

trouille commented 6 months ago

Is https://www.zooniverse.org/projects/bcosentino/squirrelmapper/classify/workflow/20808 also impacted? Working through the spreadsheet of FEM migrated projects and seeing what others have this type of structure. In classifying on the squirrel project I am not seeing the same issue arise. Why not?

https://www.zooniverse.org/projects/aeuk/elephant-id? (And the related https://www.zooniverse.org/projects/zookeeper/elephant-id-ey)?

https://www.zooniverse.org/projects/md68135/notes-from-nature-labs/classify/workflow/26287?

https://www.zooniverse.org/projects/johandmi/arctic-archives-unraveling-greenlands-weather-history?

goplayoutside3 commented 6 months ago

To address @trouille's question - only the one Offal Wildlife Watching workflow was affected by a ye old project builder bug: https://github.com/zooniverse/Panoptes-Front-End/pull/6669. task.alwaysShowThumbnails might exist as a property of very old workflows with survey tasks, so a backwards compatible bandaid was added to FEM's classifier in #6085. The other projects listed above do not have survey tasks.

eatyourgreens commented 6 months ago

I've updated https://github.com/zooniverse/Panoptes-Front-End/issues/4801 to say that it was fixed by https://github.com/zooniverse/Panoptes-Front-End/pull/5798 in 2020, so this broken workflow must be at least 4 years old.