Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] [BUG?] In-app purchases (IAP) fail when not including a subscription item

Author
Message
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 28th Sep 2022 18:04
I have posted this to GitHub as well here:
https://github.com/TheGameCreators/AGK-Studio/issues/1020
but was just wondering if anyone else could confirm this is a problem for them too? I know there has been several new subscription purchase commands added in the newest version of AppGameKit Studio so I am wondering if something has broken.

I am currently adding an in-app purchase (IAP) to my new game and ran into an issue. After much debugging I have written a small test based on one of the included examples. This uses a TGC test product and broadcasts the app to the AppGameKit player running on an Android phone. If the script contains both the single purchase test item and the subscription test item it goes through to the Google Play purchase screen fine. BUT if it only contains the single purchase test item it shows the error: "Cannot start purchase until setup is finished, please try again in a minute". It does not matter how long you wait, it always displays that error.

Here is the test code:


This script fails with the error unless you uncomment the line "InAppPurchaseAddProductID( "test_sub", 2 )" (the test subscription item) which should not be necessary.

AppGameKit Studio: V2022.09.26 - Windows 10
AGK Player: Build Sep 26 2022 - Android 10

The author of this post has marked a post as an answer.

Go to answer

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 29th Sep 2022 01:00
This post has been marked by the post author as the answer.
Thanks, fixed for the next version.

For now you can work around it by calling InAppPurchaseAddProductID with a subscription product, even if it doesn't exist.
Zappo
Valued Member
19
Years of Service
User Offline
Joined: 27th Oct 2004
Location: In the post
Posted: 29th Sep 2022 17:04
Thanks Paul. I will use a dummy subscription item for now.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 29th Sep 2022 18:19
kozma_11
20
Years of Service
User Offline
Joined: 17th Sep 2003
Location: Scotland
Posted: 1st Oct 2022 09:39 Edited at: 2nd Oct 2022 18:50
I only have subscriptions in my app, and the inverse doesn't seem to work (i.e. add a dummy line for a non-consumable) so I'm still getting the 'Cannot start purchase until setup is finished, please try again in a minute' error message.

Using the same test code as Zappo, you get this error message when you don't uncomment the non-consumable item. I've tried putting a dummy non-consumable in, but it fails in my app with a 'Product not recognised by Google Billary Library' message. I might try and add a dummy non-consumable in Google Developer Console, but just wanted to highlight that I think this still needs fixed.

*** NOW SORTED *** got it working now. The Product not recognised error was only because I was broadcasting to an android tablet. Once I made the apk file and tested that on the device, it worked fine.

El Presidente

Login to post a reply

Server time is: 2024-03-29 14:47:20
Your offset time is: 2024-03-29 14:47:20