Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Build Oculus QuesQ2(VR) fail with "The requested job requires elevated permissions"

Discussion in 'VR' started by z9yu2sc571, Dec 10, 2020.

  1. z9yu2sc571

    z9yu2sc571

    Joined:
    May 13, 2020
    Posts:
    8
    -unity version : 2019.2.6f1
    -NDK : r16b downloaded from google
    -Installed Oculus package
    -Texture Compression : ASTC
    -Run Device : Oculus Quest2


    Editor error message :

    Win32Exception: ApplicationName='C:\Program Files\Unity\Hub\Editor\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="D:\2019-3DRowing\Mirror-3DRowing-1116(complete)\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\2019-3DRowing\Mirror-3DRowing-1116(complete)\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --additional-libraries="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Assets/Allegorithmic/Plugins/Substance/Armv7/libtinyxml.a" --additional-libraries="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Assets/Allegorithmic/Plugins/Substance/Armv7/libalgcompression.a" --additional-libraries="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Assets/Allegorithmic/Plugins/Substance/Armv7/libsubstance_framework.a" --additional-libraries="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Assets/Allegorithmic/Plugins/Substance/Armv7/libpfxlinkercommon.a" --additional-libraries="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Assets/Allegorithmic/Plugins/Substance/Armv7/libsubstance_neon_blend.a" --additional-libraries="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Assets/Allegorithmic/Plugins/Substance/Armv7/libsubstance_linker.a" --tool-chain-path="D:/android-ndk-r16b" --enable-debugger --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.2.6f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="D:/2019-3DRowing/Mirror-3DRowing-1116(complete)/Temp/StagingArea/Il2Cpp/il2cppOutput" ', CurrentDirectory='D:\2019-3DRowing\Mirror-3DRowing-1116(complete)\Temp\StagingArea\assets\bin\Data\Managed', Native error= The requested job requires elevated permissions.

    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)
    UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
    OculusBuildApp:UnityBuildPlayer() (at Assets/Oculus/VR/Editor/OVRBuild.cs:330)
    OculusBuildApp:StartBuildAndRun() (at Assets/Oculus/VR/Editor/OVRBuild.cs:253)




    This is mine first VR project.I can't understand this error.
    Help please.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,896
    I think the key part of the error message is: "The requested job requires elevated permissions."

    Please make sure that Unity is installed with the same user account that you are using to run it. If not, doing that might work around this issue.
     
    z9yu2sc571 likes this.
  3. z9yu2sc571

    z9yu2sc571

    Joined:
    May 13, 2020
    Posts:
    8
    thank you so much for answer
    i try to reauthorize my unity hub
    But still keep getting errors
    Or is my understanding of "make sure that Unity is installed with the same user account" wrong
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,896
    I'm unsure what you mean by "reauthorize my unity hub". Can you clarify?
     
  5. z9yu2sc571

    z9yu2sc571

    Joined:
    May 13, 2020
    Posts:
    8
    This...?
     

    Attached Files:

  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,896
    I believe that this issue is unrelated the Unity license.

    Instead, I think it has to do with user accounts on your Windows machine. For example, if Unity was installed using an administrator account and is being run with a non-administrator account, I think that this error can occur.
     
  7. z9yu2sc571

    z9yu2sc571

    Joined:
    May 13, 2020
    Posts:
    8
    My Windows machine only have one account.

    I tried to upgrade the permissions of the folder.But the folder will be regenerated when re-builed.
    Any suggestions to achieve the required permissions?
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,896
    Maybe the account is not an issue then. Can you make sure that the latest .NET Framework is installed on this computer?
     
  9. z9yu2sc571

    z9yu2sc571

    Joined:
    May 13, 2020
    Posts:
    8
    I use regedit to check my .NET Framework
    I think this computer is installed.
     

    Attached Files:

    • 0000.png
      0000.png
      File size:
      38.8 KB
      Views:
      297
  10. z9yu2sc571

    z9yu2sc571

    Joined:
    May 13, 2020
    Posts:
    8
    OH! I think i find the way to Solve the problem.
    this error have to Let Unity hud and editor "Run As Administrator"
    finally solve.

    But have new error message:
    Shader error in 'NeatWolf/Additive (Soft) HDR': undeclared identifier 'sampler_CameraDepthTexture' at line 66 (on gles3)

    Should i creat new thread?
     
    Last edited: Dec 17, 2020
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,896
    Yes, please create a new thread for this error. I'm completely unsure what it means. :)