Skip to content

Unity exception with 2022.3.18 ambigouous reference while UnityInitializer script on android device. IOS and editor is working fine. #3568

Open
@FarhanIshfaq

Description

@FarhanIshfaq

Describe the bug

AmbiguousMatchException: Ambiguous match found.
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) (at <00000000000000000000000000000000>:0)
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) (at <00000000000000000000000000000000>:0)
Amazon.Util.Internal.AndroidInterop.GetStaticJavaField[T] (System.String className, System.String methodName) (at <00000000000000000000000000000000>:0)
Amazon.Util.Internal.AmazonHookedPlatformInfo.Init () (at <00000000000000000000000000000000>:0)
Amazon.Util.Internal.AmazonHookedPlatformInfo.get_Instance () (at <00000000000000000000000000000000>:0)
Amazon.UnityInitializer.Awake () (at <00000000000000000000000000000000>:0)
UnityEngine.GameObject.AddComponent[T] () (at <00000000000000000000000000000000>:0)
Amazon.UnityInitializer.AttachToGameObject (UnityEngine.GameObject gameObject) (at <00000000000000000000000000000000>:0)
AWSManager.Initialize (System.String gToken) (at <00000000000000000000000000000000>:0)
Bootstrap.InitializeGoogleDependencies (Assets.SimpleGoogleSignIn.Scripts.UserInfo user, System.String googleToken) (at <00000000000000000000000000000000>:0)
Bootstrap+d__20.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
UnityEngine.GameObject:AddComponent()
Amazon.UnityInitializer:AttachToGameObject(GameObject)
AWSManager:Initialize(String)
Bootstrap:InitializeGoogleDependencies(UserInfo, String)
d__20:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

I'm gettting this exception on android device while calling the : Amazon.UnityInitializer.AttachToGameObject(gameObject);

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Should not throw exception.

Current Behavior

mbiguousMatchException: Ambiguous match found.
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) (at <00000000000000000000000000000000>:0)
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) (at <00000000000000000000000000000000>:0)
Amazon.Util.Internal.AndroidInterop.GetStaticJavaField[T] (System.String className, System.String methodName) (at <00000000000000000000000000000000>:0)
Amazon.Util.Internal.AmazonHookedPlatformInfo.Init () (at <00000000000000000000000000000000>:0)
Amazon.Util.Internal.AmazonHookedPlatformInfo.get_Instance () (at <00000000000000000000000000000000>:0)
Amazon.UnityInitializer.Awake () (at <00000000000000000000000000000000>:0)
UnityEngine.GameObject.AddComponent[T] () (at <00000000000000000000000000000000>:0)
Amazon.UnityInitializer.AttachToGameObject (UnityEngine.GameObject gameObject) (at <00000000000000000000000000000000>:0)
AWSManager.Initialize (System.String gToken) (at <00000000000000000000000000000000>:0)
Bootstrap.InitializeGoogleDependencies (Assets.SimpleGoogleSignIn.Scripts.UserInfo user, System.String googleToken) (at <00000000000000000000000000000000>:0)
Bootstrap+d__20.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
UnityEngine.GameObject:AddComponent()
Amazon.UnityInitializer:AttachToGameObject(GameObject)
AWSManager:Initialize(String)
Bootstrap:InitializeGoogleDependencies(UserInfo, String)
d__20:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

Reproduction Steps

Just use : Amazon.UnityInitializer.AttachToGameObject(gameObject);

Possible Solution

To Work Fine with init.

Additional Information/Context

No

AWS .NET SDK and/or Package version used

AWSSDK unity updated.

Targeted .NET Platform

.Net 2.1

Operating System and version

Android.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.module/unityp3This is a minor priority issuequeued

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions