googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.22k stars 339 forks source link

[Bug] Ambiguous match found. (Issue 447 Resurrected) #511

Closed xysverma closed 2 years ago

xysverma commented 2 years ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the issue here:

Issue #447 seems to be happening again. I upgraded form Unity 2020.3.31LTS to 2021.3.0LTS (Released Today) and i am getting same 2 errors in console.

Please answer the following, if applicable:

What's the issue repro rate? 100%

What happened? How can we make the problem occur?

Error 1

Exception thrown when initializing GenerateXmlFromGoogleServicesJson: System.Reflection.AmbiguousMatchException: Ambiguous match found. at System.RuntimeType.GetMethodImplCommon (System.String name, System.Int32 genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00050] in :0 at System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) [0x00000] in :0 at System.Type.GetMethod (System.String name, System.Reflection.BindingFlags bindingAttr) [0x0000e] in :0 at System.Type.GetMethod (System.String name) [0x00000] in :0 at GooglePlayServices.UnityCompat.GetUnity56AndAboveApplicationIdentifier (UnityEditor.BuildTarget buildTarget) [0x00000] in <4b7656cfe9964e9daa618a6c91f80015>:0 at GooglePlayServices.UnityCompat.GetApplicationId (UnityEditor.BuildTarget buildTarget) [0x00000] in <4b7656cfe9964e9daa618a6c91f80015>:0 at Firebase.Editor.GenerateXmlFromGoogleServicesJson.GetAndroidApplicationId () [0x00000] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:147 at Firebase.Editor.GenerateXmlFromGoogleServicesJson.FindGoogleServicesFile (Firebase.Editor.GenerateXmlFromGoogleServicesJson+ConfigFileType fileType, System.String bundleId, Firebase.Editor.GenerateXmlFromGoogleServicesJson+FindGoogleServicesFileMode mode, Firebase.Editor.GenerateXmlFromGoogleServicesJson+LogMessage logMessageForNoConfigFiles, Firebase.Editor.GenerateXmlFromGoogleServicesJson+LogMessage logMessageForMissingBundleId) [0x00000] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:351 at Firebase.Editor.GenerateXmlFromGoogleServicesJson.UpdateJson (System.Boolean ignoreModificationDate, Firebase.Editor.GenerateXmlFromGoogleServicesJson+LogMessage logMessageForNoConfigFiles, Firebase.Editor.GenerateXmlFromGoogleServicesJson+LogMessage logMessageForMissingBundleId) [0x00000] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:154 at Firebase.Editor.GenerateXmlFromGoogleServicesJson.CheckConfiguration () [0x0001f] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:256 at Firebase.Editor.GenerateXmlFromGoogleServicesJson.m1 () [0x00000] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:103 at Google.EditorInitializer+cAnonStorey1.<>m2 () [0x00024] in <3f058b35f14044c493299f105a65da17>:0 UnityEngine.Debug:LogError (object) Google.EditorInitializer/cAnonStorey1:<>m2 () Google.RunOnMainThread:ExecutePollingJobs () Google.RunOnMainThread:m12 () Google.RunOnMainThread:RunAction (System.Action) Google.RunOnMainThread:ExecuteAllUnnested (bool) Google.RunOnMainThread:ExecuteAll () UnityEditor.EditorApplication:Internal_CallUpdateFunctions () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:356)

Error 2 xception thrown when initializing XcodeProjectPatcher: System.Reflection.AmbiguousMatchException: Ambiguous match found. at Firebase.Editor.XcodeProjectPatcher.ReadConfig (System.Boolean errorOnNoConfig, System.String filename) [0x0003c] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\XcodeProjectPatcher.cs:129 at Firebase.Editor.XcodeProjectPatcher.ReadConfigOnUpdate () [0x00000] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\XcodeProjectPatcher.cs:96 at Firebase.Editor.XcodeProjectPatcher.m1 () [0x00005] in Z:\tmp\tmp.xxgdZVexZ2\firebase\app\client\unity\editor\src\XcodeProjectPatcher.cs:82 at Google.EditorInitializer+cAnonStorey1.<>m2 () [0x00024] in <3f058b35f14044c493299f105a65da17>:0 UnityEngine.Debug:LogError (object) Google.EditorInitializer/cAnonStorey1:<>m2 () Google.RunOnMainThread:ExecutePollingJobs () Google.RunOnMainThread:m12 () Google.RunOnMainThread:RunAction (System.Action) Google.RunOnMainThread:ExecuteAllUnnested (bool) Google.RunOnMainThread:ExecuteAll () UnityEditor.EditorApplication:Internal_CallUpdateFunctions () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:356)

If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.

google-oss-bot commented 2 years ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

paulinon commented 2 years ago

Hi @xysverma,

Thanks for reporting this issue. Could you provide the complete steps you've taken before facing this behavior? I've built using version 2021.3.0f1 of the editor, and I haven't encountered any errors so far.

xysverma commented 2 years ago

@paulinon : Based on ur comment. I deleted firebase & jar resolver completely and reimported from thr unity package and it seems to be gone. It must be some old files. Thanks.