Hello, we using latest SDKBOX version and Cocos2d-x 3.8.1 C++ and we have big concern regarding in-app purchases on Android, as this procedure is not transparent for Developer.
We set analytic events for Failed and Canceled purchases and what we see that 95% of all initialized purchases failed or was canceled, which pointing to SDKBOX functionality problem.
So we need flow to test 100% that everything works and if it crashing not because SDKBOX try to use they own resources which crashes by some reason.
Please share detailed flow how it works or this really makes no REASON to use SDKBOX for it…
You can easily implement purchases, but they not working properly so you loosing your revenue… like instead of 1000$ u earn 10$ because something goes wrong on SDKBOX side and you can’t change it…
It depends how many users using this apps and how much in-app purchases there is.
I’m not sure which exactly error appear to users for whom purchase failing, maybe you can advice how to log specific to this action error, but there is most common erros we have in crashlytics -> can be related to final purchase, I can share direct links to this issues in crashlytics if needed.
Fatal Exception: java.lang.NullPointerException
at com.sdkbox.plugin.util.iap.IabHelper.queryPurchases(IabHelper.java:874)
at com.sdkbox.plugin.util.iap.IabHelper.queryInventory(IabHelper.java:575)
at com.sdkbox.plugin.util.iap.IabHelper.queryInventory(IabHelper.java:553)
at com.sdkbox.plugin.util.iap.IabHelper$3.run(IabHelper.java:648)
at java.lang.Thread.run(Thread.java:841)
Fatal Exception: java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
at android.os.Parcel.readException(Parcel.java:1473)
at android.os.Parcel.readException(Parcel.java:1419)
at com.android.vending.billing.IInAppBillingService$Stub$Proxy.getSkuDetails(IInAppBillingService.java:251)
at com.sdkbox.plugin.util.iap.IabHelper.querySkuDetails(IabHelper.java:983)
at com.sdkbox.plugin.util.iap.IabHelper.queryInventory(IabHelper.java:581)
at com.sdkbox.plugin.util.iap.IabHelper.queryInventory(IabHelper.java:553)
at com.sdkbox.plugin.util.iap.IabHelper$3.run(IabHelper.java:648)
at java.lang.Thread.run(Thread.java:841)
Crashed: main: SIGABRT -6 0x0000000000002811
at tgkill(Unknown Source)
at pthread_kill(Unknown Source)
at raise(Unknown Source)
at (Missing)(Unknown Source)
at abort(Unknown Source)
at dvmAbort(Unknown Source)
at IndirectRefTable::get(void*) const(Unknown Source)
at dvmDecodeIndirectRef(Thread*, _jobject*)(Unknown Source)
at (Missing)(Unknown Source)
at (Missing)(Unknown Source)
at sdkbox::JNIUtils::GetJNIMethodInfo(_jobject*, char const*, char const*, _JNIEnv*)(Unknown Source)
at void sdkbox::JNIInvoke<void>(_jobject*, char const*)(Unknown Source)
at sdkbox::IAPProxy::requestProducts() const(Unknown Source)
at sdkbox::IAPWrapper::nativeRefresh(std::string const&)(Unknown Source)
at sdkbox::IAPWrapper::refresh()(Unknown Source)
at sdkbox::IAPWrapper::init()(Unknown Source)
at sdkbox::IAP::init()(Unknown Source)
at GameScene::onEnter()(Unknown Source)
at cocos2d::Node::onEnter()(Unknown Source)
at cocos2d::Director::setNextScene()(Unknown Source)
at cocos2d::Director::drawScene()(Unknown Source)
at cocos2d::DisplayLinkDirector::mainLoop()(Unknown Source)
at Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeRender(Unknown Source)
at dvmPlatformInvoke(Unknown Source)
at dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)(Unknown Source)
at (Missing)(Unknown Source)
Right now looks strange, like we made new build but not uploaded it yet to store. So when we running it on mobile device and trying make purchase it showing item is not available for purchase - this due current version is not live in store.
Strange part is that this error triggers SDKBOX as onCanceled listener, I think we should get some more info in this case, instead of calling onCanceled method and getting product id.
You should submit your app first into Google Play as beta.
then create a test account in your developer profile to which the app is submitted, to test IAB’s.
If not, it goes inside the onCancelled().
It would also act so, if you are testing with an unsigned build.
We would request you to keep this as a general guideline when testing IAP’s.
This errors coming from live application, in most cases users downloaded this application 5-10 minutes ago and google analytics show in real time this error, so network should exist in this case for users.
@nite@pabitrapadhy
Right now purchases stats looks really bad, like so many onCancel actions called and when they are mixed with Network Unreachable or Google Play IAB hasn’t been initilized. error it seems to bad and it is blackbox as we can’t get enough info to understand what exactly happens and what causing issue.
Maybe something gone wrong with code integration, like how many time we can call skdbox::iap::init() and when is best time to do this and use refresh(), can we somehow send debug info for each initialized purchase as string?
If purchase validation is done on sdkbox servers, is there possibility that this part failing somehow?
There is screenshot example how many cancle/failed events compared to other In-App events:
Ok, so “Google Play IAB” in most cases coming from disabled wi-fi , just wondring why then Google Analytics show this events “in real time”, it means it have access to internet or it sending backlog.
Did you test if it’s in real-time? It seems it’s just caching the error and transferring it to Google Analytics whenever an internet connection is back again.
Is this error related to some country or service provider?
@pabitrapadhy
How is the plugin implemented? Does it check for the return code of bindService()?