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

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

3497810–278710–crashlog_billingservicemanager.txt (43.7 KB)

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.

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

is there a ETA for next version release @unityjingyao

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.

Thanks for informing. Hope it is out as soon as possible.

Hi @unityjingyao

any news on this?

Regards;
Engin

Hi @engin_gg ,
v1.19.0 has been released today, please update Unity IAP to the latest version.
Thank you for your patience!

Thanks @unityjingyao

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

Do these devices have Google Play installed?

Hi @jianzhou73 ,
Could you please send us a full log?
How many cases have you got?

not sure.It’s collected by fabric.

I cant get more.
two cases.

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

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.

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)

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?

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.” :frowning:

@Nunterfal Yes, that is correct. Are you able to upgrade to a more recent version of Unity?