Search Unity

Question Oculus Quest - Failed to load openxr runtime loader

Discussion in 'VR' started by emrys90, Jul 3, 2021.

  1. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I'm not sure what's changed, but OpenXR is no longer working for me on Oculus Quest builds. I get this log message. Anyone have any ideas? I double checked the OpenXR settings and I do still have Oculus Quest support checked.

    07-03 12:37:58.783 6025 6050 E Unity : Failed to load openxr runtime loader.
    07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.XR.OpenXR.OpenXRLoaderBase:InitializeInternal()
    07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.XR.OpenXR.OpenXRLoaderBase:Initialize()
    07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.XR.Management.<InitializeLoader>d__24:MoveNext()
    07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    07-03 12:37:58.783 6025 6050 E Unity : ProjectCards.Managers.<WaitRestartXR>d__9:MoveNext()
    07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    07-03 12:37:58.783 6025 6050 E Unity :
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ]
    07-03 12:37:58.783 6025 6050 I Unity :
    07-03 12:37:58.783 6025 6050 I Unity : ==== Start Unity OpenXR Diagnostic Report ====
    07-03 12:37:58.783 6025 6050 I Unity :
    07-03 12:37:58.783 6025 6050 I Unity :
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ] ==== Report Reason: System Shutdown ====
    07-03 12:37:58.783 6025 6050 I Unity :
    07-03 12:37:58.783 6025 6050 I Unity :
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ] ==== OpenXR Support Details ====
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ] OpenXR Runtime:
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ] UNKNOWN COMPANY, which is not a Unity supported partner
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ] Unity OpenXR Features:
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ] Unity Support:
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ] Unity doesn't support some aspects of the runtime and Unity OpenXR Features above. Please attempt to reproduce the issue with only Unity supported aspects before submitting an issue to Unity.
    07-03 12:37:58.783 6025 6050 I Unity : [XR] [493004361040] [12:37:58.783][Info ]
    07-03 12:37:58.784 6025 6050 I Unity : [XR] [493004361040] [12:37:58.784][Info ] ==== Last 20 Events ====
    07-03 12:37:58.784 6025 6050 I Unity : [XR] [493004361040] [12:37:58.784][Info ]
    07-03 12:37:58.784 6025 6050 I Unity :
    07-03 12:37:58.784 6025 6050 I Unity : ==== End Unity OpenXR Diagnostic Report ====
     
  2. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I recently updated to OpenXR 1.2.3, so I downgraded back to 1.2.2 to see if it would fix it. Now it just completely crashes during startup, and this is the log for the crash.

    07-03 16:49:53.997 7909 7935 E AndroidRuntime: FATAL EXCEPTION: UnityMain
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: pid: 7909, tid: 7935, name: UnityMain >>> com.DivergentRealities.CardsTankards <<<
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #03 pc 00000000000714e8 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libUnityOpenXR.so (BuildId: 39481a9a88855558b1c2c61273d136e01d51471e)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #08 pc 0000000000072174 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libUnityOpenXR.so (BuildId: 39481a9a88855558b1c2c61273d136e01d51471e)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #09 pc 000000000006963c /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libUnityOpenXR.so (BuildId: 39481a9a88855558b1c2c61273d136e01d51471e)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #12 pc 000000000681f470 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libil2cpp.so (UnityAction_Invoke_mFFF1FFE59D8285F8A81350E6D5C4D791F44F6AC9+548) (BuildId: cc0ecadcd8f76e5b095ff3350752b6cdfa3fd90a)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #18 pc 0000000000738164 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)+164) (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #19 pc 000000000074ad4c /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)+156) (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #20 pc 0000000000510db4 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #21 pc 0000000000510d4c /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #22 pc 00000000005077cc /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)+80) (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #23 pc 0000000000507824 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (ExecutePlayerLoop(NativePlayerLoopSystem*)+168) (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #24 pc 0000000000507a88 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (PlayerLoop()+368) (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #25 pc 00000000007d1df0 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (UnityPlayerLoop()+716) (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: #26 pc 0000000000801454 /data/app/com.DivergentRealities.CardsTankards-pjhGRdINfuwk8IcPhX9zjw==/lib/arm64/libunity.so (nativeRender(_JNIEnv*, _jobject*)+72) (BuildId: 94ac5538a32a4db363b7205eed5a033f6099a182)
    07-03 16:49:53.997 7909 7935 E AndroidRuntime: at libUnityOpenXR.0x714e8(Native Method)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libUnityOpenXR.0x72174(Native Method)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libUnityOpenXR.0x6963c(Native Method)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libil2cpp.UnityAction_Invoke_mFFF1FFE59D8285F8A81350E6D5C4D791F44F6AC9(UnityAction_Invoke_mFFF1FFE59D8285F8A81350E6D5C4D791F44F6AC9:548)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)(scripting_method_invoke:164)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)(Invoke:156)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.0x510db4(Native Method)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.0x510d4c(Native Method)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:80)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.ExecutePlayerLoop(NativePlayerLoopSystem*)(ExecutePlayerLoop:168)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.PlayerLoop()(PlayerLoop:368)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.UnityPlayerLoop()(UnityPlayerLoop:716)
    07-03 16:49:53.998 7909 7935 E AndroidRuntime: at libunity.nativeRender(_JNIEnv*, _jobject*)(nativeRender:72)
    07-03 16:49:54.003 989 3798 W ActivityTaskManager: Force finishing activity com.DivergentRealities.CardsTankards/com.unity3d.player.UnityPlayerActivity
    07-03 16:49:54.024 7909 7909 I Unity : onPause
    07-03 16:49:54.062 989 1072 W InputDispatcher: channel 'cfec448 com.DivergentRealities.CardsTankards/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
    07-03 16:49:54.062 989 1072 E InputDispatcher: channel 'cfec448 com.DivergentRealities.CardsTankards/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    07-03 16:49:54.067 989 7576 I WindowManager: WIN DEATH: Window{cfec448 u0 com.DivergentRealities.CardsTankards/com.unity3d.player.UnityPlayerActivity}
    07-03 16:49:54.067 989 7576 W InputDispatcher: Attempted to unregister already unregistered input channel 'cfec448 com.DivergentRealities.CardsTankards/com.unity3d.player.UnityPlayerActivity (server)'
     
  3. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    @the_real_apoxol Any ideas on this? It's preventing me from being able to release an update to my game
     
  4. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    We will look into it. In the mean time have you tried making a fresh project and deploying yet just to make sure it works at all?
     
  5. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
  6. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I just created a new project with OpenXR 1.2.3, and it started up just fine. Any ideas what could be wrong with my project? I tried reinstalling OpenXR and deleting the XR folder to set it all up again, but that didn't fix anything
     
  7. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Looks like the crash is coming from

    Code (CSharp):
    1. 07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.XR.Management.<InitializeLoader>d__24:MoveNext()
    2. 07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    3. 07-03 12:37:58.783 6025 6050 E Unity : ProjectCards.Managers.<WaitRestartXR>d__9:MoveNext()
    4. 07-03 12:37:58.783 6025 6050 E Unity : UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    Are you manually restarting XR at some point?
     
  8. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Yes, I do manually restart XR after returning to the app from requesting microphone permissions. It was necessary from a previous conversation we had over XR not working after returning to the app from that.

    However, XR is not starting before from the automated startup, nor after from this manual restart currently
     
  9. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Could you try to reproduce what you are doing with your initialization in a sample project and if you can then submit that as a bug? That will allow us to address this much faster.
     
  10. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    The issue is I can't reproduce it in a new project, not sure what's causing it in mine. I did try building it locally though and it actually seemed to work, so it might be an issue with my automated build platform. I deleted the Library/etc folders there and rebuilding to see if it makes a difference. It takes a couple hours to do the build without the cache though, so waiting for it to finish. If that doesn't work then I have no idea what else to try
     
  11. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Yeah you would need to move some of your custom initialization logic into that project maybe? Lets see how your current test goes and go from there.
     
  12. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    In my project, its currently set to initialize on startup automatically (I have issues with the manual startup that I posted about in another thread), so that's not the source of the issue. The manual restart is only on first launch after requesting the microphone permission, so it's not the source of my issue with OpenXR not working at all
     
  13. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Unfortunately, deleting the Library folder did not fix the issue. Here's the log entries from the automatic startup, rather than the manual restart from first launch

    07-06 14:11:24.063 3586 3607 I Unity : XRGeneral Settings awakening...
    07-06 14:11:24.063 3586 3607 I Unity :
    07-06 14:11:24.444 3586 3607 E Unity : Failed to load openxr runtime loader.
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.Logger:Log(LogType, Object)
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.Debug:LogError(Object)
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.XR.OpenXR.OpenXRLoaderBase:InitializeInternal()
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.XR.OpenXR.OpenXRLoaderBase:Initialize()
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.XR.Management.XRManagerSettings:InitializeLoaderSync()
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.XR.Management.XRGeneralSettings:InitXRSDK()
    07-06 14:11:24.444 3586 3607 E Unity : UnityEngine.XR.Management.XRGeneralSettings:AttemptInitializeXRSDKOnLoad()
    07-06 14:11:24.444 3586 3607 E Unity :
    07-06 14:11:24.460 3586 3607 I Unity : [XR] [511794728272] [14:11:24.460][Info ]
    07-06 14:11:24.460 3586 3607 I Unity :
    07-06 14:11:24.460 3586 3607 I Unity : ==== Start Unity OpenXR Diagnostic Report ====
    07-06 14:11:24.460 3586 3607 I Unity :
    07-06 14:11:24.460 3586 3607 I Unity :
    07-06 14:11:24.460 3586 3607 I Unity : [XR] [511794728272] [14:11:24.460][Info ] ==== Report Reason: System Shutdown ====
    07-06 14:11:24.460 3586 3607 I Unity :
    07-06 14:11:24.460 3586 3607 I Unity :
    07-06 14:11:24.460 3586 3607 I Unity : [XR] [511794728272] [14:11:24.460][Info ] ==== OpenXR Support Details ====
    07-06 14:11:24.460 3586 3607 I Unity : [XR] [511794728272] [14:11:24.460][Info ] OpenXR Runtime:
    07-06 14:11:24.460 3586 3607 I Unity : [XR] [511794728272] [14:11:24.460][Info ] UNKNOWN COMPANY, which is not a Unity supported partner
    07-06 14:11:24.460 3586 3607 I Unity : [XR] [511794728272] [14:11:24.460][Info ] Unity OpenXR Features:
    07-06 14:11:24.460 3586 3607 I Unity : [XR] [511794728272] [14:11:24.460][Info ] Unity Support:
    07-06 14:11:24.461 3586 3607 I Unity : [XR] [511794728272] [14:11:24.461][Info ] Unity doesn't support some aspects of the runtime and Unity OpenXR Features above. Please attempt to reproduce the issue with only Unity supported aspects before submitting an issue to Unity.
    07-06 14:11:24.461 3586 3607 I Unity : [XR] [511794728272] [14:11:24.461][Info ]
    07-06 14:11:24.461 3586 3607 I Unity : [XR] [511794728272] [14:11:24.461][Info ] ==== Last 20 Events ====
    07-06 14:11:24.461 3586 3607 I Unity : [XR] [511794728272] [14:11:24.461][Info ]
    07-06 14:11:24.461 3586 3607 I Unity :
    07-06 14:11:24.461 3586 3607 I Unity : ==== End Unity OpenXR Diagnostic Report ====



    EDIT:
    I tried digging through the source code of how OpenXR is initialized to see if I could track down any potential culprits to look into, but it seems that the code that triggers that error message is inside of a C++ DLL, so I couldn't go any further in debugging it
     
    Last edited: Jul 6, 2021
  14. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    We made a test app using 1.2.3 and ran it on the latest Oculus runtime and it seemed to work, which confirms what you said about reproducing it in a test project. There has to be some setting or feature you have enabled that is causing the runtime to fail. Do you have any features enabled on your android build?
     
  15. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    No I don't, just the minimum for Quest support. Not sure what else to check there

    upload_2021-7-6_17-12-35.png
     
  16. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Is this happening on the version up on steam?
     
  17. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    No, this is only affecting Oculus Quest builds. And if I build the Android version on my local copy it seems to work fine, but when built through my automated build pipeline it does not and has the OpenXR failure. It's quite strange and I have no idea what could be causing it since deleting the Library didn't resolve it
     
  18. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Any way to get us the build from your automated machine that is failing?
     
  19. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    I just messaged you a link to it
     
  20. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Are you unblocked on this one now?
     
  21. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    Hate to necro an old topic, but I too am having this issue. My OpenXR Oculus Quest 2 build won't start. Won't even show the splash screen, and it locks me in the game infinitely loading with the animated ellipsis. This only happens in OpenXR as my title runs fine with the Oculus setting enabled instead in the XR Plug-In Management section. Either that, or it's the switch to Arm64 that's preventing my game from loading.

    Can't test either exclusively since Arm64 is required for OpenXR to run. But I can say that even switching to the Oculus runtime with Arm64, my project wouldn't start. Upon switching back to Armv7, project runs again.

    I'm using Unity 2020.3.21
    Oculus XR Plugin 1.10.0
    OpenXR Plugin 1.2.8
    XR Plugin Management 4.0.7
     
  22. emrys90

    emrys90

    Joined:
    Oct 14, 2013
    Posts:
    755
    Are you using Vulkan? There's a crash on startup for OpenXR right now now on Vulkan that is supposed to be getting fixed in 1.3.
     
  23. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    I am using Vulkan. That's great to hear! Now I'm getting another issue when switching to OpenGLES3. Unity logo flickering endlessly on the quest build... Been spending so much more time dealing with getting the build to run okay than on actually developing my game...
     
  24. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Yes this will be fixed in 1.3, which should be out very soon.
     
  25. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    1.3 is now out and should fix the vulkan issue. It will take a few weeks before it is in the verified state but at least on 2020.3 you can install it from the menus
     
  26. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    Wonderful, thank you!