googlesamples / unity-jar-resolver

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

[Bug] Job failed with exception: System.Reflection.TargetInvocationException #519

Closed haru-sudo closed 2 years ago

haru-sudo commented 2 years ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

Import External Dependency Manager. Then an error is displayed. Job failed with exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Insecure connection not allowed at (wrapper managed-to-native) UnityEngine.Networking.UnityWebRequest.BeginWebRequest(UnityEngine.Networking.UnityWebRequest) at UnityEngine.Networking.UnityWebRequest.SendWebRequest () [0x00001] in /Users/bokken/buildslave/unity/build/Modules/UnityWebRequest/Public/UnityWebRequest.bindings.cs:288 at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&) at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <576e98653a5f49679066789a4e0b3ea2>:0 --- End of inner exception stack trace --- at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <576e98653a5f49679066789a4e0b3ea2>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <576e98653a5f49679066789a4e0b3ea2>:0 at Google.PortableWebRequest.StartRequest (Google.PortableWebRequest+HttpMethod method, System.String url, System.Collections.Generic.IDictionary``2[TKey,TValue] headers, UnityEngine.WWWForm form) [0x0019e] in /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/PortableWebRequest.cs:508 at Google.PortableWebRequest+<StartRequestOnMainThread>c__AnonStorey6.<>m__C () [0x00000] in /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/PortableWebRequest.cs:458 at Google.RunOnMainThread.ExecuteNext () [0x0003d] in /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:486 UnityEngine.Debug:LogError (object) Google.RunOnMainThread:ExecuteNext () (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:488) Google.RunOnMainThread:<ExecuteAllUnnested>m__12 () (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:536) Google.RunOnMainThread:RunAction (System.Action) (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:343) Google.RunOnMainThread:ExecuteAllUnnested (bool) (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:530) Google.RunOnMainThread:ExecuteAll () (at /Users/chkuang/Workspace/git/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:512) UnityEditor.EditorApplication:Internal_CallUpdateFunctions () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:359)

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc) 100%

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 @HAL-JP,

Version 1.2.171 of the resolver is now available. Could you confirm if this version makes a difference? Otherwise, please provide the complete steps you've taken to reproduce this issue.

haru-sudo commented 2 years ago

Hi Thanks for the reply.

Version 1.2.171 gave me the same results. To reproduce, create a new project in Unity2022. (I can't reproduce it with Unity2021.) Then import external-dependency-manager-1.2.171.unitypackage into Unity and look at the console. You see an error.

スクリーンショット 2022-05-24 22 04 39
paulinon commented 2 years ago

Thanks for the confirmation, @HAL-JP. I was able to reproduce the issue using the steps you provided, and I'll relay my observations to the team.

I'll be marking this as a bug for now. You may refer to this thread for updates.

chkuang-g commented 2 years ago

Duplicate of #484

chkuang-g commented 2 years ago

Please see https://github.com/googlesamples/unity-jar-resolver/issues/484#issuecomment-993910648 as workaround