Home » Android » in app purchase – Android In-App Billing error You need to sign into your google account

in app purchase – Android In-App Billing error You need to sign into your google account

Posted by: admin April 23, 2020 Leave a comment

Questions:

I am implementing in-app purchase using https://github.com/anjlab/android-inapp-billing-v3 .
But while in app pop up open it shows “Error Authentication is required.You need to sign into your google account”.
I tested using different devices as same result.

How to&Answers:

Improtant ! I’ve spent a lot of time trying to find out why I’m getting error “Error Authentication is required.You need to sign into your google account”. And after a lot of hours I found out – I was trying to access wrong item id from the console. In the developer console subscription item had id “premium” and I’ve tried to access “premium_version” item. Stupid mistake but error from google is absolutely not informative. Hope this helps

Answer:

In my case what happened was that the right product was all set up at console, however it wasn’t activated.

Answer:

If anybody getting the above popup you can re-check through the following steps because unfortunately this google popup is not enough informative for a clue.

  1. Make sure you are using the product ID correctly(should be same as what you’ve put on developer console)
  2. Make sure you’ve activated the product on developer console before testing. It may take a while, so wait till it’s ready.
  3. Make sure your the version of your app is published state on Beta,Alpha or Production
  4. Remember to add testing emails under testers list(Settings -> Testers List -> Create List). Testing email should be different from publisher account.
  5. If nothing works in the above, try removing google account on your phone and adding back and clearing data in Play Store.

Hope this helps 🙂

Answer:

In my case my base64EncodedPublicKey was incorrect and also my inapp product was inactive. Be sure ur inapp product id is same as in the console.

Answer:

Solved, It was only mistake of product Id, The product Id from Play-store and in app SKU_NAME should be same for in app billing.

It is not mention properly in iab sample project which one is productId

i.e SKU_GAS =”gas” and SKU_PREMIUM=”premium” in project

then

“gas” and “premium” must be available on play-store as productId.

Answer:

I struggled with this error for hours. My product IDs were correct, app was published to Alpha, I activated the Alpha testers list, joined through the opt-in link but nothing was working.

In the end I discovered that you cannot use the same Gmail account that is used for the Developer Console. That was it, added another gmail account as a tester and used it for downloading the app and no more authentication errors.

Also, just a note making changes to the app and building a debug version caused the error to re-appear. Only signed release APKs can be used.

Answer:

I was facing the same issue, using the correct Product ID for every In App Purchase item. My app was ready to publish on Google Play (with an APK in Alpha testing), but it wasn’t submitted. The solution was to submit the app to review by the Google Play Developer Console team.

Hope it helps you!

Answer:

Make sure you’re logged into the Play Store with the test account. Restart the phone. It should work, at least in my case the restart was necessary.

Answer:

Make sure you build and sign the application with the same Keystore that you signed the APK that was uploaded to Google Play Beta channel.
I made the mistake of signing with different Keystores, and didn’t notice it.

Answer:

If you are using google samples (like trivial drive) it might happen because of old .aidl file. Receive the latest version to test your application.