User Tag List

Results 1 to 3 of 3

Thread: Is anyone familiar with these in-app purchase errors?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2014
    Posts
    190
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Is anyone familiar with these in-app purchase errors?

    So, I've been having recurring errors with in-app purchases ever since my game was first published back in 2016, with a crash rate of around 3%, and I was wondering if anyone around here recognizes these errors and has found a way to get around them?

    So far, the most I've managed to do to reduce these errors is lessen the number of calls to the in app purchase function, but I haven't found a way to actually make the in app purchases no longer cause errors. Here are the two errors, below:

    1) at Extensions.InAppControl.querySkuDetails (InAppControl.java:755)
    at Extensions.InAppControl.queryInventory (InAppControl.java:871)
    at Extensions.InAppControl.queryInventory (InAppControl.java:829)
    at Extensions.InAppControl$3.run (InAppControl.java:927)
    at java.lang.Thread.run (Thread.java:764)

    2) at Extensions.InAppControl.queryPurchases (InAppControl.java:668)
    at Extensions.InAppControl.queryInventory (InAppControl.java:865)
    at Extensions.InAppControl.queryInventory (InAppControl.java:829)
    at Extensions.InAppControl$3.run (InAppControl.java:927)
    at java.lang.Thread.run (Thread.java:761)

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)

    Join Date
    May 2014
    Posts
    190
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    In case anyone stumbles across this thread, I think I've finally managed to figure out where most of these errors are coming from. The error with 'querySkuDetails' seems to be coming from the 'query inventory' action from the In App purchase object, and the 'queryPurchases' error is most likely coming from the 'is sku purchased?' condition. It seems that the calls to these functions are getting interrupted on some mobile devices by going from one frame to another while the query is still running, and this crashes the app on some mobile phones.

    I can't reproduce the issue on any of my mobile devices, because even if the query is running and I try to go to a different frame, I still can't get the game to crash, but this is almost certainly what's happening on other mobile devices, because after I took measures to prevent this from happening, the number of crashes decreased quite drastically. I'm not even sure if this is a device specific thing, because I saw this error on Samsung S3 phones, and I never encountered this error back when I had a samsung S3 phone. It might be something more specific, like for example, the crash only occurs if the player goes from one frame to the other, and the phone is really low on memory so it can't handle the operation properly.

    Either way, what I did to prevent the first error from happening is that I now have a condition in place, so that a player can't advance to another frame until the query inventory finishes. More specifically, I made a 'query running' variable which I set to 1 when I run the query inventory function, and then I set it back to 0 when I receive the results of the query, through the 'on query inventory' event. For the second error, I made it so that the 'is sku purchased' event only triggers after pressing the purchase button, so that there is less risk of the query getting interrupted by someone passing into another frame. As far as I could tell, there isn't a way to verify if this query is still running or not, so this was the only measure I could think of to avoid crashes.

    @Fernando I noticed in the patch notes of the new Beta version that there is this line: InApp Object: protection to avoid some unpredictable situations.

    Would this by any chance prevent the errors mentioned in this thread from crashing the app, or is it for something else? Also, if this is what the patch note refers to, would it be possible to do something similar for the Google Play Games object? I'm also getting errors for the cloud saves, and I think the reasons may be similar (query gets interrupted by going from one frame to another), but I don't think there is an event to check if the writing of a snapshot is finished or not.

    Edit: Just to be clear, I am not currently using the Beta version, so I don't know if I would still be getting the in app purchase errors on the Beta or not.

    Below is the error I'm getting for cloud:

    at Extensions.CRunGPGCloud.writeSnapshot (CRunGPGCloud.java:809)
    at Extensions.CRunGPGCloud.access$700 (CRunGPGCloud.java:41)
    at Extensions.CRunGPGCloud$3$1.run (CRunGPGCloud.java:864)
    at android.app.Activity.runOnUiThread (Activity.java:6281)
    at Extensions.CRunGPGCloud$3.onPostExecute (CRunGPGCloud.java:858)
    at Extensions.CRunGPGCloud$3.onPostExecute (CRunGPGCloud.java:840)
    at android.os.AsyncTask.finish (AsyncTask.java:695)
    at android.os.AsyncTask.-wrap1 (Unknown Source)
    at android.os.AsyncTask$InternalHandler.handleMessage (AsyncTask.java:712)
    at android.os.Handler.dispatchMessage (Handler.java:105)
    at android.os.Looper.loop (Looper.java:164)
    at android.app.ActivityThread.main (ActivityThread.java:6938)
    at java.lang.reflect.Method.invoke (Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller .run (Zygote.java:327)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleXNA Export Module
    Dobermann's Avatar
    Join Date
    Feb 2009
    Location
    France
    Posts
    630
    Mentioned
    24 Post(s)
    Tagged
    0 Thread(s)
    I'm gettings lots of InApp errors too, like :

    java.lang.NullPointerException: Extensions.InAppControl.querySkuDetails
    at Extensions.InAppControl.querySkuDetails (InAppControl.java:763)
    at Extensions.InAppControl.queryInventory (InAppControl.java:879)
    at Extensions.InAppControl.queryInventory (InAppControl.java:837)
    at Extensions.InAppControl$3.run (InAppControl.java:935)
    at java.lang.Thread.run (Thread.java:764)
    and

    java.lang.NullPointerException: Extensions.InAppControl.queryPurchases
    at Extensions.InAppControl.queryPurchases (InAppControl.java:683)
    at Extensions.InAppControl.queryInventory (InAppControl.java:873)
    at Extensions.InAppControl.queryInventory (InAppControl.java:837)
    at Extensions.InAppControl$3.run (InAppControl.java:935)
    at java.lang.Thread.run (Thread.java:761)
    Seems to be the sames as you mentionned in your first post, a fix should be welcome.

    My third most crahes reports are not related to InApp but here it is:
    java.lang.IllegalArgumentException: Runtime.SurfaceView.createSurface
    at com.google.android.gles_jni.EGLImpl._eglCreateWind owSurface (Native Method)
    at com.google.android.gles_jni.EGLImpl.eglCreateWindo wSurface (EGLImpl.java:92)
    at Runtime.SurfaceView.createSurface (SurfaceView.java:285)
    at Runtime.SurfaceView.swapBuffers (SurfaceView.java:160)
    at RunLoop.CRun.screen_Update (CRun.java:3062)
    at RunLoop.CRun.f_GameLoop (CRun.java:5508)
    at RunLoop.CRun.doRunLoop (CRun.java:595)
    at Application.CRunApp.loopFrame (CRunApp.java:1065)
    at Application.CRunApp.playApplication (CRunApp.java:795)
    at Application.CRunTimerTask.run (CRunTimerTask.java:51)
    at android.os.Handler.handleCallback (Handler.java:739)
    at android.os.Handler.dispatchMessage (Handler.java:95)
    at android.os.Looper.loop (Looper.java:135)
    at android.app.ActivityThread.main (ActivityThread.java:5343)
    at java.lang.reflect.Method.invoke (Native Method)
    at java.lang.reflect.Method.invoke (Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run (ZygoteInit.java:905)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:700)

Similar Threads

  1. In-App Purchase
    By SoftWarewolf in forum Android Export Module Version 2.0
    Replies: 8
    Last Post: 22nd September 2013, 04:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •