Skip to content

All files in download zips are empty (have 0 bytes) #2038

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
travelalpaca opened this issue Jul 7, 2022 · 45 comments · Fixed by #2048
Closed

All files in download zips are empty (have 0 bytes) #2038

travelalpaca opened this issue Jul 7, 2022 · 45 comments · Fixed by #2048
Assignees
Labels
Bug Error or unexpected behaviors Priority:High Should be addressed soon but not critical

Comments

@travelalpaca
Copy link

Details about the bug:

  • Web browser and version: various flavors of chromium and firefox (both mobile and desktop).
  • Steps to reproduce this:
  1. Download the project files from the browser.
  2. This generates a zip archive
  3. The zip archive contains the correct files containing the correct source code inside, however all files within the zip are marked as a size of 0 bytes
  4. Some of my archive managers were able to still read the files correctly, despite the apparent 0 B file size. While some of my other archive managers view the files as empty.

I downloaded a project successfully yesterday, then again about 2 hours ago. But right now, all project downloads show files as having 0 Byte size, it doesn't matter if they're my own projects or other projects that have been shared.

@welcome
Copy link

welcome bot commented Jul 7, 2022

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.

@CaptainCredible
Copy link

Can confirm this issue. Tested with chrome on macOS, and chrome, opera , Firefox and edge on win10 all produce zip files containing empty files

@jht1900
Copy link

jht1900 commented Jul 27, 2022

Confirmed same issue on MacOS in Safari and Chrome - downloaded zip file contains all zero length files

@jht1493-gmail
Copy link

What does it take to upgrade this to a bug? I'm pretty sure it was not in prior versions of editor. Pretty sure I was downloading ok all of 2021.

@travelalpaca
Copy link
Author

travelalpaca commented Jul 28, 2022

What does it take to upgrade this to a bug? I'm pretty sure it was not in prior versions of editor. Pretty sure I was downloading ok all of 2021.

I downloaded a project just fine that same day on July 6, 2022, then two hours later when I downloaded it again the zip archives were messed up, and now three weeks later, export archives are still showing 0 bytes size for all files. So whatever went wrong happened specifically on July 6 -- hopefully that's helpful information to anyone with the ability to make a correction.

Looks like there was quite a lot of activity on July 6: https://github.com/processing/p5.js-web-editor/actions

@dwight9339
Copy link
Contributor

Dove into the code a little bit this afternoon to see if I might be able to help. I think it might be an issue with the archiver package. I'll keep looking into it and report back.

@dwight9339
Copy link
Contributor

So I've got a fix for this working locally on my machine that I'm ready to push but, quick question, is it really necessary to include external libs in the zip? The currently deployed version goes and grabs any external scripts referenced in index.html but most of the time these are CDN hosted scripts anyway so, at least to me, it seems pretty superfluous to include them in the download.

@jht1900
Copy link

jht1900 commented Aug 3, 2022

Personally I would prefer the external scripts to get pulled from the CDN, but would not want to risk a change in behavior now. Fixing the zero length bug should be the first step and CDN extern script option in a separate pull request.

@haschdl
Copy link

haschdl commented Aug 14, 2022

@dwight9339 thanks for reporting the bug and providing a fix. @jht1900 would you be able to assist in getting #2048 approved and merged? This is a quite important feature of the editor!

@jht1493-gmail
Copy link

@dwight9339 thanks for reporting the bug and providing a fix. @jht1900 would you be able to assist in getting #2048 approved and merged? This is a quite important feature of the editor!

I agree this is important feature! I'll ask around for tips on getting approval of fix.

@kjhollen
Copy link
Member

