Google Play Billing plugin loads but no signals (Godot 4.6.1)

Godot Version

4.6.1

Question

Hello everyone,

I’ve been stuck with the GodotGooglePlayBilling plugin (v3.2.0) on Godot 4.6.1 for about a month now and I can’t figure out what’s wrong.

The problem:
The plugin is correctly detected (I can access it via the singleton), but none of the signals are ever triggered — not even connected or disconnected. It looks like startConnection() does nothing.

What I already checked:

  • Plugin enabled in Project Settings

  • Gradle build enabled in Android export

  • Tested on a real device

  • App uploaded to Google Play Console (internal testing track)

  • App installed via Play Store (not via APK)

  • Tester account configured

Logs (adb logcat):
I can see the plugin initialization:

  • “Initializing Godot plugin GodotGooglePlayBilling”

  • “Completed initialization for Godot plugin GodotGooglePlayBilling”

But after calling startConnection(), nothing else appears:

  • No BillingClient logs

  • No connection attempt

  • No error

My code:

func _ready() -> void:
	await get_tree().process_frame
	getBillingPaid()
func getBillingPaid():
	if Engine.has_singleton("GodotGooglePlayBilling"):
		print("in here!")
		$Label.text += "\n\n\nTest item SKU: %s" % TEST_ITEM_SKU

		payment = Engine.get_singleton("GodotGooglePlayBilling")
		
		$Label4.text = str(payment)
		payment.connected.connect(_on_connected)
		payment.disconnected.connect(_on_disconnected)
		payment.purchases_updated.connect(_on_purchases_updated)
		payment.purchase_error.connect(_on_purchase_error)
		payment.sku_details_query_completed.connect(_on_product_details_query_completed)
		payment.sku_details_query_error.connect(_on_product_details_query_error)
		payment.purchase_acknowledged.connect(_on_purchase_acknowledged)
		payment.purchase_acknowledgement_error.connect(_on_purchase_acknowledgement_error)
		payment.purchase_consumed.connect(_on_purchase_consumed)
		payment.purchase_consumption_error.connect(_on_purchase_consumption_error)
		payment.query_purchases_response.connect(_on_query_purchases_response)
		payment.startConnection()
	else:
		$Label.text = "Android IAP support is not enabled. Make sure you have enabled 'Custom Build' and installed and enabled the GodotGooglePlayBilling plugin in your Android export settings! This application will not work."
		
func _on_buy_100stars_pressed():
	var response = payment.purchase(GET_100_STARS)
	if response.status != OK:
		$Label2.text = "Purchase error %s: %s" % [response.response_code, response.debug_message]

	$Label2.text = "🛒 Achat 100 étoiles..."

func _on_buy_500stars_pressed():
	var response = payment.purchase(GET_500_STARS)
	if response.status != OK:
		$Label2.text = "Purchase error %s: %s" % [response.response_code, response.debug_message]

	$Label2.text = "🛒 Achat 500 étoiles..."
func _on_product_details_query_error(code, message):
	print("SKU details query error %d: %s" % [code, message])


func _on_disconnected():
	print("GodotGooglePlayBilling disconnected. Will try to reconnect in 10s...")
	$Label4.text = "GodotGooglePlayBilling disconnected. Will try to reconnect in 10s..."
	await get_tree().create_timer(10).timeout
	payment.startConnection()


func _on_purchase_item_pressed():
	var response = payment.purchase(TEST_ITEM_SKU)
	if response.status != OK:
		$Label3.text = "Purchase error %s: %s" % [response.response_code, response.debug_message]


func _on_use_item_pressed():
	if test_item_purchase_token == null:
		$Label4.text ="You need to set 'test_item_purchase_token' first! (either by hand or in code)"
		return

	payment.consumePurchase(test_item_purchase_token)

func _on_purchase_acknowledged(purchase_token):
	$Label2.text = "Purchase acknowledged: %s" % purchase_token


func _on_purchase_consumed(purchase_token):
	$Label2.text = "Purchase consumed successfully: %s" % purchase_token
	$Label3.text += "\n✅ Consommé: " + str(purchase_token)


func _on_purchase_error(code, message):
	$Label3.text = "Purchase error %d: %s" % [code, message]
	$Label4.text = "❌ Error: " + str(code) + " / " + message


func _on_purchase_acknowledgement_error(code, message):
	$Label2.text = "Purchase acknowledgement error %d: %s" % [code, message]


func _on_purchase_consumption_error(code, message, purchase_token):
	$Label2.text = "Purchase consumption error %d: %s, purchase token: %s" % [code, message, purchase_token]

func _on_query_purchases_response(query_result):
	if query_result.status == OK:
		for purchase in query_result.purchases:
			# We must acknowledge all puchases.
			# See https://developer.android.com/google/play/billing/integrate#process for more information
			if not purchase.is_acknowledged:
				$Label3.text = "Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging..."
				payment.acknowledgePurchase(purchase.purchase_token)
	else:
		$Label2.text ="queryPurchases failed, response code: " +str(query_result.response_code) +" debug message: " + str(query_result.debug_message)


func _on_product_details_query_completed(product_details):
	for available_product in product_details:
		$Label4.text = str(available_product)


func _on_purchases_updated(purchases: Array):
	print("Purchases updated:", purchases)
	$Label.text = "Achats reçus: " + str(purchases.size())
	for purchase in purchases:
		if not purchase.is_acknowledged:
			print("Purchase " + str(purchase.sku) + " has not been acknowledged. Acknowledging...")
			payment.acknowledgePurchase(purchase.purchase_token)

	if purchases.size() > 0:
		test_item_purchase_token = purchases[purchases.size() - 1].purchase_token

func _on_connected():
	$Label2.text = "PurchaseManager connected"
	is_connected = true
	payment.querySkuDetails.query_details([
	"get.100.stars_fute",
	"get.500.stars_fute",
	"get.1500.stars_fute",
	"get.5000.stars_fute",
	"get.10000.stars_fute"
], payment.TYPE_INAPP)

func _on_QuerySkuDetailsButton_pressed():
	payment.querySkuDetails([TEST_ITEM_SKU], payment.TYPE_INAPP)

Does anyone have any idea why no signal would be triggered at all?
Is there something I might be missing in the setup or configuration?

Thanks in advance.

Your best bet would be to log an issue on the Google Play Plugin GitHub Page. The project appears to be somewhat active, and someone there is going to be able to help you with the plugin. There may not be anybody on this forum with any experience using it.

Thanks for your reply! I’ll open an issue on the plugin’s GitHub page. have a good day

1 Like