OpenXR failing to start

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Hopeijay

I am using Godot 4.0 and trying to start up VR. However when I do so the project runs and the window opens with the Godot logo, stays there for about 10 seconds, then closes with no code run and without ever playing the first frame. The game does start when I don’t enable OpenXR and XR Shaders or if I do not connect a headset. If I don’t connect a headset it just gives me a warning to connect my HMD then starts the game in normal flat mode. I am using SteamVR and connecting with a Quest 2 through virtual desktop.
The only script I have in the project is as follows:

extends Node3D

var interface : XRInterface

func _ready():
	interface = XRServer.find_interface("OpenXR")
	if interface and interface.is_initialized():
		get_viewport().use_xr = true

If you need any more information just ask.
Thanks in advance!

:bust_in_silhouette: Reply From: stormreaver

From what I can tell, OpenXR does not work in 4.x at all.