Unity IAP 4.6.0 No such proxy method: onBillingServiceDisconnected()

I just updated to IAP 4.6.0 (Unity 2021.3.18f1) and got a lot of

Exception: No such proxy method:UnityEngine.Purchasing.BillingClientStateListener.onBillingServiceDisconnected()

Exception in Unity’s Cloud Diagnostics. (I don’t see the error in crashlytics)

Almost all of them happens more than a 30 minutes after the game was sent to the background.

I never had this issue in version 4.5.2.

What can be wrong?

1 Like

Hello @domonyiv ,
In 4.6.0 had those changes :

  • Upgraded com.unity.services.core from 1.3.1 to 1.5.2
  • Upgraded com.unity.services.analytics from 4.0.1 to 4.2.0.

I have some questions that might help us fix your bug :
Do you have some logs from Unity’s Cloud Diagnostics ?
Are you able to reproduce it locally ?
Does the exception make your app crash ?

Hi @aVerrecchia

I am using higher versions of the packages:
Core: 1.7.1
Analytics: 4.3.0

  • The Stack Trace field is emtpy in the Cloud Diagnostic, see the attached screenshot (disconnect2.png). I see some warning, but it is not related to this problem and you can see how far apart are the times.(disconnect3.png). Maybe the game sent to the background and some time later the billing library sends the disconnect event?
  • No, I am not able to reproduce it locally.
  • I don’t think it crashes the game, but I see some ANRs at Crashlytics related to purchasing.

I updated to Unity 2021.3.19f1, but I still get the message.

What is “No such proxy method” means?

Can I subscribe to the onBillingServiceDisconnected event somehow?

UPDATE: it seems like it’s causing crash sometimes.

"stack": [{
        "func": "c:com.unity3d.player.ReflectionHelper m:nativeProxyLogJNIInvokeException",
        "file": "null",
        "line": -2
    }, {
        "func": "c:com.unity3d.player.ReflectionHelper m:a",
        "file": "null",
        "line": 0
    }, {
        "func": "c:com.unity3d.player.ReflectionHelper$1 m:invoke",
        "file": "null",
        "line": 55
    }, {
        "func": "c:java.lang.reflect.Proxy m:invoke",
        "file": "Proxy.java",
        "line": 913
    }, {
        "func": "c:$Proxy16 m:onBillingServiceDisconnected",
        "file": "null",
        "line": -1
    }, {
        "func": "c:com.android.billingclient.api.zzaf m:onServiceDisconnected",
        "file": "com.android.billingclient:billing@@4.0.0",
        "line": 4
    }
]

8815933--1199761--disconnect2.png
8815933--1199764--disconnect3.png

Thank you for your feedback @domonyiv and @rvaleev .
4.6.0 sadly introduced a bug with onBillingServiceDisconnected(). Our signature didn’t match google’s which throws “No such proxy method” exceptions.
It will be fixed in our next release.

Thanks for the info, when can we expect the update?

Hi @domonyiv ,
This fix will be included in our next release 4.7.0 going out by March 10th.

2 Likes

We are having this error alot. Very disappointing to see Unity missing out of such a frequent bug.

We will now have to degrade our plugin, re-do all the testing and push a new build.

@Arnaud_Gorain @aVerrecchia Will 4.7.0 be available today as expected?

1 Like

Hi @domonyiv ,
We are on target to have it announced today, stay tuned it’s coming!

1 Like

has it been released? I still don’t see updates in my unity editor

You need to add it manually: Package Manager > “+” > Add package by name … > com.unity.purchasing > 4.7.0.

1 Like

thank you!

@Arnaud_Gorain @aVerrecchia We just released an update that includes 4.6.0, and we are seeing this exception a lot in production. I wonder if you could elaborate on the expected side effects? Will players notice the issue? Will purchasing be broken for them? Will there be app crashes (either user visible or ‘behind the scenes’ when the app is in the background)? What determines if players are affected or not (or is it all players?). We’re reluctant to release a hotfix update unless it’s necessary to, as the release we just pushed out was already a hotfix, and we don’t want to overwhelm players with updates. Thanks in advance,

Andy

Hi @AndyBlock ,
Unfortunately I would suggest to update to 4.7.0, I understand your view and is totally fair.
This impact only the android users, can cause crashes which could be noticeable.

Thus, this is called only when the connection to the billing system was lost. This does not prevent transactions to be successful, so it’s a specific scenario were a transaction would have failed.

@Arnaud_Gorain Okay, thanks for the information; I guess we will need another update then.

Hi guys, we have this issue again after updating to Purchasing 4.9.3 on Unity 2021.3.29f1.

No such proxy method: UnityEngine.Purchasing.SkuDetailsResponseListener.onSkuDetailsResponse(UnityEngine.AndroidJavaObject,null)

Is there a quick way how to fix it? By a custom modifications in Purchasing package?
Thanks you

1 Like

You can find more information in this main thread

1 Like

unfortunately, this thread fixes another problem… and now I’m seeing this error:
No such proxy method: UnityEngine.Purchasing.SkuDetailsResponseListener.onSkuDetailsResponse(UnityEngine.AndroidJavaObject,null)

Hi, I got this on canceling the subscribe payment page.
Exception: No such proxy method: UnityEngine.Purchasing.GooglePurchaseUpdatedListener.onPurchasesUpdated(UnityEngine.AndroidJavaObject,null)

3 Likes

me too…