GodotGooglePlayBilling not working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By zloyalex

Hi. Sorry for my english.

Before doing it, I read an article by GodotGooglePlayBilling

docs.godotengine.org/ru/stable/tutorials/platform/android_in_app_purchases.html

Downloaded and installed plugin

Releases · godotengine/godot-google-play-billing · GitHub

My app is published in alpha test, I added purchases in Google Play Console.
The code:

if Engine.has_singleton("GodotGooglePlayBilling"):
	payment = Engine.get_singleton("GodotGooglePlayBilling")
	# These are all signals supported by the API
	# You can drop some of these based on your needs
	payment.connect("connected", self, "_on_connected") # No params
	payment.connect("disconnected", self, "_on_disconnected") # No params
	payment.connect("connect_error", self, "_on_connect_error") # Response ID (int), Debug message (string)
	payment.connect("purchases_updated", self, "_on_purchases_updated") # Purchases (Dictionary[])
	payment.connect("purchase_error", self, "_on_purchase_error") # Response ID (int), Debug message (string)
	payment.connect("sku_details_query_completed", self, "_on_sku_details_query_completed") # SKUs (Dictionary[])
	payment.connect("sku_details_query_error", self, "_on_sku_details_query_error") # Response ID (int), Debug message (string), Queried SKUs (string[])
	payment.connect("purchase_acknowledged", self, "_on_purchase_acknowledged") # Purchase token (string)
	payment.connect("purchase_acknowledgement_error", self, "_on_purchase_acknowledgement_error") # Response ID (int), Debug message (string), Purchase token (string)
	payment.connect("purchase_consumed", self, "_on_purchase_consumed") # Purchase token (string)
	payment.connect("purchase_consumption_error", self, "_on_purchase_consumption_error") # Response ID (int), Debug message (string), Purchase token (string)
	#
	payment.startConnection()
	print("GodotGooglePlayBilling start")
else:
	show_alert("Android IAP support is not enabled.")

Working, print “GodotGooglePlayBilling start”.

In the application, I call the code:

var query = payment.queryPurchases("inapp") # Use "subs" for subscriptions.
if query.status == OK:
	for purchase in query.purchases:
		if !purchase.is_acknowledged:
			print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
			payment.acknowledgePurchase(purchase.purchase_token)
else:
	print("error..")

And the application crashes without error output.

Running “adb logcat” prints out a lot of messages from the found application related:

10-02 11:28:06.999  4706  4865 W InputDispatcher: channel '6cceaa com.zloyalex.bow/com.godot.game.GodotApp (server)' ~ Consumer closed input channel or an error occurred.  events=0x9, fd=567
10-02 11:28:06.999  4706  4865 E InputDispatcher: channel '6cceaa com.zloyalex.bow/com.godot.game.GodotApp (server)' ~ Channel is unrecoverably broken and will be disposed!

I ran the code from the android_iap example, but it also doesn’t work on the phone

Please tell me what else needs to be done to start GodotGooglePlayBilling.
Thanks

:bust_in_silhouette: Reply From: zloyalex

For those who accept the same behavior of the program, the solution is to download the code for 1.0.1, compile and then do the same as in solution 1.0.0.
It is strange that the official link does not immediately contain the ready-made plugin version 1.0.1

had the same problem, thanks for the solution…

bertan | 2020-10-10 19:22