scratchfoundation / scratchfoundation/scratch-editor

Autosave can cause data loss when waking up the computer

Open
#675 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
283
Forks
276
Avg merge
7d 8h
Merged PRs (30d)
6

Description

https://scratch.mit.edu/discuss/topic/898447/

Expected Behavior

When waking up the computer from a long sleep mode, the Scratch editor doesn't save automatically.

Actual Behavior

It tries to save immediately, and sometimes successfully overwrites the project with a (probably) old version. I tried to reproduce the bug many times, and it usually displayed the "project could not save" error, but a few times it actually saved the project

Steps to Reproduce

Steps to reproduce the behavior:

  1. Sign in and go to one of your Scratch projects
  2. Edit it slightly (eg. by moving a block)
  3. Put the computer in sleep mode
  4. Leave it for I think at least 10 minutes (when I left it for only 6 minutes, the Save Now button was still there)
  5. Open the computer
  6. See that Scratch tries to save

System Details

Windows 10, Chrome 151

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported sequence in Chrome on Windows: edit a project, sleep the computer for at least 10 minutes, then wake it. Trace the editor's autosave behavior when the page resumes, and verify that waking from sleep does not save an older project version or overwrite newer work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.