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

Error switching to different workflow from classification in progress #2809

Closed
mcbouslog opened this issue Feb 9, 2022 · 8 comments · Fixed by #2813
Closed

Error switching to different workflow from classification in progress #2809

mcbouslog opened this issue Feb 9, 2022 · 8 comments · Fixed by #2813
Assignees
Labels
bug Something isn't working

Comments

@mcbouslog
Copy link
Contributor

Package

  • app-project / lib-classifier

Describe the bug

Application error.
Appears to be per TasksConnector line 27.
Changing to const latest = subject?.stepHistory?.latest (adding optional chaining to stepHistory) appears to fix the issue.
Not sure how/why subject is defined but stepHistory isn't, thereby creating the issue.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://www.zooniverse.org/projects/humphrydavy/davy-notebooks-project?demo=true
  2. Click on a workflow
  3. Draw a line and add a test transcription (make sure demo mode enabled)
  4. Click the project name to return to the project home page
  5. Click on a different workflow

Expected behavior

Loads different workflow.

Additional context

I'm only seeing the bug on Davy Notebooks, not seeing the bug on HMS NHS or Corresponding with Quakers

@mcbouslog mcbouslog added the bug Something isn't working label Feb 9, 2022
@mcbouslog mcbouslog self-assigned this Feb 9, 2022
@mcbouslog
Copy link
Contributor Author

Possible fix in progress - https://github.com/zooniverse/front-end-monorepo/compare/fix-2809?expand=1, will open PR asap

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Feb 10, 2022

@mcbouslog Snapshots can't contain models. They have to be pure snapshots.

@eatyourgreens
Copy link
Contributor

Hard to debug on the live site, but I'm seeing an error in a snapshot processor somewhere.

https://www.zooniverse.org/projects/humphrydavy/davy-notebooks-project/classify/workflow/20178?demo=true
'newSnapshot' is read-only error in the console after loading the classifier store.

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Feb 10, 2022

It's hard to tell in the minified source, but this might be the line that's crashing, when the stored snapshot contains drawing marks (or is this specific to transcription tasks?)

newSnapshot = Object.assign({}, newSnapshot, { annotations })

EDIT: editing to add that drawing and transcription task annotations are stored as something like task.tool.marks, which is part of the store.workflowSteps model and is persisted in session storage. Other task annotations are stored in store.classifications (I think), which is not persisted.

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Feb 10, 2022

I can reproduce the bug live on Davy Notebooks, but not with the transcription task on my staging/testing project. 🤔
https://frontend.preview.zooniverse.org/projects/eatyourgreens/-project-testing-ground/classify/workflow/3506?env=staging&demo=true

@eatyourgreens
Copy link
Contributor

@mcbouslog I can recommend using #2793 for debugging. It adds better console log messages when the store hydrates from a snapshot.

@eatyourgreens
Copy link
Contributor

Fixed in #2813, I think. I'm not seeing this bug when I run Davy Notebooks locally on that branch.

Weird that this bug is specific to Davy Notebooks. I wonder if it is triggered by using many workflows that are all clones of the same step and task structure? Drawing task annotations are stored in store.workflowSteps, in the transcription task model.

@eatyourgreens
Copy link
Contributor

Following on from that comment, should we document the classifier store structure to help in debugging?

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

Successfully merging a pull request may close this issue.

2 participants