Sorry if I am dumb, but I have been building a webxr app for a few weeks, everything was running smoothly until one day I randomly started getting this error.
Notes:
- Latest Windows version
- Latest Chrome version
- Have wiped all cache/storage in my app
- Have tried Brave (same err)
- Still is working on chrome on my macbook
Workaround (forces legacy XR path)
Temporarily removing createProjectionLayer from XRWebGLBinding makes the app fall back to the older, stable rendering path:
async function withLegacyXrLayerFallback(fn) {
if (typeof XRWebGLBinding === "undefined") {
return await fn();
}
const proto = XRWebGLBinding.prototype;
const descriptor = Object.getOwnPropertyDescriptor(
proto,
"createProjectionLayer"
);
try {
if (descriptor) {
delete proto.createProjectionLayer;
}
return await fn();
} finally {
if (descriptor) {
Object.defineProperty(proto, "createProjectionLayer", descriptor);
}
}
}
Sorry if I am dumb, but I have been building a webxr app for a few weeks, everything was running smoothly until one day I randomly started getting this error.
Notes:
Workaround (forces legacy XR path)
Temporarily removing
createProjectionLayerfrom XRWebGLBinding makes the app fall back to the older, stable rendering path: