Search Unity

Bug Unity IAP 4.6.0 No such proxy method: onBillingServiceDisconnected()

Discussion in 'Unity IAP' started by domonyiv, Feb 16, 2023.

  1. domonyiv

    domonyiv

    Joined:
    Oct 1, 2016
    Posts:
    76
    I just updated to IAP 4.6.0 (Unity 2021.3.18f1) and got a lot of

    Code (CSharp):
    1. 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?
     
    Last edited: Feb 16, 2023
    hamman8888 likes this.
  2. aVerrecchia

    aVerrecchia

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    34
    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 ?
     
  3. domonyiv

    domonyiv

    Joined:
    Oct 1, 2016
    Posts:
    76
    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.

    Code (CSharp):
    1.  
    2. "stack": [{
    3.         "func": "c:com.unity3d.player.ReflectionHelper m:nativeProxyLogJNIInvokeException",
    4.         "file": "null",
    5.         "line": -2
    6.     }, {
    7.         "func": "c:com.unity3d.player.ReflectionHelper m:a",
    8.         "file": "null",
    9.         "line": 0
    10.     }, {
    11.         "func": "c:com.unity3d.player.ReflectionHelper$1 m:invoke",
    12.         "file": "null",
    13.         "line": 55
    14.     }, {
    15.         "func": "c:java.lang.reflect.Proxy m:invoke",
    16.         "file": "Proxy.java",
    17.         "line": 913
    18.     }, {
    19.         "func": "c:$Proxy16 m:onBillingServiceDisconnected",
    20.         "file": "null",
    21.         "line": -1
    22.     }, {
    23.         "func": "c:com.android.billingclient.api.zzaf m:onServiceDisconnected",
    24.         "file": "com.android.billingclient:billing@@4.0.0",
    25.         "line": 4
    26.     }
    27. ]
    28.  
    29.  
     

    Attached Files:

    Last edited: Feb 19, 2023
  4. aVerrecchia

    aVerrecchia

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    34
    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.
     
  5. domonyiv

    domonyiv

    Joined:
    Oct 1, 2016
    Posts:
    76
    Thanks for the info, when can we expect the update?
     
  6. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    Hi @domonyiv,
    This fix will be included in our next release 4.7.0 going out by March 10th.
     
    csababerenyi and domonyiv like this.
  7. abdullahdar

    abdullahdar

    Joined:
    Aug 10, 2020
    Posts:
    10
    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.
     
  8. domonyiv

    domonyiv

    Joined:
    Oct 1, 2016
    Posts:
    76
    hamman8888 likes this.
  9. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    Hi @domonyiv,
    We are on target to have it announced today, stay tuned it's coming!
     
    domonyiv likes this.
  10. hamman8888

    hamman8888

    Joined:
    Mar 23, 2016
    Posts:
    4
    has it been released? I still don't see updates in my unity editor
     
  11. domonyiv

    domonyiv

    Joined:
    Oct 1, 2016
    Posts:
    76
    You need to add it manually: Package Manager > "+" > Add package by name ... > com.unity.purchasing > 4.7.0.
     
    hamman8888 likes this.
  12. hamman8888

    hamman8888

    Joined:
    Mar 23, 2016
    Posts:
    4
    thank you!
     
  13. AndyBlock

    AndyBlock

    Joined:
    Oct 12, 2016
    Posts:
    35
    @agorain @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
     
  14. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    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.
     
  15. AndyBlock

    AndyBlock

    Joined:
    Oct 12, 2016
    Posts:
    35
    @agorain Okay, thanks for the information; I guess we will need another update then.
     
  16. terahype

    terahype

    Joined:
    Mar 31, 2022
    Posts:
    1
    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
     
    jperry_oddgames likes this.
  17. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    You can find more information in this main thread
     
    jperry_oddgames likes this.
  18. i9mobile

    i9mobile

    Joined:
    Aug 8, 2013
    Posts:
    54
    unfortunately, this thread fixes another problem... and now I'm seeing this error:
    No such proxy method: UnityEngine.Purchasing.SkuDetailsResponseListener.onSkuDetailsResponse(UnityEngine.AndroidJavaObject,null)
     
  19. Jujugames

    Jujugames

    Joined:
    Jun 14, 2023
    Posts:
    1
    Hi, I got this on canceling the subscribe payment page.
    Exception: No such proxy method: UnityEngine.Purchasing.GooglePurchaseUpdatedListener.onPurchasesUpdated(UnityEngine.AndroidJavaObject,null)
     
    GleyGames, RaceCat and rusildo like this.
  20. raofr_msn

    raofr_msn

    Joined:
    Aug 23, 2019
    Posts:
    2
    me too....
     
  21. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    143
    Unity 2021.3.29
    In App Purchasing 4.9.4
    Error:
    Non-fatal Exception: java.lang.Exception: Exception : No such proxy method: UnityEngine.Purchasing.SkuDetailsResponseListener.onSkuDetailsResponse(UnityEngine.AndroidJavaObject,null)
     
  22. i9mobile

    i9mobile

    Joined:
    Aug 8, 2013
    Posts:
    54
    IndieFist likes this.
  23. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Hi! The same error reported by my app users. Any fixes/workarounds?
     
  24. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    @Arnaud_Gorain
    @i9mobile
    Hi! Yes UUM-30243 causes issues with IAP.

    In my case, OnPurchaseFailed (I expect PurchaseFailureReason.DuplicateTransaction) is not called in Unity 2022.3.8 and there is the error in logs:
    Exception: No such proxy method: UnityEngine.Purchasing.GooglePurchaseUpdatedListener.onPurchasesUpdated
    when purchasing an item that was purchased before (PurchaseFailureReason.DuplicateTransaction is expected but not received)


    But OnPurchaseFailed is called in Unity 2022.3.4 (the latest version with no UUM-30243)

    The issue doesn't depend on IAP version (tested witn 4.7.0, 4.8.0, 4.9.4)

    I've created the bug IN-52913
     
  25. Sality

    Sality

    Joined:
    Dec 16, 2013
    Posts:
    21
    Hi! The same error reported by my app users. After reload device starting work, but after any time bug again
     
  26. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Hello! We're still waiting for Unity 2021.3.31 where this bug should be fix. Do you know when it's planned to be available?
     
    Last edited: Sep 28, 2023
  27. Sality

    Sality

    Joined:
    Dec 16, 2013
    Posts:
    21
    We have softlunch very soon, we’ve been waiting for half a month, an update has already been released for 2022, there is no update for 2021. We'll have to risk switching to 22
     
  28. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
  29. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Thanks! We saw, it's OCT 4.