majd / ipatool

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

failed to remove original file #243

Closed DTD369 closed 5 months ago

DTD369 commented 7 months ago

What happened?

When I downloaded an IPA using IPATool, it completed with this error:

[Time] ERR error="failed to remove original file: remove C:\\Users\\<user>\\Downloads\\<app>.ipa: The process cannot access the file because it is being used by another process." success=false

When I checked the Downloads folder, I could see that there were the original IPA file and a TMP file. Since I had read the code, I understood that IPATool was meant to delete the original file and then rename the TMP file to the IPA file, but was unable to do the former since the file handle was still open. Of course, I can do the rest but it's annoying to do so every time.

Version

v2.1.3 (latest)

Relevant log output

D:\IPATool>ipatool download -b com.iYOK.BLEJoyStick -o "%USERPROFILE%\Downloads\BLE Joystick.ipa" --verbose
9:10AM INF enter passphrase to unlock "C:\\Users\\'\\.ipatool" (this is separate from your Apple ID password):
9:10AM DBG error="failed to remove original file: remove C:\\Users\\'\\Downloads\\BLE Joystick.ipa: The process cannot access the file because it is being used by another process."
9:10AM ERR error="failed to remove original file: remove C:\\Users\\'\\Downloads\\BLE Joystick.ipa: The process cannot access the file because it is being used by another process." success=false
ksagameng2 commented 6 months ago

The bug was fixed but the latest release doesn't have it so build the source yourself and use that

mikesTech commented 6 months ago

https://github.com/majd/ipatool/issues/248 this may apply to u @DTD369