ipatool: ERR error="received error: An unknown error has occurred"

What happened?

when ever i try to download a ipa this error shows up ERR error=“received error: An unknown error has occurred” Screenshot 2023-09-16 at 00 43 03

Version

2.1.3

Relevant log output

malinidevi@Malinis-MacBook-Air ~ % ipatool download -b com.openai.chat
downloading   0% |                                                 | ( 0/ 1 B) 12:39AM ERR error="received error: An unknown error has occurred" success=false

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

I’m still having the problem.

I use the tool on macOS and can confirm it’s an issue there as well. Also, the original screenshot in the issue suggests the user was on a MacBook Air.

I was using about 24 hours ago and experienced this error for about 1-2 hours before the tool recovered, and I was able to use it normally again for the next 3-4 hours. When I went to use the tool this morning (~8 hours ago), it was no longer working and has not been working since. I consistently get the error message cited above.

I was not able to solve this with ipa tool. I suspected that you need to give ipatool your iOS device’s MAC address, and I found someone elses python script that hardcodes the mac address and it works perfectly. I didnt try it but you can likely just hardcode your iOS device’s MAC in the ipatool source code and compile it yourself. Not too sure why there isnt an option to pass a MAC address though… Seems that this is not an issue on mac, only windows/linux, so if the maintainers of ipatool are only testing on macOS that could be the issue.

@e-ave can you share which tool?

Edit: I am an idiot. I used the wrong apple ID, I didn’t get banned. https://gist.github.com/spawn9275/6303053b0fae58d5b777e2c6d9192a2d

I used this. You have to enter in your email + password + iOS device MAC address first. And I added a input in between the two auth POST requests for the 2fa code like this:

# Request it twice, the first one will result in a 302 response
# First request
auth = saved_session.post(url=auth_url, headers=auth_headers, data=auth_params)

# After the first request, you should get the 2FA code
# Check if the code file exists already first
if os.path.isfile(code_file_path):
    # Read the code from the file
    with open(code_file_path, "r") as file:
        code = file.read()
else:
    # Prompt the user to input the 2FA code
    code = input("Write 2FA code: ")

    # Save the code to the file for next time
    with open(code_file_path, "w") as file:
        file.write(code)

auth_params['password'] += code

# Second request
auth = saved_session.post(url=auth_url, headers=auth_headers, data=auth_params)

I was also able to get it to work using my PCs mac address (like ipatool) after installing iTunes and logging in. This might be what you need to do to fix ipatool.

I was not able to solve this with ipa tool. I suspected that you need to give ipatool your iOS device’s MAC address, and I found someone elses python script that hardcodes the mac address and it works perfectly. I didnt try it but you can likely just hardcode your iOS device’s MAC in the ipatool source code and compile it yourself. Not too sure why there isnt an option to pass a MAC address though… Seems that this is not an issue on mac, only windows/linux, so if the maintainers of ipatool are only testing on macOS that could be the issue.

@e-ave can you share which tool?

I was not able to solve this with ipa tool. I suspected that you need to give ipatool your iOS device’s MAC address, and I found someone elses python script that hardcodes the mac address and it works perfectly. I didnt try it but you can likely just hardcode your iOS device’s MAC in the ipatool source code and compile it yourself. Not too sure why there isnt an option to pass a MAC address though… Seems that this is not an issue on mac, only windows/linux, so if the maintainers of ipatool are only testing on macOS that could be the issue.