Extension Worker Fails
AmazingMech2418 opened this issue · comments
Expected Behavior
Projects containing experimental extensions should load, even if they are unable to be shared.
Actual Behavior
Experimental extensions with most extension codes seem to trigger a service worker for extensions, which returns a 403 error. Extension codes that match with existing opcodes, such as "motion" or "data", with built-in extensions, with "math" (appears to be from Scratch 2.0 migrations), or with "coreExample" work, but any other extension code fails to load. The extensions can be used, but once the project is saved, it becomes impossible to open it.
Steps to Reproduce
Go to https://scratch.mit.edu/projects/719678513/. The extension used can be found here: https://github.com/AmazingMech2418/PrimeExt If you open the JS console, you will see a 403 error on the service worker.
It's cool that you're digging into our extension system! However, we currently don't support loading experimental extensions in the official versions of Scratch.
If you'd like to keep working on experimental extensions, I recommend building your own version of Scratch. You can check out one of our official extensions, like the pen extension for example, for an example of how to make an "official" extension in your own fork of Scratch. You can use npm ln scratch-vm
inside of your copy of scratch-gui
to make development easier (check out NPM's documentation for more details on npm ln
).