ipatool icon indicating copy to clipboard operation
ipatool copied to clipboard

error="failed to reosive the country code: country code mapping for store front () was not found"

Open DiiViiNiiTy79 opened this issue 2 years ago • 23 comments

What happened?

Hello, I have a problem with ipatool. The connection to my account is done perfectly but when I enter the line:

ipatool purchase -b jp.co.capcom.RE4US

I receive this error message: error="failed to reosive the country code: country code mapping for store front () was not found".

The game I'm trying to download is in my possession on my iTunes account.

I also specify that I checked in the keychains and I find that my password on the line "lipatool-auth.service"

Thank you in advance for your help

Version

2.1.4

Relevant log output

No response

DiiViiNiiTy79 avatar Oct 23 '24 13:10 DiiViiNiiTy79

I'm getting the same error trying to execute any of the commands.

gvarela avatar Oct 23 '24 21:10 gvarela

Same issue here

shivasharma63420 avatar Oct 24 '24 14:10 shivasharma63420

You could manually add the store front code in your keychain {"name":"","password":"***","storefront":"code"} find your store front code here https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/storefront.go

jifang avatar Oct 26 '24 01:10 jifang

You could manually add the store front code in your keychain {"name":"","password":"***","storefront":"code"} find your store front code here https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/storefront.go

can you using it to download ipa package?

willis-yang avatar Oct 26 '24 03:10 willis-yang

You could manually add the store front code in your keychain {"name":"","password":"***","storefront":"code"} find your store front code here https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/storefront.go

how to add it?

ElliotCHEN37 avatar Oct 26 '24 05:10 ElliotCHEN37

open ur keychain and search for ipatool Sent from my iPhoneOn Oct 26, 2024, at 13:51, Elliot @.***> wrote:

You could manually add the store front code in your keychain {"name":"","password":"***","storefront":"code"} find your store front code here https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/storefront.go

how to add it?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

jifang avatar Oct 26 '24 06:10 jifang

┌──(venv)─(kali㉿kali)-[~/ipatool-new] └─$ export APP_STORE_COUNTRY=IN export STORE_FRONT=143467

┌──(venv)─(kali㉿kali)-[~/ipatool-new] └─$ cd ~/ipatool-new git pull origin main

From https://github.com/majd/ipatool

  • branch main -> FETCH_HEAD Already up to date.

┌──(venv)─(kali㉿kali)-[~/ipatool-new] └─$ ipatool download --bundle-identifier com.pubg.imobile

8:38AM ERR error="failed to reoslve the country code: country code mapping for store front () was not found" success=false

anyone have solution

shivasharma63420 avatar Oct 27 '24 12:10 shivasharma63420

  1. Open the keychain and search for ipatool
  2. Open theipatool-auth.service item and show the password
  3. You will find an entry like {"name":"","password":"***"}
  4. Get the store front ID from https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/storefront.go
  5. Add the ID to the entry {"name":"","password":"***","storefront":"123456"} and save the changes

m4ttless avatar Oct 27 '24 19:10 m4ttless

How do I do it on Windows tho?

justinjohn0306 avatar Oct 30 '24 13:10 justinjohn0306

itunes has change login method,when using login method,you will see some important property is not return back,now i using another login method

willis-yang avatar Oct 31 '24 08:10 willis-yang

for indian accounts, 143467 is the storefront id

reddotsiuuu avatar Nov 03 '24 20:11 reddotsiuuu

  1. Open the keychain and search for ipatool
  2. Open theipatool-auth.service item and show the password
  3. You will find an entry like {"name":"","password":"***"}
  4. Get the store front ID from https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/storefront.go
  5. Add the ID to the entry {"name":"","password":"***","storefront":"123456"} and save the changes

I have setting done, but I got the error message: ERR error="received error: An unknown error has occurred" success=false

PenguinAndy avatar Nov 06 '24 03:11 PenguinAndy

itunes has change login method,when using login method,you will see some important property is not return back,now i using another login method

Could You please share your login method?

isaac960623 avatar Nov 07 '24 01:11 isaac960623

  1. pay attention to where the key is saved when you log in
  2. open that password manager (for me on GNOME, seahorse)
  3. find the ipatools entry, get the password JSON
  4. decode the "data" field with base64
  5. place country code in decoded 'data' field (don't do this using an online converter)
  6. encrypt and replace data code in password manager
  7. go

sie-sh avatar Nov 10 '24 05:11 sie-sh

So the root cause of this and #307 is the following:

The account in the keychain is created when the login function is called. The login function essentially calls Apple's Login endpoint, and then (when succesful) extracts information about that account from the Response.

https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/appstore_login.go#L86-L94

The Storefront is read from HTTPHeaderStoreFront, which is X-Set-Apple-Store-Front.

This header is actually not present in the response from Apple, so it is set to None, thats why you guys have to set it manually.

Connection:keep-alive 
Content-Length:0 
Date:Thu, 14 Nov 2024 21:10:01 GMT 
Server:Apple 
Strict-Transport-Security:max-age=31536000; includeSubdomains 
X-Apple-Jingle-Correlation-Key:YDHFHDAIWQO23MIVY 
X-Content-Type-Options:nosniff 
X-Daiquiri-Instance:daiquiri...
X-Frame-Options:SAMEORIGIN 
X-Responding-Instance:MZFinance:3700052::: 
X-Xss-Protection:1; mode=block]

So two possible solutions are:

  1. Detect when the Storefront is empty, ask the user for input (when interactive, else read --storefront)
  2. Find the actual endpoint from where you can get the storefront

AltayAkkus avatar Nov 14 '24 21:11 AltayAkkus

I was able to manually fix this, as described here: https://github.com/majd/ipatool/issues/307#issuecomment-2485163323

BreakfastSerial avatar Nov 19 '24 12:11 BreakfastSerial

same questiton as @eliprof12

Corndoglover69 avatar Nov 24 '24 07:11 Corndoglover69

itunes has change login method,when using login method,you will see some important property is not return back,now i using another login method

Could You please share your login method?

please share your email,i will send link to your email

willis-yang avatar Nov 26 '24 02:11 willis-yang

itunes has change login method,when using login method,you will see some important property is not return back,now i using another login method

Could You please share your login method?

please share your email,i will send link to your email

Would be nice if you could commit your findings back to this repository and help the other users too :)

AltayAkkus avatar Nov 26 '24 07:11 AltayAkkus

  1. Open the keychain and search for ipatool
  2. Open theipatool-auth.service item and show the password
  3. You will find an entry like {"name":"","password":"***"}
  4. Get the store front ID from https://github.com/majd/ipatool/blob/63ee6fc6a42a89d51c9caac632cefd65218825ab/pkg/appstore/storefront.go
  5. Add the ID to the entry {"name":"","password":"***","storefront":"123456"} and save the changes

really helpful !!!!! Thanks a lot!

adrianzhang avatar Dec 02 '24 08:12 adrianzhang