common-voice / sentence-collector

Tool to collect and review sentences for Common Voice
https://commonvoice.mozilla.org/sentence-collector/
Mozilla Public License 2.0
81 stars 63 forks source link

Review Sentences can get stuck on loading #609

Closed Sobsz closed 2 years ago

Sobsz commented 2 years ago

My Sentence Collector session entered a "stuck" state. In this state, the "Review" section perpetually displays a spinner with the text "Loading sentences...", even when no language is selected. All other sections work fine. Debugging shows that no request is ever made to review?locale=[language] is ever made.

The "stuck" state can be removed by editing the local storage key persist:sentences to remove sentencesLoading:"true", but this cannot be done without access to a trusted computer. None of the following mobile-only methods solved the issue:

Switching browsers or using Incognito mode do allow the user to sidestep the issue. Removing browsing data would solve, too, but I could not find a way to do so for one site only on Firefox Android.

Running Firefox 97.2.0 on Android 11. My Internet connection was being spotty today, which I believe might have caused the problem.

MichaelKohler commented 2 years ago

Thanks for this thorough bug report and all the debugging done. This makes it fairly straightforward to fix.

We are persisting the sentences state with a few exceptions here: https://github.com/common-voice/sentence-collector/blob/main/web/src/reducers/index.ts#L21

To make sure we are not persisting the loading states, we should add both isUploadingSentences and sentencesLoading to the exceptions linked to above. Then saving the state while a request is reloading wouldn't result in this scenario.

Great catch!

MichaelKohler commented 2 years ago

:tada: This issue has been resolved in version 2.17.5 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: