Google Play always returns "invalid test client" when I try and test in app purchases, how can I fix this?

On iOS my in app purchases work just fine using a test user.

On Google Play, I have added my account as a test user, but when I try and make test purchases using the:

"android.test.purchased" "android.test.canceled" "android.test.item\_unavailable"  

identifiers I always get an “invalid test client” reply.

Any ideas where I’ve gone wrong?

Thanks

Hey, AlanPlantPot, I got the same message when I was testing it, and it turned out the test user email address I added to Google dev console was slightly different from the one I had on device.  (Just one letter difference, which was so easy to over look.)  You may want to check and double check to make sure you are using the exact same email address as the one added to dev console.

Naomi

Thanks for responding Naomi. I’ve double checked and the email address is definitely correct.

I’ve just changed the Licence Test Response from “respond_normally” to “licensed” to see if that would help. Unfortunately the “purchased” event doesn’t seem to be happening any more (someone has already reported the bug in another topic).

However even if I use the " android.test.item_unavailable" product ID I still get the “invalidClient” response.

I’ve no idea how to get around this.

I don’t know if this could be contributing to the problem:

The dev account belongs to my boss, I’m just added on as an admin user.

I only have the one Android device to hand, which is my own phone. I don’t want to factory reset the phone, and it already has my own gmail account as it’s main account. 

Could the fact that I’m not the dev account owner be causing the problem? I don’t see why it would make a difference, since you can add test users, and I have already added my own email address to that test user list. Just thought it might be worth mentioning.

I test Google Play In-App Billing on a device that is registered with the account different from the Google Play developer account.  The test user I added to Google Play is the email address specific to the device (not developer account), and when I make the test purchase, I always eyeball to make sure the account that is purchasing the In-app item is the registered test user.  

Do you eyeball who is making the test purchase on your device?  Does it match correctly with the test user that’s been added to Google Play?

I don’t think whom the dev account belongs to make any difference in this case.

Naomi

Yes the popup has my email address in it, as well as the VisaXXXFake card details.

Very annoying indeed…

Hmmmm… the thing is, I never done the fake visa, fake purchase testing.  I’ve always tested with real credit card, and yeah, the purchases are actually made with credit card being charged.  But then I always either cancel the transactions before the charges go through or if it’s already gone through, make the full refund – and I add a note about it being End-to-End In-App Billing testing…

Naomi

Is your test account different than your Google Play account that you registered as your developer account? Google won’t do any transactions on your developer account.  You must have a separate test account.

Well that’s super annoying.

So basically if I want to test on my device, I have to either remove my account from the developer program, or do a factory reset on my device and set up a whole new account? That doesn’t seem like a very clever way of doing things.

Hey, AlanPlantPot, I got the same message when I was testing it, and it turned out the test user email address I added to Google dev console was slightly different from the one I had on device.  (Just one letter difference, which was so easy to over look.)  You may want to check and double check to make sure you are using the exact same email address as the one added to dev console.

Naomi

Thanks for responding Naomi. I’ve double checked and the email address is definitely correct.

I’ve just changed the Licence Test Response from “respond_normally” to “licensed” to see if that would help. Unfortunately the “purchased” event doesn’t seem to be happening any more (someone has already reported the bug in another topic).

However even if I use the " android.test.item_unavailable" product ID I still get the “invalidClient” response.

I’ve no idea how to get around this.

I don’t know if this could be contributing to the problem:

The dev account belongs to my boss, I’m just added on as an admin user.

I only have the one Android device to hand, which is my own phone. I don’t want to factory reset the phone, and it already has my own gmail account as it’s main account. 

Could the fact that I’m not the dev account owner be causing the problem? I don’t see why it would make a difference, since you can add test users, and I have already added my own email address to that test user list. Just thought it might be worth mentioning.

I test Google Play In-App Billing on a device that is registered with the account different from the Google Play developer account.  The test user I added to Google Play is the email address specific to the device (not developer account), and when I make the test purchase, I always eyeball to make sure the account that is purchasing the In-app item is the registered test user.  

Do you eyeball who is making the test purchase on your device?  Does it match correctly with the test user that’s been added to Google Play?

I don’t think whom the dev account belongs to make any difference in this case.

Naomi

Yes the popup has my email address in it, as well as the VisaXXXFake card details.

Very annoying indeed…

Hmmmm… the thing is, I never done the fake visa, fake purchase testing.  I’ve always tested with real credit card, and yeah, the purchases are actually made with credit card being charged.  But then I always either cancel the transactions before the charges go through or if it’s already gone through, make the full refund – and I add a note about it being End-to-End In-App Billing testing…

Naomi

Is your test account different than your Google Play account that you registered as your developer account? Google won’t do any transactions on your developer account.  You must have a separate test account.

Well that’s super annoying.

So basically if I want to test on my device, I have to either remove my account from the developer program, or do a factory reset on my device and set up a whole new account? That doesn’t seem like a very clever way of doing things.