Black screen on oculus quest 2 URP build when using oculus SDK

We just upgraded project to URP and have problems with oculus SDK. It turns out that any version of it causes black screen after launching built game. You can hear that you are loaded in main menu and hear all sounds but the screen remains black and console spams with error: OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state
Tried downgrading to some versions but none of it worked. Removing oculus SDK works and the error in not appearing anymore. Also it works without URP on same setup. Happens with:

  • Meta XR Core SDK and Meta XR Platfrom SDK (version 60.0.0 and 59.0.0)
  • Oculus integration v57, v50, v42

Things we are using:

  • Unity 2022.3.16f1
  • URP 14.0.9
  • Oculus XR Plugin 4.1.2

Did you follow the meta quickstart guide?
Some settings can cause this.

Also make sure the quest is updated

Hi, Thanks for replying. We’ve done exactly the same as in the guide. Up until this point we’ve used OpenXR as our XR environment and we had a black screen when launching our app. After switching it to Oculus (as mentioned in the guide), the skybox was black and all of the objects on the scene were pink. Materials use unmodified lit and unlit shaders. The above-mentioned scene, both in editor and PC built looks fine, the issue appears only on andorid builds when using Oculus SDK. It seems fine without it

We finally managed to find the reason of our problems. It was caused by checked “Skip Unneeded Shaders” in Oculus Project Config. Unchecking the checkbox has fixed it.
9685904--1381445--upload_2024-3-7_12-0-48.png