Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

2021.2.0a19 firebase_unity_sdk_7.2.0 AmbiguousMatchException: Ambiguous match found.

Discussion in '2021.2 Beta' started by BasTitan, Jun 4, 2021.

  1. BasTitan

    BasTitan

    Joined:
    Jun 28, 2018
    Posts:
    2
    I imported FirebaseAuth.unitypackage and FirebaseFirestore.unitypackage in the new Alpha (new URP-Project) and get these two errors, which i did not get in 2021.2.0a17

    https://firebase.google.com/docs/unity/setup

    Error 1:


    Error 2:
     
  2. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    I'm getting the AmbiguousMatchException spam too, but it's about AndroidResolver.
     
  3. tab1887

    tab1887

    Joined:
    Mar 5, 2018
    Posts:
    5
    I'm getting the same error in 2021.2.0a19 and 2021.2.0a20 as well, which prevents me from testing the Apple Silicon version with my main project.
    Are there any workarounds for this?
     
  4. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi everybody,

    If you're affected by these errors after upgrading, it would be much appreciated if you could submit a bug report with a minimal reproduction project attached so we can investigate.
     
  5. tab1887

    tab1887

    Joined:
    Mar 5, 2018
    Posts:
    5
    Bug reported under case number 1343192.
    This may be as well something for Google to fix, as this SDK does all kinds of funny things after importing, but it certainly was working fine in earlier versions of Unity.
     
    LeonhardP likes this.
  6. drallcom3

    drallcom3

    Joined:
    Feb 12, 2017
    Posts:
    165
    Probably, but so far I don't even know what change causes this bug. I couldn't find anything good in the patch notes.
     
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
  8. BasTitan

    BasTitan

    Joined:
    Jun 28, 2018
    Posts:
    2
    Firebase just updated firebase_unity_sdk to version 8.0.0, but same errors appear
     
  9. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    The problem is with the Google Jar Resolver.
    Any package that depends on it, will throw that error (basically everything).

    To reproduce just import the Google Jar Resolver for unity. Or import the latest Facebook Unity Sdk. Or Import the latest Google Mobile sdk for Unity.

    Basically, just import anything interesting on android and the editor will stop working XD
     
    Nevazhnov likes this.
  10. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    300
    Welps, hope they fixed this soon. Android dev without Jar Resolver is a hard no.
     
  11. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Yeah I'm surprised the dev team doesn't load any project during alpha testing that uses Jar Resolver. It's basically impossible if you do any serious dev. It's like testing Unity but not adding cameras.
     
  12. Ethwood

    Ethwood

    Joined:
    Nov 6, 2016
    Posts:
    39
    Is there any temporary solution/workaround to this for now? I really like 2021.2 and don't wanna downgrade just for this. And yes I do serious projects.
     
  13. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    No, there is none. The only solution is to download the google jar resolver source code, modify it yourself and recompile with it. Not fun.
     
  14. cristianm_unity

    cristianm_unity

    Unity Technologies

    Joined:
    Oct 16, 2018
    Posts:
    259
    Hi all! The problem seems to be that we added a new overload to the GetApplicationIdentifier method that the google jar resolver was accessing through reflection, causing the Ambiguous match error.

    A quick look at their code suggests that they already fixed it. Hopefully that could help you!
     
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Yep, but now their is another error complaining about the IOS dll from their code.
     
  16. vakau

    vakau

    Joined:
    Jan 31, 2019
    Posts:
    10
    LeonhardP likes this.
  17. Pranav_Redstoneinvente

    Pranav_Redstoneinvente

    Joined:
    Apr 13, 2018
    Posts:
    121
    Hi, where do i even find the script to modify?
     
  18. sadvit

    sadvit

    Joined:
    Feb 22, 2020
    Posts:
    1
    Hello!

    Found workaround:

    1. You need to download latest release from here: https://github.com/googlesamples/unity-jar-resolver/releases (1.2.166 + unity 2021.2.0b works fine)
    2. You need to replace binary files from folder: MyProject/Assets/PlayServicesResolver/.. with files from downloaded archive (/unity-jar-resolver-1.2.166/exploded/Assets/PlayServicesResolver/Editor/..)
    3. Enjoy :)
     
    Haltt and anton_david like this.
  19. DadNapper

    DadNapper

    Joined:
    Jan 13, 2018
    Posts:
    10
    Installing the latest External Dependency Manager (v1.2.166) and running a Force Resolve seems to fix the issue for me. (Unity version: 2021.2.0b14)

    Pro tip:
    If you are getting a Java SDK issue, Go to Unity Preferences > External Tools > Uncheck then Re-check the "JDK installed with Unity".
     
  20. Mashimaro7

    Mashimaro7

    Joined:
    Apr 10, 2020
    Posts:
    727
    I was about to necro to ask for help, but I thought I would post my solution instead lol

    I wasn't making an Android game, so it was very confusing to my as to why I was getting this error. Turns out, I needed to download the external dependency manager
    And then SWITCH to Android, then force resolve, then switch back to WebGL(or whatever you're building to). This error is so strange, i was getting it from the Facebook SDK.
     
  21. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    547
    Last edited: Jan 10, 2022
  22. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,967
    You can always download the latest copy of External Dependency Manager aka Unity Jar Resolver from this link.
     
  23. Mashimaro7

    Mashimaro7

    Joined:
    Apr 10, 2020
    Posts:
    727
    anandiamy likes this.
  24. iupendra

    iupendra

    Joined:
    Feb 21, 2019
    Posts:
    6
    Thanks That helped
     
    thedrhax14 and Voxel-Busters like this.
  25. unity_AD542DE2D778977C44DC

    unity_AD542DE2D778977C44DC

    Joined:
    Aug 17, 2022
    Posts:
    6
    this help me, thanks
     
    anandiamy and ahnurbd like this.