hi folks, thank you for your attention on this issue. the editor is currently in maintenance mode as we transition to new leadership (see #2010). hope to have an update next month!

@kjhollen kjhollen added Priority:High Should be addressed soon but not critical Bug Error or unexpected behaviors labels Aug 15, 2022
@pierrep
Copy link

pierrep commented Aug 22, 2022

I understand the editor is in maintenance mode, but this is a critical bug, which should be fixed in a 'maintenance' state. It's not new functionality, it's core existing infrastructure.

@haschdl
Copy link

haschdl commented Aug 22, 2022

I concur with @pierrep , this is a critical bug.

@kjhollen I see that Leadership Update #2010 is from April - is p5.js updates effectively on hold since then?
PS: @kjhollen tiny detail, this issue is marked with "label:bug" whereas most others are "label:type:bug" I wonder if this could affect triage and filters? I myself got lost once until I noticed that.

@travelalpaca
Copy link
Author

Considering this feature was broken while the editor was in maintenance mode, it would be a strange policy to say that the same feature must not be unbroken while in maintenance mode.

@kjhollen
Copy link
Member

There have been a few scheduled maintenance items over the last few months that were planned in advance, based on developer availability. While I agree this feature is important, at this time I would only consider a critical issue something like the site being offline entirely, which would need immediate attention.

I have flagged this issue with a high priority label so that it can be fixed when the site is out of maintenance mode, which is happening soon! Last week we announced the new p5.js editor lead and they will be starting September 15. Thank you for reporting this issue and for your patience while we sort out this transition.

@volt64bolt
Copy link

are there any workarounds for this issue other than copy pasting all the code and files manually? or do we just need to wait for it to be fixed?

@CaptainCredible
Copy link

CaptainCredible commented Aug 30, 2022 via email

@jht1493-gmail
Copy link

jht1493-gmail commented Aug 31, 2022

Proposed workaround does NOT work for me using Safari.
Tested on Safari Version 15.6.1 (17613.3.9.1.16), macos 12.5.1

@tjvezina
Copy link

tjvezina commented Sep 11, 2022

I've been having this problem for months and was finally able to download a project successfully with Safari, as suggested by @CaptainCredible:

  • macOS: 12.5.1
  • Safari: 15.6.1

Oddly this is the same setup as @jht1493 but the resulting download worked for me - I don't know if this is a Safari thing, but the download wasn't even a .zip, it was just a folder with all the expected files and assets in place and not corrupted.

Note: When unzipping a download from another browser with Mac's built in "Archive Utility", the unzip appeared to be successful, but all the files were still empty/corrupt, so be sure to look carefully.


I was also able to use PeaZip on Windows - as stated, it gives an error but clicking "Keep Files" successfully unzipped them anyway.

@jht1900
Copy link

jht1900 commented Sep 11, 2022

Based on @tjvezina comments I am now able to see Safari workaround success with Safari Preference "Open Save files after downloading" enabled.

@stevensrmiller
Copy link

Would like to add my support for this being a priority issue. Some of my students just submitted homework this way and were stunned to see their initial grades of "zero" for submitting empty files.

@bmoren
Copy link

bmoren commented Sep 14, 2022

Chiming in on this being a priority, students cannot turn in documentation of their work without this feature, it is critical for classroom use.

@kjhollen
Copy link
Member

kjhollen commented Sep 14, 2022

@stevensrmiller @bmoren I suggest allowing students to submit a URL for their sketches as their homework, for now. I understand other professors and teachers may prefer to have downloaded files for various reasons, but I use the URL only in my classes and it is a reasonable alternative.

Our new dev lead starts tomorrow and this will be a top priority for their first weeks. I expect there will be a little bit of ramp-up time before this issue is fixed. Thanks again to everyone for their patience.

@bmoren
Copy link

bmoren commented Sep 14, 2022

Hi Kate, thanks for the update. I really appreciate it!
I'm using links for now, and I'm happy to know its a priority. I like to have the sketches for archiving and documentation.
It's especially important for projection/installation works where you need to get rid of the editor bar at the top :)

@bluelhf
Copy link

bluelhf commented Sep 28, 2022

I've been having this problem for months and was finally able to download a project successfully with Safari, as suggested by @CaptainCredible:

  • macOS: 12.5.1
  • Safari: 15.6.1

Oddly this is the same setup as @jht1493 but the resulting download worked for me - I don't know if this is a Safari thing, but the download wasn't even a .zip, it was just a folder with all the expected files and assets in place and not corrupted.

Note: When unzipping a download from another browser with Mac's built in "Archive Utility", the unzip appeared to be successful, but all the files were still empty/corrupt, so be sure to look carefully.

I was also able to use PeaZip on Windows - as stated, it gives an error but clicking "Keep Files" successfully unzipped them anyway.

PeaZip worked on Linux for me — after extracting, an error message is shown, but the Keep Files -button successfully extracts all files.

@dhowe
Copy link

dhowe commented Oct 13, 2022

I suggest allowing students to submit a URL for their sketches as their homework, for now.

Unless I'm missing something, this makes impossible any kind of deadline for an assignment, as sketches can be continuously updated, while, for example, an instructor is going over solutions in class

@kjhollen
Copy link
Member

Yes, this is one of the "various reasons" I alluded to in the post you quoted. While it may not work for your teaching style, hopefully one of the other work-arounds suggested in this thread (using Safari if you have a Mac, or other zip tools for Windows and Linux) can work for you while the new project lead is learning the ropes. Please help create a welcoming environment for them. Thanks.

@dhowe
Copy link

dhowe commented Oct 13, 2022

Certainly not my intention to be less than welcoming to @raclim (or anyone else)... especially as this problem has existed since well before she came on board.

I know from experience how difficult it can be to manage open-source projects, but we also have a responsibility to our users when there is a critical bug like this. We should either (imho) address it quickly and/or let people know right away that it is exists -- something like a warning in the interface? -- rather than letting users think it is their own error, which is what new learners especially are likely to believe

In any case, it seems there is already a PR with a fix for this - is it waiting on further review (maybe I can help) ?

@kjhollen
Copy link
Member

@dhowe even updating the site with a banner would have taken resources we didn't really have over the summer, so I've been responding to this thread as a second best option. Earlier I discussed what would constitute a "critical" issue at this time, given our bandwidth over the last few months. Thanks for your offer to help—one of our challenges at the moment is that deployment is non-trivial, otherwise I would have probably tried to patch in a quick fix myself. This will be one of the first issues to be fixed when Rachel is fully onboarded with the tech stack & access to all hosting resources required for deployment. Until then, we appreciate your patience and hope one of the workarounds in this thread can work for your use case.

@stevensrmiller
Copy link

Welcome to the new dev

Hadn't thought of @dhowe's point, but it's a good one. Will have my students copy-and-paste their submissions while this is pending.

@madshobye
Copy link

It works from Safari but not Chrome on Mac 11.5.2. This is a pretty serious problem for teaching and hand-ins. I made this guide to use for my students:

https://learn.hobye.dk/development/p5js/download-p5-project

(feel free to link, copy-paste, edit etc).

@CaptainCredible
Copy link

It works from Safari but not Chrome on Mac 11.5.2. This is a pretty serious problem for teaching and hand-ins. I made this guide to use for my students:

https://learn.hobye.dk/development/p5js/download-p5-project

(feel free to link, copy-paste, edit etc).

Don't forget you can use peaZip on windows to properly extract the corrupted zip files. Just click "keep files" when peaZip tells you the zip is corrupted

@raclim
Copy link
Collaborator

raclim commented Oct 20, 2022

Thank you all so much for your patience during our transitional period, and for your understanding as I continue to become acquainted with the p5.js editor lead role. 🙂

We just merged and deployed @dwight9339's pull request, so hopefully this issue has been resolved. Please reopen this if it appears again, thanks!

@tjvezina
Copy link

Just tested on Mac in both Brave and Safari - clicking File > Download opens a new tab with a loading indicator for a few minutes, eventually giving a 502 error.

@jht1493-gmail
Copy link

jht1493-gmail commented Oct 20, 2022 via email

@pierrep
Copy link

pierrep commented Oct 28, 2022

I've just tried this, and now the zip file downloads correctly, text files are fine, but any binary files are corrupted. They appear to be the right size, but you cannot open any of them.

Tested on latest Firefox and Chrome under Ubuntu Linux.

This is actually worse than before, as previously using peazip served as a workaround.

@jht1493-gmail
Copy link

jht1493-gmail commented Oct 28, 2022 via email

@dhowe
Copy link

dhowe commented Nov 7, 2022

confirmed -- this needs to be re-opened ASAP

@raclim, does pr #2077 address this ?

@raclim
Copy link
Collaborator

raclim commented Nov 9, 2022

Yes I believe so! I just merged in PR #2077 and pushed it live. Please feel free to create a new issue if this still persists and this issue hasn't been reopened yet, thanks!

@dhowe
Copy link

dhowe commented Nov 10, 2022

can confirm this now works as expected - thanks @raclim !

@raclim
Copy link
Collaborator

raclim commented Nov 10, 2022

Awesome, glad to hear it! 🙌

@tjvezina
Copy link

I still get the 502 error when trying to download, but not with all projects - the problem seems to be folders. If I find a p5 project that I'm able to successfully download, then add a folder to the project (even leaving it empty), and try to download again, I get a new tab which ends with a 502 error after exactly 60 seconds.

@610Sailor
Copy link

I'm getting this bug and just purchased the 50gb as my file is 14.5gb but when I zip all of my folders are empty. Is there a fix for this?

@bluelhf
Copy link

bluelhf commented Dec 17, 2022

@610Sailor It's my understanding that this issue has already been fixed. Have you tried using PeaZip and forcing it to extract the files, despite possible errors?

@610Sailor
Copy link

610Sailor commented Dec 17, 2022 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 Priority:High Should be addressed soon but not critical
Projects
None yet
Development

Successfully merging a pull request may close this issue.