react-xr icon indicating copy to clipboard operation
react-xr copied to clipboard

Pico4 Browser Crash

Open Yanbing-Han opened this issue 6 months ago • 3 comments

My VR device is PICO4 I use the official example code and npm package:

import { Canvas } from '@react-three/fiber'
import { XR, createXRStore } from '@react-three/xr'
import { useState } from 'react'

const store = createXRStore()

export function App() {
  const [red, setRed] = useState(false)
  return (
    <>
      <button onClick={() => store.enterAR()}>Enter AR</button>
      <Canvas>
        <XR store={store}>
          <mesh pointerEventsType={{ deny: 'grab' }} onClick={() => setRed(!red)} position={[0, 1, -1]}>
            <boxGeometry />
            <meshBasicMaterial color={red ? 'red' : 'blue'} />
          </mesh>
        </XR>
      </Canvas>
    </>
  )
}

Entering VR mode for the first time works fine, but if I pause and then resume, the browser crashes (just keeps loading).

Here is the console error:

Image

Yanbing-Han avatar Jun 13 '25 07:06 Yanbing-Han

@Yanbing-Han does the error happen on any other experience? :)

bbohlender avatar Jun 13 '25 09:06 bbohlender

yes, I also encountered this error on other project, but the code is much more complicated.

Yanbing-Han avatar Jun 16 '25 09:06 Yanbing-Han

@Yanbing-Han please check if you can reproduce the problem in the official examples: https://immersive-web.github.io/webxr-samples/

if that is the case, its not a library problem but a device/OS/browser issue that I have no control over and you should reach out to pico in that case

bbohlender avatar Jun 16 '25 12:06 bbohlender

thanks !

Yanbing-Han avatar Jun 25 '25 10:06 Yanbing-Han