Getting an InvalidClient error

So I have a live app that can no longer make IAP on android. Every time the users call store.purchase({com.mycompany.id}), an error returns with InvalidClient The Marketplace app has not been properly configured with an account.

I can make purchases with other apps with the same account. I also tried another account, as well as tried on both my galaxy s4 (4.4.2) and s3 (4.3) with no luck. Note that both accounts are NOT my developer account.

here are my build settings:

 plugins = { ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true, ["iphone-sim"]=true }, }, -- key is the name passed to Lua's 'require()' ["plugin.GameThrivePushNotifications"] = { -- required publisherId = "com.gamethrive", supportedPlatforms = { android=true }, }, -- Android requires Google Play Services with Corona v2014.2381 or later ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true }, }, ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs" }, ["plugin.notifications"] = { publisherId = "com.coronalabs" }, }, android = { permissions = { { name = "com.redpiston.veggieblast.permission.C2D\_MESSAGE", protectionLevel = "signature" }, }, usesPermissions = { "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "com.android.vending.BILLING", "com.android.vending.CHECK\_LICENSE", "android.permission.GET\_ACCOUNTS", "android.permission.RECEIVE\_BOOT\_COMPLETED", "com.google.android.c2dm.permission.RECEIVE", "com.redpiston.veggieblast.permission.C2D\_MESSAGE", }, },

I can also confirm I have the same version code as the one on the store, as well as the proper id’s. These purchases used to work but no longer work now. Any ideas?

Using build 2552, but also tried 2585 and 2393.

I also opened SampleCode/Store/InaAppPurchase sample app and I am experiencing the same issues.

store.canMakePurchases returns true, and store.loadProducts does not return anything on my callback. Everything works fine on iOS, and as I said, used to work on Android.

The app is live in the google play store now
https://play.google.com/store/apps/details?id=com.redpiston.veggieblast

See this post:  http://forums.coronalabs.com/topic/37442-google-play-iap-ridiculous-success-rate/?p=194926

Thanks Rob for the response. I’ve read that post multiple times before posting this.
 

  1. You are logged into the Google Play app with your developer account.  These will always fail.  You must use a test account.

I am using 2 different accounts that are not my developer account

  1. You have not setup an account with the Google Play app yet.

My account should be setup since I can install other apps, and make other IAP attempts in other store apps

  1. You have not agreeded to the Google Play App’s license agreement yet.

What is this? Is this something for the developer or the test account? If I can make other IAP with my test account I assume this isn’t the issue and if it’s for the developer than I assume this isn’t the issue since IAP’s used to work.

  1. The Google Play app is failing to connect to Google’s servers.

If I can install other apps and make other IAPs, I assume I can cross this off as an option.

  1. You’ve done too many restores in to short of a period of time and Google has brigged you for a while.

I only use consumable IAP’s so I never call restore.

Anything else?

If this helps at all here is the reply from Finsky:
 

D/Finsky ( 8683): [1309] InAppBillingUtils.getPreferredAccount: com.redpiston.veggieblast: Account from first account - [cCncgyoqgapGEMF6FOzWG00m314] W/Finsky ( 8683): [1309] Stub.handleBillingRequest: IABv2 is deprecated

I believe I read  somewhere in that forum you linked to Corona is using v3? Is there something in my code that forces v3 instead of v2?

Thanks!

Alright figured this one out on my own. It is because I’m still trying to use v2. The IAP sample should be updated since it is now wrong/not working.

Here’s what I changed to get it working again:

build.settings:

["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },

my custom store code:

--local store = require("store") to: local store = require("plugin.google.iap.v3") --store.purchase({ id }) to: store.purchase( id )

Hopefully this helps people!

Are there announcements with changes like these that I can subscribe to? This is kind of important to know this and I can’t read the logs of every daily build.

BUMP.

Just checked 2610 and the IAP sample is missing the updates to V3 for Google. Should a bug report be filed or is there another method?

PS: I started changing around the code and put it up here, if anyone wants to grab it.

Are you talking about the IAP app in the Sample Code?

See this post:  http://forums.coronalabs.com/topic/37442-google-play-iap-ridiculous-success-rate/?p=194926

Thanks Rob for the response. I’ve read that post multiple times before posting this.
 

  1. You are logged into the Google Play app with your developer account.  These will always fail.  You must use a test account.

I am using 2 different accounts that are not my developer account

  1. You have not setup an account with the Google Play app yet.

My account should be setup since I can install other apps, and make other IAP attempts in other store apps

  1. You have not agreeded to the Google Play App’s license agreement yet.

What is this? Is this something for the developer or the test account? If I can make other IAP with my test account I assume this isn’t the issue and if it’s for the developer than I assume this isn’t the issue since IAP’s used to work.

  1. The Google Play app is failing to connect to Google’s servers.

If I can install other apps and make other IAPs, I assume I can cross this off as an option.

  1. You’ve done too many restores in to short of a period of time and Google has brigged you for a while.

I only use consumable IAP’s so I never call restore.

Anything else?

If this helps at all here is the reply from Finsky:
 

D/Finsky ( 8683): [1309] InAppBillingUtils.getPreferredAccount: com.redpiston.veggieblast: Account from first account - [cCncgyoqgapGEMF6FOzWG00m314] W/Finsky ( 8683): [1309] Stub.handleBillingRequest: IABv2 is deprecated

I believe I read  somewhere in that forum you linked to Corona is using v3? Is there something in my code that forces v3 instead of v2?

Thanks!

Alright figured this one out on my own. It is because I’m still trying to use v2. The IAP sample should be updated since it is now wrong/not working.

Here’s what I changed to get it working again:

build.settings:

["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } },

my custom store code:

--local store = require("store") to: local store = require("plugin.google.iap.v3") --store.purchase({ id }) to: store.purchase( id )

Hopefully this helps people!

Are there announcements with changes like these that I can subscribe to? This is kind of important to know this and I can’t read the logs of every daily build.

BUMP.

Just checked 2610 and the IAP sample is missing the updates to V3 for Google. Should a bug report be filed or is there another method?

PS: I started changing around the code and put it up here, if anyone wants to grab it.

Are you talking about the IAP app in the Sample Code?