godot-google-play-billing icon indicating copy to clipboard operation
godot-google-play-billing copied to clipboard

App crashes when calling payment.purchase

Open Swaraj-cs opened this issue 4 years ago • 4 comments

App crashes when calling payment.purchase. no log . Just closing the app.

following the details from https://docs.godotengine.org/en/stable/tutorials/platform/android_in_app_purchases.html

using version 3.2.2

Downloaded the files "GodotGooglePlayBilling.1.0.0.release.aar" and "GodotGooglePlayBilling.gdap" from below link. https://github.com/godotengine/godot-google-play-billing/releases

Added in the android/plugins.

Used the codes from url

https://docs.godotengine.org/en/stable/tutorials/platform/android_in_app_purchases.html

Swaraj-cs avatar Oct 19 '20 05:10 Swaraj-cs

Please run adb logcat -C (-C is for colored output) and post any error messages and stacktraces related to your app.

timoschwarzer avatar Oct 19 '20 07:10 timoschwarzer

Its not showing any log while crashing.

func _on_connected(): print("Ready status :",payment.isReady())

It is printing => Ready status : True

func _on_sku_details_query_completed(sku_details): print("Response : ",sku_details)

It is printing => Response : [] Any reason why the response is []? New to godot. implementing inapp for first time.

When I click on purchase button I created with the code => payment.purchase("test_id"); // using inapp id It crashes.

Custom build with inapp plugin enabled.

Swaraj-cs avatar Oct 19 '20 09:10 Swaraj-cs

Its not showing any log while crashing.

Are you looking at the Godot log or adb locgat?

Any reason why the response is []?

Have you uploaded an APK to Google Play after enabling in app purchases? This is a requirement by Google. It won't show any SKUs until you upload a new APK (see here)

timoschwarzer avatar Oct 19 '20 10:10 timoschwarzer

Am looking at adb logcat. The response I gave is from adb logcat.

Uploaded the APK to google. Tried the same file after downloading. Same response and crashing.

Swaraj-cs avatar Oct 19 '20 16:10 Swaraj-cs