Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

unity 64-bit build error-Win32Exception il2cpp.exe did not run properly

Discussion in 'Editor & General Support' started by Rafafas, Nov 2, 2019.

  1. Rafafas

    Rafafas

    Joined:
    Oct 1, 2019
    Posts:
    7
    Hi
    I have been trying to build apk (or aab) for the last 3days to comply with the new Playstore 64-bit requirement but to no success, i have downloaded and used ndkr16b and other forms of solutions that were suggested from similar post like this but they don't seems to work for me. i had used different versions of unity like unity 2.0, 2.6f1, 2.8f1,3.0f1beta. all to no avail. the below error message is from the 2.6f1 ver. what i could make out from it is that the operation need an elevation and i am using an admin user of my computer. with 2.8f1 and 3.0 beta it was show unitylinker.exe error.
    Thank you in advance for your help.

    Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\2018.4.8f1\2019.2.6f1\Editor\Data\il2cpp/build/il2cpp.exe', CommandLine='--convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\rafafas\Desktop\On going project\unity Projects\master\master\rafafasavi\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\rafafas\Desktop\On going project\unity Projects\master\master\rafafasavi\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2018.4.8f1/2019.2.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2018.4.8f1/2019.2.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/rafafas/Desktop/On going project/unity Projects/unitytest apks/android-ndk-r16b-windows-x86_64/android-ndk-r16b" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2018.4.8f1/2019.2.6f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Users/rafafas/Desktop/On going project/unity Projects/master/master/rafafasavi/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="C:/Users/rafafas/Desktop/On going project/unity Projects/master/master/rafafasavi/Temp/StagingArea/Il2Cpp/il2cppOutput" ', CurrentDirectory='C:\Users\rafafas\Desktop\On going project\unity Projects\master\master\rafafasavi\Temp\StagingArea\assets\bin\Data\Managed', Native error= The requested operation requires elevation.
    System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <9f8c4786222746238eb929db40bf8dd1>:0)
    System.Diagnostics.Process.Start () (at <9f8c4786222746238eb929db40bf8dd1>:0)
    (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
    UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:44)
    UnityEditor.Utils.Program.Start () (at C:/buildslave/unity/build/Editor/Mono/Utils/Program.cs:28)
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:104)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:503)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:484)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5557b445b4634c46b2ec8376c040bd34>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5557b445b4634c46b2ec8376c040bd34>: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 <5557b445b4634c46b2ec8376c040bd34>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <5557b445b4634c46b2ec8376c040bd34>: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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    I think this is the relevant part of the error message:

    The requested operation requires elevation.

    Something seems to be wrong with the permissions in the Unity installation. The Unity editor is trying to run the il2cpp.exe managed executable, but it fails since the user does not have the proper permissions. I'm not sure why this occurs though.
     
  3. Rafafas

    Rafafas

    Joined:
    Oct 1, 2019
    Posts:
    7
    Thank you for the quick response. I also don't know why it is requesting for operation elevation because i am using the admin user, I had also tried:

    1. Uninstalled and re installed unity,
    2. Removed my antivirus,
    3. Specifically set the Il2cpp.exe permission to run as administrator.
    4. Delete all cache from previous runs.
    5. Reimport the project in a new project.
    After all the above failed and giving similar errors as above.

    I installed unity 2019.2.11f1 on a friend laptop (a faster one) and rerun the project again, unfortunately I got the same errors again. I also repeated steps 1-5 above but to no successful results. All these were done on a windows 10 OS.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    Can you try this with an empty project? I doubt that it is related to the specific project, but that might be worth a try.
     
  5. Rafafas

    Rafafas

    Joined:
    Oct 1, 2019
    Posts:
    7
    Thanks for the suggestion, I have tried to build 64Bit apk from empty project, yet it gave same error message. So I don't think it's a project specific problem too. However, 32 bit build is working with(out) empty project.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    Does the 32-bit build work with the Mono scripting backend or the IL2CPP scripting backend?
     
  7. Rafafas

    Rafafas

    Joined:
    Oct 1, 2019
    Posts:
    7
    It works very well with the mono scripting backend but not working with the il2cpp scripting backend.
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    Ok, the the issue if not 32-bit vs. 64-bit, but Mono vs. IL2CPP then. I'm not sure what is causing this issue - but I'll see if others can help.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    Can you undo step 3 (Specifically set the Il2cpp.exe permission to run as administrator.) - or maybe re-install Unity but don't do that. A default installation should work.
     
  10. Rafafas

    Rafafas

    Joined:
    Oct 1, 2019
    Posts:
    7
    I have undone step 3. And reran the project but it still show the il2cpp.exe error.
    Here is what I did to build my 64bit and upload on playstore.
    I exported the app to android studio using mono(since mono backend scripting is working fine on unity, even I cant export with il2cpp backend scripting), then I resolved the errors and specify the a big filter to run arm64-v8a along side armeabi-v7a which was already exported from unity. I ran and checked this. I uploaded on playstore and currently solved my problem temporarily. I would really love to be able to run my project on unity without having to export all the time.
    Thanks for the suggestions. I am looking forward to this il2cpp issues being resolved ( it mostly stop at the point where loading bar is showing "building project with IL2CPP" or something like that.
     
  11. Rafafas

    Rafafas

    Joined:
    Oct 1, 2019
    Posts:
    7
    I mean to say abifilters
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,114
    I'm unsure why you see this error when starting il2cpp.exe. It does not normally happen, so there must be something still wrong with the Unity installation or permissions.