Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DiiViiNiiTy79 opened this issue Oct 23, 2024 · 21 comments
Labels
bug Something isn't working

Comments

@DiiViiNiiTy79
Copy link

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 DiiViiNiiTy79 added the bug Something isn't working label Oct 23, 2024
@gvarela
Copy link

gvarela commented Oct 23, 2024

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

@shivasharma63420
Copy link

Same issue here

@jifang
Copy link

jifang commented Oct 26, 2024

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

@willis-yang
Copy link

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?

@ElliotCHEN37
Copy link

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?

@jifang
Copy link

jifang commented Oct 26, 2024 via email

@shivasharma63420
Copy link

┌──(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

@m4ttless
Copy link

  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

@justinjohn0306
Copy link

How do I do it on Windows tho?

@willis-yang
Copy link

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

@reddotsiuuu
Copy link

for indian accounts, 143467 is the storefront id

@PenguinAndy
Copy link

  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

@isaac960623
Copy link

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?

@sisi-sh
Copy link

sisi-sh commented Nov 10, 2024

  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

@AltayAkkus
Copy link

AltayAkkus commented Nov 14, 2024

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.

addr := res.Data.Account.Address
acc := Account{
Name: strings.Join([]string{addr.FirstName, addr.LastName}, " "),
Email: res.Data.Account.Email,
PasswordToken: res.Data.PasswordToken,
DirectoryServicesID: res.Data.DirectoryServicesID,
StoreFront: res.Headers[HTTPHeaderStoreFront],
Password: password,
}

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

@BreakfastSerial
Copy link

I was able to manually fix this, as described here: #307 (comment)

@eliprof12
Copy link

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

where can i find the keychain, im on windows 11

@Corndoglover69
Copy link

same questiton as @eliprof12

@willis-yang
Copy link

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

@AltayAkkus
Copy link

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 :)

@adrianzhang
Copy link

  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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests