majd / ipatool

Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store
MIT License
5.34k stars 466 forks source link

Applying patches fails for Pages and Numbers apps #212

Closed gregggreg closed 11 months ago

gregggreg commented 1 year ago

What happened?

When attempting to download Apple's iWork apps Pages (https://apps.apple.com/us/app/pages/id361309726) and Numbers (https://apps.apple.com/us/app/numbers/id361304891), I get the following error:

1:39PM ERR error="failed to apply patches: failed to open zip reader: zip: not a valid zip file" success=false

I would expect the IPA to be properly downloaded, but it fails consistently on these two apps.

Version

2.1.3 on macos

Relevant log output

1:39PM ERR error="failed to apply patches: failed to open zip reader: zip: not a valid zip file" success=false
majd commented 11 months ago

I am unable to reproduce this issue. Are you able to check somehow that the downloaded zip file is indeed invalid?

gregggreg commented 11 months ago

Yeah I'm not seeing this issue anymore either for these apps. Looks like it was a temporary issue where maybe Apple was serving out invalid zip files for these apps? Will re-open if I see it again, but looks like it may not have been an issue with ipatool.

davipt commented 11 months ago

I’ve seen this happening when an app is macOS only. For example, downloading the Apple Configurator app (app_id 1037126344 bundle com.apple.configurator.ui) will yield an IPA file, but this is NOT a zip file.

I could guess the first time you downloaded the macOS version and the second the iOS version. Is there any chance you used a new account that logged in to a Mac first, earning the free “iTools” licenses, and after using ipatool the first time when it got the non Zip files, you’ve logged in on an iPhone or iPad, earning the license for the iOS versions?

I’ve seen these Mac Apps but haven’t yet got time to investigate what the IPA file is, not being a zip.