scratchfoundation / scratch-vm

Virtual Machine used to represent, run, and maintain the state of programs for Scratch 3.0
http://scratchfoundation.github.io/scratch-vm/
BSD 3-Clause "New" or "Revised" License
1.2k stars 1.49k forks source link

VM Fails to load some projects (404) #3386

Open solanoepalacio opened 2 years ago

solanoepalacio commented 2 years ago

Description

I am developing a simple platform aimed at helping Occupational Therapists in the rehabilitation of neurological patients using games to train cognitive areas.

I started experimenting with including some scratch based games into the platform to try to speed up our game release pipeline and to allow the health professionals to easily and quickly adapt the games to their patient needs.

I started by only adding the scratch-VM to the platform and importing games from scratch's official website using the downloadProjectId method in the Virtual-Machine, but I've been facing an unexpected issue:

Some of the games load perfectly, but some return 404 when the VM tries to download the first project file (I can see the 404 error in the network pannel of the chrome developer tools).

I'm wondering... is there something I don't know about the game permissions? I will be using games I'll develop myself using scratch... is there any setup in the project that can guarantee that the project will always load?

Thanks a lot for the help!!

Expected Behavior

The project successfully loads and the VM works normally for any projectId

Actual Behavior

For some Project Ids the VM loads the project assets correctly, but for some the API returns 404.

Steps to Reproduce

This project id will load correctly: 144292248 (https://scratch.mit.edu/projects/144292248/) This one won't: 535869509 (https://scratch.mit.edu/projects/535869509/)

Both projects seems to be exactly the same (same version, same permissions, both public, etc...)

If needed, I can deploy a quick sample with the VM loading this to files so that you can see the error for yourself.

Please note that many project ids work, and many don't... it's not an isolated case.

Operating System and Browser

OS: Ubuntu Linux 20.01 Browser: Chrome

(I don't think it's related to browser or OS)

rschamp commented 2 years ago

Hi, this is strange behavior. Are you still seeing it? A working example would be helpful.

AmazingMech2418 commented 1 year ago

This seems like a possible server outage. Can't reproduce on the example not-working project you included...