The “fetch-worker” file failed to load correctly.
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, webpack
- Domain
- build-system, frontend, web-dev
Research direction
Reproduce the issue at http://localhost:8601/scratchnew/ and inspect the Network request for chunks/fetch-worker.xxxx.js. Start with packages/scratch-gui/webpack.config.js, then compare the loading behavior with packages/scratch-storage and the referenced target-pane.jsx and serialization/sb3.js paths. Done means fetch-worker loads correctly under the configured subpath without Nginx forwarding, and roles images load onto the stage.
Written by the indexing model from the issue text.
Description
Expected Behavior
Expect to modify the publicPath configuration in webpack to not be set to “auto”. For example, setting it to “/scratchnew” should correctly load the “fetch-worker” file, enabling the addition of roles img to load properly onto the stage.
Steps to Reproduce
Expect ur : http://localhost:8601/scratchnew/
- file: packages/scratch-gui/webpack.config.js
output: {
publicPath: '/scratchnew/',
path: path.resolve(__dirname, 'dist')
}
-
view NetWork find
http://localhost:8601/chunks/fetch-worker.xxxx.jsis not right, buthttp://localhost:8601/scratchnew/gui.jsis ok -
when Select Sprite but roles image is not load onto stage。
packages/scratch-gui/src/containers/target-pane.jsx==> this.props.vm.setEditingTarget(id))is ok。
packages/scratch-vm/src/virtual-machine.js ==> installTargetsis ok.
packages/scratch-vm/src/serialization/sb3.jsis ok,
butpackages/scratch-storageis not work. -
When I use Nginx to forward requests to http://localhost:8601/chunks/fetch-worker.xxxx.js, it works fine. The roles img to can loaded onto the stage.
-
Is it possible that the fetch-worker file cannot be modified by the webpack tool to change its access path?
No matter how I adjust the packaging location of ‘scratch-storage/dist/web’. Even after adjustingassetModuleFilename: 'static/assets/[name].[hash][ext][query],assetHost: window.location.origin + "/scratchnew, and other methods,fetch-worker.jswithinscratch-storagestill fails to load and function correctly. Doesscratch-storagehave specific requirements for loadingfetch-worker? -
I was hoping to modify the
publicPathto handle subdomains, avoiding direct access from the root/. Do you have any other good solutions? If so, please let me know. Thank you very much.
Thank you very much.
- Dominant language
- JavaScript
- Stars
- 310
- Forks
- 299
- Avg merge
- 19h 41m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scratchfoundation/scratch-editor
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
scratchfoundation/scratch-editor#754 ·
Maintainers usually reply within 1 day
-
spork
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
scratchfoundation/scratch-editor#646 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
scratchfoundation/scratch-editor#406 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
scratchfoundation/scratch-editor#750 · 1 comment ·
Maintainers usually reply within 1 day
-
Monitor context menus shrink the EditorPossibly taken @mxmou claimed this 3 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 50/100
scratchfoundation/scratch-editor#744 · 6 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in scratchfoundation/scratch-editor
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 96/100
google/site-kit-wp#14102 ·
Maintainers usually reply within 2 days
-
area:growth priority:P1 type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
tecnologiasantos/bogoboom#66 ·
Maintainers usually reply within 1 day
-
desktop docs good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
npm/write-file-atomic#245 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ktwu01/benchmark-radar#1181 ·
Maintainers usually reply within 1 day