Search Unity

[Solved] [Android] java.lang.NullPointerException - Fatal Exception - IabHelper

Discussion in 'Unity IAP' started by adbourdages, Oct 29, 2016.

Thread Status:
Not open for further replies.
  1. adbourdages

    adbourdages

    Joined:
    Jul 8, 2012
    Posts:
    75
    Woke up this morning to discover a new type of crash in the Android console. Something going on in Unity's purchasing code according to the stack (and I don't see any callback methods in there - appears to be all in the java code). It is apparently reproducible because it looks like the same user have the problem multiple times.

    Here are all the details I have:

    java.lang.Error: FATAL EXCEPTION [pool-14-thread-1]
    Unity version : 5.3.5f1
    Device model : samsung SM-T560
    Device fingerprint: samsung/gtelwifixx/gtelwifi:4.4.4/KTU84P/T560XXU0AOK1:user/release-keys
    Caused by: java.lang.NullPointerException
    at android.os.Parcel.readException(Parcel.java:1478)
    at android.os.Parcel.readException(Parcel.java:1426)
    at com.android.vending.billing.IInAppBillingService$Stub$Proxy.isBillingSupported(IInAppBillingService.java:208)
    at com.unity.purchasing.googleplay.IabHelper.finishSetup(IabHelper.java:221)
    at com.unity.purchasing.googleplay.IabHelper.access$000(IabHelper.java:72)
    at com.unity.purchasing.googleplay.IabHelper$1.workWith(IabHelper.java:210)
    at com.unity.purchasing.googleplay.BillingServiceManager$2.run(BillingServiceManager.java:133)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:841)

    Here are the device details:
    Manufacturer Samsung
    Android version Android 4.4
    RAM (MB) 1536
    Screen size 800 × 1280
    Screen density (dpi) 160
    OpenGL ES version 2.0
    Native platform armeabi-v7a
    CPU make Spreadtrum
    CPU model SC7730SE
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @adbourdages

    We're not sure what would cause that error. Could you try an uninstall / reinstall of the Google Play store and clearing Google play app cache.

    The workaround would be to catch the exception and fail more gracefully.
     
  3. adbourdages

    adbourdages

    Joined:
    Jul 8, 2012
    Posts:
    75
    Unfortunately it is from an anonymous crash report shown on Android dev console. I don't have access to the device that's causing the trouble.

    Also, I'm not sure how I'd go about catching the expression? All the stack appears to be in java-land and running directly from the main thread. Any suggestion on how to do that?
     
  4. Tab1bit0

    Tab1bit0

    Joined:
    May 24, 2014
    Posts:
    2
    I have the same crash report on exactly the same device.
    I was wondering if there's any progress on the issue?
     
  5. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @adbourdages & @Tab1bit0

    This looks like it is a failure of Google's IAB Service. It might be worth submitting a bug report to their IAB github page or some other Google support area.

    It could be a low memory issue, where the billing service is killed to free memory and then throws errors when it the app tries to use it.
     
Thread Status:
Not open for further replies.