gildas-lormeau/zip.js

Compatibility with Apple install daemon

DebianArch64 opened this issue · 3 comments

Hello, I'm an iOS developer and I've loved this project so far. Something has changed since last I used Zip.JS that made this no longer work for my use case could have been something that got introduced in iOS 16 because testers on older versions have it working fine. I think it could be related to zip.js generating fat archives instead of 'unx' archives, but I'm not very familiar with this specific area:

Example with output of Zip.JS archive:
+[IXAppInstallCoordinator(IXSimpleInstaller) _beginInstallForURL:forPersonaUniqueString:consumeSource:options:progressBlock:completionWithIdentity:]_block_invoke: Failed to extract /private/var/mobile/Media/PublicStaging/org.coolstar.taurine to /var/tmp/temp.TQxqPP : Error Domain=MIInstallerErrorDomain Code=5 "Could not extract archive" UserInfo={NSLocalizedDescription=Could not extract archive, LegacyErrorString=PackageExtractionFailed, FunctionName=+[MIBOMWrapper extractZipArchiveAtURL:toURL:withError:extractionProgressBlock:], SourceFileLine=223, NSUnderlyingError=0xe76a051c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

ZipInfo of Zip.JS archive:
.0.1
Archive: /Users/debianarch/Downloads/127.0.0.1
Zip file size: 32326840 bytes, number of entries: 30
drwx--- 2.0 fat 0 bX stor 23-Nov-02 22:04 Payload/Taurine.app/
-rw---- 2.0 fat 900 bX defN 23-Nov-02 22:04 Payload/Taurine.app/essential_0-4_iphoneos-arm.deb
-rw---- 2.0 fat 12598891 bX defN 23-Nov-02 22:04 Payload/Taurine.app/bootstrap.tar.gz
-rw---- 2.0 fat 8746 bX defN 23-Nov-02 22:04 Payload/Taurine.app/uicache.gz
-rw---- 2.0 fat 13746 bX defN 23-Nov-02 22:04 Payload/Taurine.app/AppIcon60x60@2x.png
-rw---- 2.0 fat 5160960 bX defN 23-Nov-02 22:04 Payload/Taurine.app/basebinaries.tar
drwx--- 2.0 fat 0 bX stor 23-Nov-02 22:04 Payload/Taurine.app/Base.lproj/
drwx--- 2.0 fat 0 bX stor 23-Nov-02 22:04 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/
-rw---- 2.0 fat 1197 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
-rw---- 2.0 fat 896 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
-rw---- 2.0 fat 258 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/Info.plist
-rw---- 2.0 fat 240644 bX defN 23-Nov-02 22:04 Payload/Taurine.app/tar.gz
-rw---- 2.0 fat 740 bX defN 23-Nov-02 22:04 Payload/Taurine.app/BuildConfigs.xcconfig
drwx--- 2.0 fat 0 bX stor 23-Nov-02 22:04 Payload/Taurine.app/Main.storyboardc/
-rw---- 2.0 fat 3548 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Main.storyboardc/DKI-Yp-loo-view-cPN-qX-cZW.nib
-rw---- 2.0 fat 972 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Main.storyboardc/UIViewController-DKI-Yp-loo.nib
-rw---- 2.0 fat 64264 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
-rw---- 2.0 fat 2018 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Main.storyboardc/UINavigationController-veQ-yo-6fF.nib
-rw---- 2.0 fat 351 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Main.storyboardc/Info.plist
-rw---- 2.0 fat 13215679 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Assets.car
-rw---- 2.0 fat 19078 bX defN 23-Nov-02 22:04 Payload/Taurine.app/AppIcon76x76@2x~ipad.png
-rw---- 2.0 fat 6066 bX defN 23-Nov-02 22:04 Payload/Taurine.app/ctbypass.gz
-rw---- 2.0 fat 2181076 bX defN 23-Nov-02 22:04 Payload/Taurine.app/org.coolstar.sileo_2.3_iphoneos-arm.deb
-rw---- 2.0 fat 5397 bX defN 23-Nov-02 22:04 Payload/Taurine.app/signcert.p12
-rw---- 2.0 fat 1723 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Info.plist
-rw---- 2.0 fat 8 bX defN 23-Nov-02 22:04 Payload/Taurine.app/PkgInfo
-rw---- 2.0 fat 12429 bX defN 23-Nov-02 22:04 Payload/Taurine.app/embedded.mobileprovision
drwx--- 2.0 fat 0 bX stor 23-Nov-02 22:04 Payload/Taurine.app/_CodeSignature/
-rw---- 2.0 fat 8901 bX defN 23-Nov-02 22:04 Payload/Taurine.app/_CodeSignature/CodeResources
-rw---- 2.0 fat 3817472 bX defN 23-Nov-02 22:04 Payload/Taurine.app/Taurine
30 files, 37365960 bytes uncompressed, 32318736 bytes compressed: 13.5%

ZipInfo of working archive:
Archive: /Users/debianarch/Downloads/Taurine.1.1.7-3.zip
Zip file size: 32244737 bytes, number of entries: 27
drwxr-xr-x 3.0 unx 0 bx stor 23-Sep-23 13:56 Payload/Taurine.app/
-rw-r--r-- 3.0 unx 900 bx defX 23-Sep-23 13:56 Payload/Taurine.app/essential_0-4_iphoneos-arm.deb
-rw-r--r-- 3.0 unx 12598891 bx defX 23-Sep-23 13:56 Payload/Taurine.app/bootstrap.tar.gz
-rwxr-xr-x 3.0 unx 8746 bx stor 23-Sep-23 13:56 Payload/Taurine.app/uicache.gz
-rw-r--r-- 3.0 unx 13746 bx defX 23-Sep-23 13:56 Payload/Taurine.app/AppIcon60x60@2x.png
-rw-r--r-- 3.0 unx 5160960 bx defX 23-Sep-23 13:56 Payload/Taurine.app/basebinaries.tar
-rwxr-xr-x 3.0 unx 3726712 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Taurine
drwxr-xr-x 3.0 unx 0 bx stor 23-Sep-23 13:56 Payload/Taurine.app/Base.lproj/
drwxr-xr-x 3.0 unx 0 bx stor 23-Sep-23 13:56 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/
-rw-r--r-- 3.0 unx 1197 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
-rw-r--r-- 3.0 unx 896 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
-rw-r--r-- 3.0 unx 258 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Base.lproj/LaunchScreen.storyboardc/Info.plist
-rwxr-xr-x 3.0 unx 240644 bx defX 23-Sep-23 13:56 Payload/Taurine.app/tar.gz
-rw-r--r-- 3.0 unx 740 tx defX 23-Sep-23 13:56 Payload/Taurine.app/BuildConfigs.xcconfig
drwxr-xr-x 3.0 unx 0 bx stor 23-Sep-23 13:56 Payload/Taurine.app/Main.storyboardc/
-rw-r--r-- 3.0 unx 3548 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Main.storyboardc/DKI-Yp-loo-view-cPN-qX-cZW.nib
-rw-r--r-- 3.0 unx 972 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Main.storyboardc/UIViewController-DKI-Yp-loo.nib
-rw-r--r-- 3.0 unx 64264 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
-rw-r--r-- 3.0 unx 2018 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Main.storyboardc/UINavigationController-veQ-yo-6fF.nib
-rw-r--r-- 3.0 unx 351 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Main.storyboardc/Info.plist
-rw-r--r-- 3.0 unx 13215679 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Assets.car
-rw-r--r-- 3.0 unx 19078 bx defX 23-Sep-23 13:56 Payload/Taurine.app/AppIcon76x76@2x~ipad.png
-rwxr-xr-x 3.0 unx 6066 bx stor 23-Sep-23 13:56 Payload/Taurine.app/ctbypass.gz
-rw-r--r-- 3.0 unx 2181076 bx defX 23-Sep-23 13:56 Payload/Taurine.app/org.coolstar.sileo_2.3_iphoneos-arm.deb
-rw-r--r-- 3.0 unx 5397 bx defX 23-Sep-23 13:56 Payload/Taurine.app/signcert.p12
-rw-r--r-- 3.0 unx 1723 bx defX 23-Sep-23 13:56 Payload/Taurine.app/Info.plist
-rw-r--r-- 3.0 unx 8 tx stor 23-Sep-23 13:56 Payload/Taurine.app/PkgInfo
27 files, 37253870 bytes uncompressed, 32238771 bytes compressed: 13.5%

This might be related to extended timestamp extra fields that zip.js includes by default since recent versions, they can be disabled by setting extendedTimestamp to false. This could be also due to data descriptors, they can be disabled by setting dataDescriptor to false. You can set these options when instantiating ZipWriter instances or when calling ZipWriter#add().

This might be related to extended timestamp extra fields that zip.js includes by default since recent versions, they can be disabled by setting extendedTimestamp to false. This could be also due to data descriptors, they can be disabled by setting dataDescriptor to false. You can set these options when instantiating ZipWriter instances or when calling ZipWriter#add().

Yes this is it, absolutely phenomenal I didn't expect a response so soon. Thank you

You're welcome :)