Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to build on version 21.11.0 #135

Open
gimmemypass opened this issue Jan 13, 2022 · 2 comments
Open

Fail to build on version 21.11.0 #135

gimmemypass opened this issue Jan 13, 2022 · 2 comments

Comments

@gimmemypass
Copy link

gimmemypass commented Jan 13, 2022

Unity version 2020.3.24f lts
Countly version 21.11.0
Scripting Backend : IL2CPP
Downgrading to the version 20.11.5 solve the issue

Error Input in Unity:
Exception: IL2CPP error (no further information about what managed code was being converted is available)
Unity.IL2CPP.HashCodeCollisionException: Hash code collision on value D76B296DC58D7BA4BE39395F76D350FBD4FF405C
Existing Item was : System.Void System.Configuration.Configuration::add_SaveStart(System.Configuration.ConfigurationSaveEventHandler)
Colliding Item was : System.Void System.Configuration.Configuration::add_SaveStart(System.Configuration.ConfigurationSaveEventHandler)

at Unity.IL2CPP.HashCodeCache1.GetUniqueHash(T value) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/HashCodeCache.cs:line 46 at Unity.IL2CPP.Naming.NamingComponent.ForMethodInternal(MethodReference method) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Naming/NamingComponent.cs:line 337 at Unity.IL2CPP.Naming.NamingComponent.ForMethodNameOnly(MethodReference method) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Naming/NamingComponent.cs:line 89 at Unity.IL2CPP.AssemblyConversion.PrimaryCollection.Steps.Global.WarmNamingComponent.ProcessItem(GlobalPrimaryCollectionContext context, AssemblyDefinition item, Object globalState) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/PrimaryCollection/Steps.Global/WarmNamingComponent.cs:line 36 at Unity.IL2CPP.AssemblyConversion.Steps.Base.GlobalScheduledStepAction2.ProcessAllItems(TWorkerContext context, ReadOnlyCollection1 items) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/Steps.Base/GlobalScheduledStepAction.cs:line 39 at Unity.IL2CPP.AssemblyConversion.Steps.Base.GlobalScheduledStepAction2.WorkerWrapper(WorkItemData3 workerData) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/AssemblyConversion/Steps.Base/GlobalScheduledStepAction.cs:line 30 at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data) in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP/Contexts.Scheduling/PhaseWorkScheduler.cs:line 247
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:129)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:65) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:818) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:785) UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:604) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:269)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at :0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

@ArtursKadikis
Copy link
Member

Hello, could you share the Countly code (or maybe even scene) that you were compiling when receiving that issue?
Can this issue be reproduced when trying to compile our sample scene?
On which OS were you running the editor? Which OS version were you using?
What was your build target? Was it android?

@gimmemypass
Copy link
Author

Hello, so we tried to build your sample scene and got the same issue. The problem was due to duplicate of System.Web. After importing your unitypackage, a class CountlyStorageHelper required a method ParseQueryString owned by System.Web.HttpUtility but Unity didn't see it. We removed added System.Web and tried to add csc.rsp including System.Web row. After all exception of the the issue was gone, but in the build on mobile appeared a new exception "Error : called non-existend method System.Web.HttpUtility::ParseQueryString()". I have a point that it is because of IL2cpp code stripping.
To understand the question we used the following link:
https://forum.unity.com/threads/solved-httputility-in-il2cpp.802368/
It seems il2cpp does not contain some method from mono and probably you can use explicit implementation from the following source:
https://github.com/Unity-Technologies/mono/blob/unity-main/mcs/class/System.Web/System.Web/HttpUtility.cs
OS : MacOS, Windows10
Build Target : Android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants