Search code examples
androidunity-game-enginegoogle-playin-app-purchasegoogle-play-console

On Initialization Failure in google play IAP?


I'm trying to create IAP in my app using google play console. I already uploaded an APK in the internal test track and added 1 product in Manage Product Tab. When I tried to run it in an android phone, OnInitializeFailed InitializationFailureReason:NoProductsAvailable appears in the logs. But when I run it in my editor, it returns OnInitialized:Pass.

Do I need to create an alpha/beta just to test IAP?

enter image description here

enter image description here

Editor Logs:

enter image description here

Android Mobile Logs:

Warning
Unavailable product book_1 -book_1
UnityEngine.Purchasing.Extension.UnityUtil:Update()

Log
OnInitializeFailed InitializationFailureReason:NoProductsAvailable
IAPManager:OnInitializeFailed(InitializationFailureReason)
UnityEngine.Purchasing.Extension.UnityUtil:Update()

Log
UnityIAP Promo: Clearing promo product metadata
UnityEngine.Purchasing.Extension.UnityUtil:Update()

Solution

  • It looks like you did not published a release to the internal test track. Press EDIT RELEASE button, scroll down. You will see several buttons: SAVE, REVIEW. After you press a REVIEW button, you will see a new page. Review a release and then press a START ROLLOUT button. This will make your app available for testers via Google Play. Make sure to complete all prerequisites, like in this answer: https://stackoverflow.com/a/50468247/2556378

    However, this will not solve the problem, because in-app billing is available only after app is published to either Open or Closed test track, as per this article: https://developer.android.com/google/play/billing/billing_testing

    Keep in mind, that the app itself and in-app products will still be available to testers only. I.e. you will still get an error unless logged in with tester account on the device.