Search Unity

Unity3d nullpointerexception in the IAP core while using ALPS from asset store

Discussion in 'Unity IAP' started by neckrevolution, Feb 28, 2019.

  1. neckrevolution

    neckrevolution

    Joined:
    Oct 5, 2015
    Posts:
    3
    I am trying to make a live wallpaper app with IAPs. My guess is that the Live Wallpaper doesn't use the UI thread. In the Unity editor the Live Wallpaper works fine but building throws me a NullPointerException. The logcat's log:

    Code (CSharp):
    1.  
    2.  
    3. OnInitialized: PASS
    4.  
    5. 02-25 00:37:10.558 27955 27973 I
    6. Unity   :
    7.  
    8. 02-25 00:37:10.558 27955 27973 I
    9. Unity   : (Filename:
    10. ./Runtime/Export/Debug.bindings.h
    11. Line: 45)
    12.  
    13. 02-25 00:37:10.558 27955 27973 I
    14. Unity   :
    15.  
    16. 02-25 00:37:10.599 27955 27973 E
    17. Unity   : AndroidJavaException:
    18. java.lang.NullPointerException:
    19. Attempt to invoke virtual method  'android.app.ActivityThread$Application
    20. Thread   android.app.ActivityThread.getApplicationThread()'
    21. on a null object reference
    22.  
    23. 02-25 00:37:10.599 27955 27973 E
    24. Unity   :
    25. java.lang.NullPointerException:
    26. Attempt to invoke virtual method 'android.app.ActivityThread$ApplicationThread  android.app.ActivityThread.getApplicationThread()'
    27. on a null object reference
    28.  
    29. 02-25 00:37:10.599 27955 27973 E
    30. Unity   :      at  android.app.Activity.startActivityForResult(Activity.java:4392)
    31.  
    32. 02-25 00:37:10.599 27955 27973 E
    33. Unity   :      at android.app.Activity.startActivityForResult(Activity.java:4335)
    34.  
    35. 02-25 00:37:10.599 27955 27973 E Unity   :      at android.app.Activity.startActivity(Activity.java:4702)
    36.  
    37. 02-25 00:37:10.599 27955 27973 E Unity   : at android.app.Activity.startActivity(Activity.java:4670)
    38.  
    39. 02-25 00:37:10.599 27955 27973 E Unity   :      at com.unity.purchasing.googleplay.ActivityLauncher.startActivity(ActivityLauncher.java:19)
    40.  
    41. 02-25 00:37:10.599 27955 27973 E Unity   :      at com.unity.purchasing.googleplay.GooglePlayPurchasing.Purchase(GooglePlayPurchasing.java:718)
    42.  
    43. 02-25 00:37:10.599 27955 27973 E Unity   :      at com.unity.purchasing.common.StoreDeserializer.Purchase(StoreDeserializer.java:17)
    44.  
    45. 02-25 00:37:10.599 27955 27973 E Unity   :      at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If this issue is due to the Asset you imported, then it is up to the Asset developer to fix it. If your app works without the asset, and you get the error with it, then it is up to the Asset developer to support their product. If you have contacted them, have they reproduced? If the asset is using IAP, suggest to them to make sure they are using the latest version of IAP (1.20.1)
     
  3. neckrevolution

    neckrevolution

    Joined:
    Oct 5, 2015
    Posts:
    3
    Yes the IAP works without the asset, i already conntacted with the developer and he is going to repair it.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    May I ask, then why did you open the same support ticket 2 days ago, and post here again, if they already said they were going to repair it?
     
  5. neckrevolution

    neckrevolution

    Joined:
    Oct 5, 2015
    Posts:
    3
    Sorry for my annoying behaviour i just thinked that the error comes from unity's iap not covering something. At the end i had to agree that the problem is with thi assets incompatibility with IAP.
    Thanks for your time.