Search Unity

Bug Exceptions after UUM-30243 fix

Discussion in 'Android' started by DNHND, Jul 25, 2023.

  1. DNHND

    DNHND

    Joined:
    May 7, 2020
    Posts:
    2
    Hello everyone!

    Sorry, if it's not the right place for such questions.

    I believe there is an issue with this fix.

    After updating to one of the versions including the fix, my private proxy methods are no longer being invoked. Also, there is an exception: "No such proxy method" in the console.

    If you look at the method
    public virtual AndroidJavaObject Invoke(string methodName, object[] args)
    of class
    UnityEngine.AndroidJavaProxy
    there you can find the following call:
    MethodInfo[] methods = this.GetType().GetMethods();
    As stated here: Returns all the public methods of the current Type.

    Before this fix, Unity used to search for private methods as well.

    So my suggestion is to replace this call with the following one:
    MethodInfo[] methods = this.GetType().GetMethods(bindingAttr);
    which fixes everything for me.

    Thanks in advance!
     
  2. manugil

    manugil

    Unity Technologies

    Joined:
    Jan 13, 2020
    Posts:
    75
    Hi @DNHND! Has this change caused a regression for you?? If so, please report a bug by clicking on Help > Report a Bug on the editor, and we will look into it.

    If you are able create a minimal reproducible project with a small script that uses AndroidJavaObject for private methods, it will speed up our process quite a bit.

    Thanks!!
     
  3. DNHND

    DNHND

    Joined:
    May 7, 2020
    Posts:
    2
    @manugil, hi! Thanks a lot for your guidance. I've reported a bug and attached the project there.
     
    manugil likes this.
  4. i9mobile

    i9mobile

    Joined:
    Aug 8, 2013
    Posts:
    54
    MajidKhosravi likes this.
  5. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Hi, does it relate to the error?
    Exception: No such proxy method: UnityEngine.Purchasing.GooglePurchaseUpdatedListener.onPurchasesUpdated(UnityEngine.AndroidJavaObject,null)
     
    Peanut1107 likes this.
  6. manugil

    manugil

    Unity Technologies

    Joined:
    Jan 13, 2020
    Posts:
    75
    Hey @i9mobile and @hippogames, Great news! A fix for this specific issue is on the way and will be available soon. You can keep track of its progress as it gets merged into the various Unity versions on our issue tracker.

    → Link to issue tracker (UUM-44752)

    The issue is fixed for:
    - 2021.3.31f1
    - 2022.3.10f1
    - 2023.1.13f1
    - 2023.2.0b9
    - 2023.3.0a1
     
    i9mobile likes this.
  7. gagasik

    gagasik

    Joined:
    Jul 29, 2019
    Posts:
    25
    Hey. Could you please let us know when it will be available approx? Also does upgrading to Unity 2022.4 solve the issue for now?
     
  8. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    You can also pick any version with no UUM-30243 like 2021.3.28 or 2022.3.4. I've checked both.
     
  9. gagasik

    gagasik

    Joined:
    Jul 29, 2019
    Posts:
    25
    Thank you
     
  10. gagasik

    gagasik

    Joined:
    Jul 29, 2019
    Posts:
    25
    What do you think about 2022.3.8f1 ?
     
  11. gagasik

    gagasik

    Joined:
    Jul 29, 2019
    Posts:
    25
    2022.3.8f1 have the issue as well. Will try 2022.3.4
     
  12. gagasik

    gagasik

    Joined:
    Jul 29, 2019
    Posts:
    25
    2022.3.4 works without issue, I can confirm too. Thanks for you reply once again
     
  13. i9mobile

    i9mobile

    Joined:
    Aug 8, 2013
    Posts:
    54
    waiting for it!
     
  14. CrazyCod3r

    CrazyCod3r

    Joined:
    Aug 11, 2021
    Posts:
    10
    Could someone tell me why this issue marked as "Resolved"?..
    I still have to use Unity 2022.3.4f1 LTS because all later releases have the same bug.
     
  15. CrazyCod3r

    CrazyCod3r

    Joined:
    Aug 11, 2021
    Posts:
    10
    Hi manugil, Could you please add information to the tracker that all LTS versions from 2022.3.5f1 through 2022.3.9f1 contain the same issue?

    And also is it possible to tell when it could be fixed for the LTS branch?

    Thank you!
     
  16. manugil

    manugil

    Unity Technologies

    Joined:
    Jan 13, 2020
    Posts:
    75
    2022.3.10f1 has already been released and you can download it here.
     
    CrazyCod3r likes this.
  17. CrazyCod3r

    CrazyCod3r

    Joined:
    Aug 11, 2021
    Posts:
    10
    Thank you!
    I can confirm that the exception doesn't come up anymore with the 2022.3.10f1 version on my test devices.
     
  18. Sality

    Sality

    Joined:
    Dec 16, 2013
    Posts:
    21
    Hi @manugil You can also update 2021.3.30 because there is an error and there are no updates
     
  19. manugil

    manugil

    Unity Technologies

    Joined:
    Jan 13, 2020
    Posts:
    75
    2021.3 release follows a 1-month cadence. 2021.3.31f1 is expected to be released on October 4th.

    If this is blocking your development, please use 2021.3.28f1 in the meantime, as the bug should not be present in that release.
     
    pixelsprite_unity and hippogames like this.
  20. Sality

    Sality

    Joined:
    Dec 16, 2013
    Posts:
    21
    tnk for so fast reply. we will wait