Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Service not registered: com.unity.purchasing.googleplay.BillingServiceManager

Discussion in 'Unity IAP' started by engin_gg, May 15, 2018.

  1. engin_gg

    engin_gg

    Joined:
    Dec 9, 2016
    Posts:
    14
    Hi;

    We are getting the following crash report from our Android builds. I could not find the main reason. I've added the full crash log to the thread. Anyone has any idea?

    Caused by java.lang.IllegalArgumentException: Service not registered: com.unity.purchasing.googleplay.BillingServiceManager$1@327b644
    at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1642)
    at android.app.ContextImpl.unbindService(ContextImpl.java:1818)
    at android.content.ContextWrapper.unbindService(ContextWrapper.java:697)
    at com.unity.purchasing.googleplay.BillingServiceManager$1$1.run(BillingServiceManager.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:784)

    Unity version : 5.6.5p1
    UnityIAP version : 1.17.0
    Android OS Versions : 8, 7, 6, 5
     

    Attached Files:

  2. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    189
    Hi @engin_gg ,
    It's a known issue and we are working on fixing it.
    The fix will be included in next version of Unity IAP.
    Could you please offer us the steps to reproduce this issue? Thank you.
     
  3. engin_gg

    engin_gg

    Joined:
    Dec 9, 2016
    Posts:
    14
    Hi;

    Currently we are seeing this issue on crash reports, trying locally. there are 2 brands we heavily see this issue. the devices for those brands are:

    HUAWEI:
    FIG-LX1 25%
    VTR-L09 17%
    MHA-L29 11%
    STF-L09 9%
    BND-L21 4%
    EML-L29 4%
    LLD-L31 4%
    FIG-LA1 4%
    AGS-L09 4%
    KOB-L09 2%
    HUAWEI P9 lite 2%
    WAS-LX1A 2%
    EML-L09 2%
    ALP-L29 2%
    PRA-LA1 2%
    AGS-W09 2%
    ANE-LX1 2%

    OPPO:
    CPH1701 26%
    CPH1609 15%
    CPH1607 15%
    CPH1715 10%
    CPH1611 10%
    CPH1707 6%
    X9009 6%
    CPH1723 4%
    CPH1719 2%
    CPH1819 2%
    CPH1721 2%
    CPH1801 2%


    Operating Systems
    Android 8 45%
    Android 6 36%
    Android 7 16%
    Android 5 3%

    96% Proximity On and 75% App In Background
     
  4. engin_gg

    engin_gg

    Joined:
    Dec 9, 2016
    Posts:
    14
  5. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    189
    Hi @engin_gg ,
    I'm sorry that I couldn't give you an ETA, but it's in QA now.
    So it should be released soon.
     
  6. engin_gg

    engin_gg

    Joined:
    Dec 9, 2016
    Posts:
    14
    Thanks for informing. Hope it is out as soon as possible.
     
  7. engin_gg

    engin_gg

    Joined:
    Dec 9, 2016
    Posts:
    14
  8. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    189
    Hi @engin_gg ,
    v1.19.0 has been released today, please update Unity IAP to the latest version.
    Thank you for your patience!
     
  9. engin_gg

    engin_gg

    Joined:
    Dec 9, 2016
    Posts:
    14
  10. jianzhou73

    jianzhou73

    Joined:
    Feb 15, 2017
    Posts:
    4
    HI,@unityjingyao
    This problem still exists in v1.19.0.
    Caused by java.lang.IllegalArgumentException: Service not registered: com.unity.purchasing.googleplay.BillingServiceManager$1@6f06557
    at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1191)
    at android.app.ContextImpl.unbindService(ContextImpl.java:1393)
    at android.content.ContextWrapper.unbindService(ContextWrapper.java:627)
    at com.unity.purchasing.googleplay.BillingServiceManager$1$1.run(BillingServiceManager.java:53)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at java.lang.Thread.run(Thread.java:818)

    Unity version : 5.6.4p4 Device model : OPPO CPH1715
     
    Last edited: Jun 23, 2018
  11. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,597
    Do these devices have Google Play installed?
     
  12. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    189
    Hi @jianzhou73 ,
    Could you please send us a full log?
    How many cases have you got?
     
  13. jianzhou73

    jianzhou73

    Joined:
    Feb 15, 2017
    Posts:
    4
    not sure.It's collected by fabric.
     
  14. jianzhou73

    jianzhou73

    Joined:
    Feb 15, 2017
    Posts:
    4
    I cant get more.
    two cases.
     
  15. jianzhou73

    jianzhou73

    Joined:
    Feb 15, 2017
    Posts:
    4
    Other problems:

    Caused by java.lang.RuntimeException: Unable to start activity ComponentInfo{com.blowfire.wildclassic/com.unity.purchasing.googleplay.PurchaseActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.unity.purchasing.googleplay.Inventory.hasDetails(java.lang.String)' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3003)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3064)
    at android.app.ActivityThread.-wrap14(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1659)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6823)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:145



    Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.unity.purchasing.googleplay.Inventory.hasDetails(java.lang.String)' on a null object reference
    at com.unity.purchasing.googleplay.GooglePlayPurchasing.addFreeTrialAndIntroPriceFlagToDeveloperPayload(GooglePlayPurchasing.java:205)
    at com.unity.purchasing.googleplay.GooglePlayPurchasing.StartPurchase(GooglePlayPurchasing.java:127)
    at com.unity.purchasing.googleplay.GooglePlayPurchasing.ContinuePurchase(GooglePlayPurchasing.java:85)
    at com.unity.purchasing.googleplay.PurchaseActivity.onCreate(PurchaseActivity.java:45)
    at android.app.Activity.performCreate(Activity.java:6977)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3064)
    at android.app.ActivityThread.-wrap14(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1659)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6823)
    @unityjingyao
     
  16. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    189
    Hi @jianzhou73 ,
    Thank you for your feedback!
    Is it possible to send me more log messages from fabric?
    Was there a "Failed to Query inventory" message?
    I am suspecting `QueryInventory` failed but somehow it still initiates a purchase activity, then it will get an inventory null exception.
     
  17. msureka83

    msureka83

    Joined:
    Nov 28, 2014
    Posts:
    30
    Hello,

    Facing the issue too. Pls check the log below, collected by Google Play Vitals.

    java.lang.IllegalArgumentException:
    at android.app.LoadedApk.forgetServiceDispatcher (LoadedApk.java:1642)
    at android.app.ContextImpl.unbindService (ContextImpl.java:1818)
    at android.content.ContextWrapper.unbindService (ContextWrapper.java:697)
    at com.unity.purchasing.googleplay.BillingServiceManager$1$1.run (BillingServiceManager.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
    at java.lang.Thread.run (Thread.java:784)

    Mostly reported on: Huawei Mate 10 lite (HWRNE)
    OS: Android 8.0 & 8.1

    Using Unity 5.6.5 (Not sure about IAP plugin version)
     
  18. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,597
    We have made improvements in IAP version 1.20 in this area, can you confirm? Have you been able to reproduce on an actual device?
     
  19. Nunterfal

    Nunterfal

    Joined:
    Nov 3, 2011
    Posts:
    9
    Also have this issue, but using Unity 5.3.8 which incompatible with IAP version 1.20, regarding to Asset Store information "Minimum supported is Unity version 5.4." :(
     
  20. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,597
    @Nunterfal Yes, that is correct. Are you able to upgrade to a more recent version of Unity?
     
  21. Nunterfal

    Nunterfal

    Joined:
    Nov 3, 2011
    Posts:
    9
    @JeffDUnity3D unfortunately, it's not an option for us now, we are planning migration, but not now
     
  22. LukasH

    LukasH

    Joined:
    May 16, 2014
    Posts:
    10
    We are also seeing a lot of these crashes using Unity 5.6.5p2. It seems to be Android 8.x (and Huawei?) related but we can't reproduce on small selection of our devices.

    One major issue with Unity IAPs is your update policy. Please don't continuously add new features combined with bugfixes but release minor versions with only(!) bugfixes. I'm sorry to say but every major has new issues and we don't want to be your guinea pig. The last stable release was v1.13.3.

    upload_2018-7-16_8-57-28.png
     
  23. Wolar

    Wolar

    Joined:
    Sep 25, 2014
    Posts:
    8
    We are having this issue as well on latest version of Unity and IAP

    Unity: 2018.2.0f2
    In App Purchasing: 2.0.3 (Package Manager Version)
    Android: 5,6,7,8
    Devices: Huawei and OPPO

    Caused by java.lang.IllegalArgumentException: Service not registered: com.unity.purchasing.googleplay.BillingServiceManager$1@6faf975
    at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1642)
    at android.app.ContextImpl.unbindService(ContextImpl.java:1818)
    at android.content.ContextWrapper.unbindService(ContextWrapper.java:697)
    at com.unity.purchasing.googleplay.BillingServiceManager$1$1.run(BillingServiceManager.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:784)

    We are unable to reproduce this issue locally, we only have this data from Fabric.

    Specific Huawei Devices:
    FIG-LX1
    13%
    WAS-LX1
    12%
    EML-L29
    12%
    WAS-LX1A
    12%
    ANE-LX1
    11%
    PRA-LX1
    8%
    RNE-L21
    6%
    LLD-L31
    4%
    LDN-L21
    4%
    VTR-L09
    4%
    BND-L21
    2%
    FLA-LX1
    2%
    RNE-L01
    2%
    RNE-L22
    2%
    MHA-L29
    2%
    SHT-W09
    2%
    STF-L09
    2%

    Specific OPPO Devices:
    CPH1723
    34%
    CPH1609
    21%
    A1601
    13%
    CPH1707
    8%
    CPH1819
    8%
    CPH1719
    4%
    CPH1729
    4%
    CPH1715
    4%
    CPH1607
    4%
     
  24. Wolar

    Wolar

    Joined:
    Sep 25, 2014
    Posts:
    8
    By the way I wanted to implement "SetApplePromotionalPurchaseInterceptorCallback" later today but it was not available so I checked the version again. Package manager kept telling me that my version is 2.0.3. but when I entered services -> InAppPurchases, it told me that I have old version and that I should update to the newer version so I did.

    So now the package manager is still telling me that I have 2.0.3 but I'm 100% sure I have update the InAppPurchasing module but in that case I have no idea what version I had before and what version I have now?!
     
  25. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    189
    Hi @Wolar ,
    Unity IAP has two parts. One part is in the engine which you can see in Package Manager and the other part is the plugin which you can integrate from the Services window.
    The latest version of Unity IAP plugin is 1.20.0.
    The version you got the issue should be an old one.
     
  26. Wolar

    Wolar

    Joined:
    Sep 25, 2014
    Posts:
    8
    Thank you, now I understand it was a little bit confusing, I have updated the plugin, I will let you know if it resolved the issue
     
  27. giawa

    giawa

    Joined:
    Dec 6, 2015
    Posts:
    7
    We see this issue with Unity IAP 2.0.3 in Unity 2018.2.6f1. It affects Oppo and Huawei devices.


    Caused by java.lang.IllegalArgumentException
    Service not registered: com.unity.purchasing.googleplay.BillingServiceManager$1@6c75c46
    android.app.LoadedApk.forgetServiceDispatcher (LoadedApk.java:1612)
    android.app.ContextImpl.unbindService (ContextImpl.java:1708)
    android.content.ContextWrapper.unbindService (ContextWrapper.java:714)
    com.unity.purchasing.googleplay.BillingServiceManager$1$1.run (BillingServiceManager.java:46)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
    java.lang.Thread.run (Thread.java:764)


    Is there anything we can do to avoid this? I'm guessing that these devices do not have the Google Play store installed on them, and use their manufacturers third party store. I have no means to back up this assumption though.
     
  28. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,597
    @giawa That is possible. You shared the package version, can you share the IAP version also? Window/Unity IAP/IAP Updates. You should be using 1.20.1, currently the latest release. Do you have such a device, is Google Play installed by default?
     
  29. giawa

    giawa

    Joined:
    Dec 6, 2015
    Posts:
    7
    Hi Jeff,

    Sorry, not sure how to tell the IAP version. I just opened the 'Packages' window in Unity and it shows 'In App Purchasing' 2.0.3. I tried looking under the Services window as you mentioned above, but I don't see anything about a version.

    I do not have such a device, but I have dealt with some phones from Asia that did not have Google Play installed, so that is just my running theory at this time.

    Edit: In-app Purchasing from the Services window says "Unity IAP is up to date"

    Edit 2: I didn't grok "Window/Unity IAP/IAP Updates" as file menus to open. I thought you were telling me that IAP has updates from time to time or something. I'll use this going forward.
     
    Last edited: Nov 9, 2018 at 1:54 AM
  30. giawa

    giawa

    Joined:
    Dec 6, 2015
    Posts:
    7
    Alright, sorry I found the version in changelog.md. It was still 1.18.0. Not sure why I wasn't prompted to update it, but I installed 1.20.1. I'll try submitting that build to see if that fixes the issue.
     
  31. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,597