-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
zip files generated from Xcode Cloud cannot be streamed during extraction #2544
Comments
Can you try unzipping the archive with the following command with Terminal: ditto -x -k Vor.app.zip . If it fails, theres's a chance the zip file is not that good, and you wouldn't want to distribute a zipped app that will be prone to fail extracting with one of the system unarchivers. Which macOS version are you on, too? As for the second error, try to remove the offending extracted cache generate_appcast generated, which I think is bad because it failed to originally extract the file properly the first time. As the error you provided indicates, that may be in |
The command does not fail, and the app is extracted.
14.4.1 (23E224) |
The last line here shows the exact (barring user name stripped out) command generate appcast uses
Does the issue always reproduce with that zip file? I don't think I can do much here without a debuggable repro case (like the zip file. I don't have Xcode cloud set up). |
Yep, and others that have been generated since moving to Xcode Cloud for notarization. Happy to provide an un-signed zip file if you'd like. |
Yeah it would be helpful providing a zip file. Feel free to email me (zorgiepoo at gmail dot com) if it's sensitive, otherwise link it here. There might be something wrong in our piping code in our unarchiver. |
Received a couple zip files over email and can easily reproduce.
This is a workaround for now. I cannot reproduce trying several different ways of re-creating the zip file, so oddly it's specific to how Xcode Cloud creates zip files. This issue seems to also be related to our NSPipe unarchiving code (shared between Sparkle and generate_appcast) Sparkle/Autoupdate/SUPipedUnarchiver.m Line 109 in 0cff817
The ditto error is also pretty odd.. If generate_appcast does a Sparkle 1.x can't handle unarchiving these zip files as well, and I believe the code before then hasn't changed much since 2015. I guess I should next rule out if this is specific to generate_appcast or if other components are affected (generate_appcast has an extra symlink step). |
Looking into this I found another unrelated bug I had to fix (#2550), and which I'm still not done completely integrating in older releases. This issue itself is that these zip files that Xcode Cloud generates cannot be streamed using a pipe during extraction correctly using any of the macOS built in tools (ditto, bsdtar). They will not extract these zip files and fail somewhere. That is not an issue in Sparkle. And this is not a new issue, just that no one has tried passing in these type of files before. We could work around this by seeing if extraction fails due to SIGPIPE and re-trying without piping the file in to get extraction progress. But I am not sure if I want to support these zip files since we can't get any extraction progress and future support for failing to stream them is unknown (for example bsdtar doesn't even report an error, the files extracted are just incomplete/corrupted). Or we could completely remove in-progress streaming for zip files since it's not done in the most optimal way (via a pipe) but that doesn't sound great. Perhaps I should also more familiarize myself with the ZIP file and the file format to see what steps are needed to create zip files like these. |
This bug is fixed in macOS 15 beta in ditto. However I also have a fix in #2616 for older OS's, which retries extraction without piping when piping fails (this may result in less fine-grained progress reporting, but may not be noticeable if the archive is small). |
Description of the problem
Using generate_appcast with a .app.zip generated from Xcode Cloud results in an error:
Running generate_appcast a second time results in:
Running
sktusing@SKT-MBP ~ % zipinfo /Users/sktusing/Desktop/Vor_Release/Vor.app.zip
shows that Decklink directory exists:Unzipping, then zipping the app causes generate_appcast to function.
This is new with us migrating to Xcode Cloud for notarizing the application.
Do you use Sandboxing in your app?
No
Version of
Sparkle.framework
in the latest version of your app2.6.0
Version of
Sparkle.framework
in the old version of app that your users have (or N/A)N/A
Sparkle's output from Console.app
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: