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

ERR error="invalid country code: could not infer country code from store front" success=false #131

Closed
24h7d opened this issue Dec 22, 2022 · 20 comments
Labels
auto-close Automatically close issue after 7 days of inactivity bug Something isn't working

Comments

@24h7d
Copy link

24h7d commented Dec 22, 2022

What happened?

when I successfully log in and try to search for the application it always shows this error
ERR error="invalid country code: could not infer country code from store front" success=false

Does anyone have the same issue here?

Version

2.0.0

Relevant log output

No response

@24h7d 24h7d added the bug Something isn't working label Dec 22, 2022
@crazyi
Copy link

crazyi commented Dec 22, 2022

This error occurs as the flag --country had been deprecated.
But I think the deprecated flags are useful because some apps were banned at local appstore and the only way to download is to change the appstore to another country.
So I strongly recommend that the author @majd can restore the deprecated flags.

@majd
Copy link
Owner

majd commented Dec 23, 2022

@24h7d What operating system are you using the tool on?

@majd
Copy link
Owner

majd commented Dec 23, 2022

This error occurs as the flag --country had been deprecated.
But I think the deprecated flags are useful because some apps were banned at local appstore and the only way to download is to change the appstore to another country.
So I strongly recommend that the author @majd can restore the deprecated flags.

@crazyi The fact that you can search for an app by specifying the country code does not mean that you can download it using an Apple ID that belongs to a different country. The app has to exist in the country of the authenticated Apple ID. That was the point of the change, to simplify the user flow. See #130.

If you absolutely need to search for an app in another store without authenticating, you can use the iTunes API directly.

$ curl -s 'http://itunes.apple.com/search?term=TestFlight&media=software&country=US' | jq -r '.results | first | .trackName'
TestFlight

@24h7d
Copy link
Author

24h7d commented Dec 23, 2022 via email

@majd
Copy link
Owner

majd commented Dec 23, 2022

@24h7d Please use the Keychain Access app on your MacBook to search for an application password labeled ipatool2.service ipatool-auth.service. It should be in the login keychain. Once you find it, double click on it check the "show password" box. Please share the storeFront value you find there.

Please note that string contains sensitive data so make sure you don't share the entire string here and only the storeFront value.

@24h7d
Copy link
Author

24h7d commented Dec 23, 2022 via email

@majd
Copy link
Owner

majd commented Dec 23, 2022

I only found ipatool-auth.service in my keychain access

That should be the one.

@24h7d
Copy link
Author

24h7d commented Dec 23, 2022 via email

@majd
Copy link
Owner

majd commented Dec 23, 2022

The value for the keychain item should be a JSON blob with multiple keys. Keys include email, name, directoryServicesIdentifier, storeFront and other keys. See appstore_login.go#L117. Are you missing the storeFront key there?

@24h7d
Copy link
Author

24h7d commented Dec 24, 2022 via email

@nasaa0528
Copy link

I have same error. Tested on debian 6.0.0 and macOS Ventura. Keyring file is being created, storeFront exists but error says
ERR error="invalid country code: could not infer country code from store front" success=false

@24h7d
Copy link
Author

24h7d commented Dec 27, 2022 via email

@nasaa0528
Copy link

The above doesn't solve my problem. Tried deleting ipatool.service keyring, and re-authenticated. I'm still having same error.
My value is storeFront: 143592-2,34.

@nasaa0528
Copy link

Fixed the problem by authenticating with different apple account. Probably, the initial appleId I've used might have different country storeFront, therefore, it was giving me the error.

@majd
Copy link
Owner

majd commented Jan 6, 2023

@nasaa0528 I believe that is due to Mongolia missing from the storefront list. It should be fixed in #134 and the fix was shipped with version 2.0.1.

@majd majd added the auto-close Automatically close issue after 7 days of inactivity label Jan 6, 2023
@github-actions
Copy link

This issue has been automatically closed because there has been no response from the original author.

@spenkk
Copy link

spenkk commented Jan 23, 2023

Could you please add the following store front to the list since I can't use that app due to the same issue?

"storeFront":"143575-2,34" -> Albania

@majd
Copy link
Owner

majd commented Jan 23, 2023

@spenkk Added in #141.

@BenjiThatFoxGuy
Copy link

I have the same error, region is PL
I could bypass this if the option wasn't deprecated
M1 MacBook Air Ventura 22D68
Terminal.app
nothing blocked no nothing

@sabrysmk
Copy link

sabrysmk commented May 2, 2023

@majd Could you please add the following store front to the list since I can't use that app due to the same issue?

"storeFront":"143615-2,34" -> Georgia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-close Automatically close issue after 7 days of inactivity bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants