majd / ipatool

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

Cookie jar cannot load cookies #135

Closed trevor-e closed 1 year ago

trevor-e commented 1 year ago

What happened?

"failed to create appstore client: failed to create cookie jar: failed to create cookie jar: cannot load cookies: file locked for too long; giving up: cannot acquire lock: failed to create lock file /Users/administrator/.ipatool/cookies.lock open /Users/administrator/.ipatool/cookies.lock: file exists"

Saw this error when trying to download a batch of apps. I think this happened after some downloads failed due to rate-limiting, so my guess is that the appstore client does not clean up the lock file properly in that case. Was able to fix by removing the lock myself.

Version

2.0.0

Relevant log output

No response

majd commented 1 year ago

Could you please provide instructions to reproduce the issue? Do you have a script that you used to download the batch of apps and that you can share?

trevor-e commented 1 year ago

I have my script running as a service and it essentially does:

ipatool auth login
ipatool download

I have it auth every time because it can be ~days between when this service is called and I'm not sure how long auth is valid for. Sometimes this service is called rapidly if I'm trying to download a list of apps, which I assume is the issue. I can update my script to be smarter about when auth login is needed.

Al4ise commented 1 year ago

You can use auth info to check if you're still authenticated