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

ERR error="received error: An unknown error has occurred" #226

Closed SpyGdev closed 8 months ago

SpyGdev commented 9 months ago

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
arm64x commented 9 months ago

Today I had the same error as you, after about 1 hour it worked normally again.

SpyGgG commented 9 months ago

yeah it works now

sstraus commented 9 months ago

I'm still having the problem.

e-ave commented 9 months ago

Would love this to work....

e-ave commented 9 months ago

The actual error (shown when adding --verbose) is "CustomerMessage":"An unknown error has occurred","FailureType":"5002"

e-ave commented 9 months ago

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.

bzeifert commented 9 months ago

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.

sstraus commented 9 months ago

Today it's working again

neoighodaro commented 9 months ago

Not for me it isnt

neoighodaro commented 9 months ago

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?

RichTime1 commented 9 months ago

I also have this problem.

asdfzxcvbn commented 9 months ago

same. issue seems to be coming and going, works for a couple hours, stops working, and then starts working again soon

asdfzxcvbn commented 9 months ago

haven't experienced this for days. i think this issue can be closed.

e-ave commented 9 months ago

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.

majd commented 8 months ago

Closing the issue for now. Let me know if this re-occurs.