majd / ipatool

Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store
MIT License
5.76k stars 487 forks source link

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

Closed 24h7d closed 1 year ago

24h7d commented 1 year ago

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

crazyi commented 1 year ago

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 commented 1 year ago

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

majd commented 1 year ago

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 commented 1 year ago

Im using macbook pro monterey

On Fri, Dec 23, 2022, 3:55 PM Majd Alfhaily @.***> wrote:

@24h7d https://github.com/24h7d What operating system are you using the tool on?

— Reply to this email directly, view it on GitHub https://github.com/majd/ipatool/issues/131#issuecomment-1363749313, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZ3BIR5PM7IFXTFC76LYC3WOVSJBANCNFSM6AAAAAATGJA3N4 . You are receiving this because you were mentioned.Message ID: @.***>

majd commented 1 year ago

@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 commented 1 year ago

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

On Fri, Dec 23, 2022, 4:50 PM Majd Alfhaily @.***> wrote:

@24h7d https://github.com/24h7d Please use the Keychain Access app on your MacBook to search for an application password labeled ipatool2.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 the string that contain sensitive data so make sure you don't share the entire string here and only the storeFront value.

— Reply to this email directly, view it on GitHub https://github.com/majd/ipatool/issues/131#issuecomment-1363796785, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZ3BIXABVDUC3Q4M4LJTN3WOVYVLANCNFSM6AAAAAATGJA3N4 . You are receiving this because you were mentioned.Message ID: @.***>

majd commented 1 year ago

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

That should be the one.

24h7d commented 1 year ago

But when I click show password there is no storefront just my plaintext password On Fri, Dec 23, 2022, 5:17 PM Majd Alfhaily @.***> wrote:

I only found ipatool-auth.service in my keychain access … <#m_-8922937433195242676_m_8879722142780610693m-8201328331111076663_>

That should be the one.

— Reply to this email directly, view it on GitHub https://github.com/majd/ipatool/issues/131#issuecomment-1363817498, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZ3BIRWC43FATAJCORHWMLWOV34RANCNFSM6AAAAAATGJA3N4 . You are receiving this because you were mentioned.Message ID: @.***>

majd commented 1 year ago

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 commented 1 year ago

Yes, the value just my apple id password in json format

On Fri, Dec 23, 2022, 8:18 PM Majd Alfhaily @.***> wrote:

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 https://github.com/majd/ipatool/blob/main/pkg/appstore/appstore_login.go#L117. Are you missing the storeFront key there?

— Reply to this email directly, view it on GitHub https://github.com/majd/ipatool/issues/131#issuecomment-1363946766, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZ3BIRMHWINK4ZMQBLIIDLWOWRB3ANCNFSM6AAAAAATGJA3N4 . You are receiving this because you were mentioned.Message ID: @.***>

nasaa0528 commented 1 year ago

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 commented 1 year ago

The problem in authentication process. I fixed this issue by re login with : ipatool auth -e

Then input the password

Pop up on mac to authorize and the OTP number to be be input to the ipatool


Use -e instead -email in auth command

On Tue, Dec 27, 2022, 3:02 PM Nasantogtokh Amarsaikhan < @.***> wrote:

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

— Reply to this email directly, view it on GitHub https://github.com/majd/ipatool/issues/131#issuecomment-1365692665, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASZ3BITXQHQRLOF3DXD4GVLWPKPBVANCNFSM6AAAAAATGJA3N4 . You are receiving this because you were mentioned.Message ID: @.***>

nasaa0528 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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.

github-actions[bot] commented 1 year ago

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

spenkk commented 1 year ago

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 commented 1 year ago

@spenkk Added in #141.

BenjiThatFoxGuy commented 1 year ago

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 commented 1 year ago

@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