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

Client-side application error on refresh with drawing mark #3251

Closed mcbouslog closed 2 years ago

mcbouslog commented 2 years ago

Package

Describe the bug

Create a transcription line with subtask text, refresh the page (will prompt "Reload?", click "Reload"), then client-side application error. To clear error must clear browser session storage.

Bug - https://www.zooniverse.org/projects/humphrydavy/davy-notebooks-project?demo=true Similar project without bug - https://www.zooniverse.org/projects/rachaelsking/corresponding-with-quakers?demo=true

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://www.zooniverse.org/projects/humphrydavy/davy-notebooks-project/classify/workflow/21240?demo=true
  2. Create line, in subtask add text, click "Save and Close"
  3. Refresh page (will be prompted "Reload?", click "Reload")
  4. See error

Expected behavior

Do same steps as noted above on https://www.zooniverse.org/projects/rachaelsking/corresponding-with-quakers/classify/workflow/20713?demo=true - no error

mcbouslog commented 2 years ago

Please change this issue title once we have a better idea of it's cause.

mcbouslog commented 2 years ago

Noting Davy Notebooks has prioritized: true vs Corresponding with Quakers prioritized: false

mcbouslog commented 2 years ago

I think I've isolated the issue to https://github.com/zooniverse/front-end-monorepo/blob/master/packages/lib-classifier/src/components/Classifier/ClassifierContainer.js#L77 -

const classifierStore = useHydratedStore(storeEnvironment, cachePanoptesData, `fem-classifier-${project.id}`)
mcbouslog commented 2 years ago

Introduced in #2863 (checked commit before confirmed no error, commit of PR confirmed error).

eatyourgreens commented 2 years ago

This is fixed by #3293, which adds error handling to the useHydratedStore hook.