sparkle-project / Sparkle

A software update framework for macOS
https://sparkle-project.org
Other
7.28k stars 1.04k forks source link

Sparkle 2.6.1 generate_appcast fails with "Could not unarchive" #2554

Closed rxhanson closed 2 months ago

rxhanson commented 2 months ago

Description of the problem

When I run generate_appcast in Sparkle 2.6.1, I get the following:

Could not unarchive /tmp/app_dir/updates/<my_app>.dmg Error Domain=SUSparkleErrorDomain Code=3000 "An error occurred while extracting the archive. Please try again later." UserInfo={NSLocalizedDescription=An error occurred while extracting the archive. Please try again later., NSUnderlyingError=0x6000014241b0 {Error Domain=NSCocoaErrorDomain Code=4 "The file “.background” doesn’t exist." UserInfo={NSSourceFilePathErrorKey=/Volumes/C551CECA-E15B-4AC8-9C1C-574C29D7D4EA/.background, NSUserStringVariant=(
    Copy
), NSDestinationFilePath=/<user_home>/Library/Caches/Sparkle_generate_appcast/c25d5e30bc83bff6006fe2be88e00141f27a273c877ce18e40a263f140832b0f/.background, NSFilePath=/Volumes/C551CECA-E15B-4AC8-9C1C-574C29D7D4EA/.background, NSUnderlyingError=0x600001424540 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}

The appcast is not generated.

This works in 2.6.0.

Do you use Sandboxing in your app?

No

Version of Sparkle.framework in the latest version of your app

2.6.1

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

N/A

Steps to reproduce the behavior

As can be seen from that error, first I create a dmg of my app, then I run generate_appcast on the update directory. I download the Sparkle-for-Swift-Package-Manager for each release and use the generate_appcast script from there.

zorgiepoo commented 2 months ago

Agh, I forgot to create the extraction directory in generate_appcast which didn't surface as an issue with unarchiving zip files. This is done in Sparkle so just a bug in generate_appcast. Fixing in https://github.com/sparkle-project/Sparkle/pull/2555, workaround is to use generate_appcast from 2.6.0