AR Foundation — ARCore: OPENGL NATIVE PLUG-IN ERROR

I got different errors below after these lines executed (I enable AR manually):

xrOrigin.gameObject.SetActive(true);
arSession.gameObject.SetActive(true);

AR Plane Manager, AR Point Cloud Manager, AR Raycast manager: components are not enabled still at this stage.

Production Build:
OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state

Debug Build:
OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_VALUE: Numeric argument out of range


Result:
2 Textures have random glitching after doing this.

AR Foundation 5.1.3, 5.1.2.
Plane Detection.
Auto Graphics API: unchecked
Graphics APIs: OpenGLES3

Why can this happen?

P.S. I have no such error with Image Tracking.

AR Foundation is only an interface for AR Functionality. It does not implement AR (unless you are referring to XR Simulation specifically). For starters we would need to know which platform(s) you are building for, and your XR Plug-in Management settings, before we could reason about this.

Looking at this a second time, I wouldn’t expect these to work in this order. ARSession is the root of all platform lifecycle. I think you might need ARSession alive first before you enable XR Origin, otherwise I’m not sure how XR Origin could attempt to get an origin pose. Origin of what, if there is no ARSession?

Tested with Galaxy A71.

There are no issues with my order on:

  • iOS + Plane Detection,
  • iOS & Android + Image Tracking

If I change the order as you said, I get this message with XR Simulation and then NO Plane Detection in Editor:

An XR Origin is required in the scene, none found.
UnityEngine.XR.ARFoundation.ARSession:OnEnable ()

So, with the order in the original post there are no errors and working Plane Detection.

9750505--1395421--Screenshot 2024-04-05 at 01.15.09.png 9750505--1395424--Screenshot 2024-04-05 at 01.17.06.png

Hm I see. Yeah I don’t have any advice that I can you here other than please file a bug so that we can investigate this issue: Unity QA: Building quality with passion

The issue was disappeared.
I guess, the issue was related to some native Samsung applications (they were updated), not to OS updates.