Skip to content

p5 Editor not allowing duplication or download of one specific sketch #2314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
scottnelson935 opened this issue Jul 18, 2023 · 3 comments · Fixed by #2315
Closed

p5 Editor not allowing duplication or download of one specific sketch #2314

scottnelson935 opened this issue Jul 18, 2023 · 3 comments · Fixed by #2315
Labels
Bug Error or unexpected behaviors

Comments

@scottnelson935
Copy link

p5.js version

1.6.0

What is your operating system?

Mac OS

Web browser and version

Chrome 114.0.5735.198

Actual Behavior

p5 editor account Evs is able to save/duplicate /download all sketches except one, where duplication/download do not work, but is able to save. The sketch is:

https://editor.p5js.org/Evs/sketches/3IzmbC3MI

When we attempt to download the project, it returns the following error:

{"message":"Request failed with status code 404","name":"Error","stack":"Error: Request failed with status code 404\n at createError (/usr/src/app/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/src/app/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:538:35)\n at IncomingMessage.emit (node:domain:475:12)\n at endReadableNT (node:internal/streams/readable:1345:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)","config":{"url":"https://assets.editor.p5js.org/64ac52b7d8a9b3001add1e92/852ddc8a-94f9-4fc1-95f0-3faa09af34e3.png","method":"get","headers":{"Accept":"application/json, text/plain, /","User-Agent":"axios/0.21.4"},"transformRequest":[null],"transformResponse":[null],"timeout":0,"responseType":"arraybuffer","xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false}}}

Expected Behavior

the sketch should have no problem duplicating or downloading the sketch when calling those functions.

Steps to reproduce

Steps:

Snippet:

// Paste your code here :)

https://editor.p5js.org/Evs/sketches/3IzmbC3MI
@scottnelson935 scottnelson935 added the Bug Error or unexpected behaviors label Jul 18, 2023
@welcome
Copy link

welcome bot commented Jul 18, 2023

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@lindapaiste
Copy link
Collaborator

This happens when a sketch includes an uploaded asset which has been deleted. The part of the code which tries to fetch that asset fails with a 404 error. In this case the problem file is heart.png which is in the assets folder, though it doesn't seem to be referenced in the code for the sketch.

It definitely needs to be handled better. Probably just skip over any files which are missing?

@scottnelson935
Copy link
Author

scottnelson935 commented Jul 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behaviors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants