On Start Expo camera crashing for some devices.

Please provide the following:

  1. SDK Version:
    "expo": ">=44.0.0-0 <45.0.0",
    "expo-av": "~10.2.0",
    "expo-camera": "~12.1.2",
  1. Platforms(Android/iOS/web/all): Android (React Native - Bare)

Stack Track from Firebase

Fatal Exception: java.lang.IllegalStateException
expo.modules.camera.CameraViewManager.onDropViewInstance (CameraViewManager.kt:38)
 <Camera
          ref={cameraRef}
          style={styles.camContainer}
          type={Camera.Constants.Type.front}
          ratio={'4:3'}
          autoFocus={Camera.Constants.AutoFocus.auto}
          onCameraReady={onCameraReady}
          onMountError={(error) => {
            console.log('cammera error', error);
          }}
          useCamera2Api={
            deviceInfoModule.getBrand() === 'Redmi' ||
            deviceInfoModule.getBrand() === 'POCO'
              ? false
              : true
          }
        />

Hey @mohammed7,

Can you please be more explicit about which Expo SDK version you are using in your app?

The way it’s specified, doesn’t seem to be correct. Generally, the SDK version in package.json file is mentioned as "expo": "44.0.0".

You may have to re-install all packages after specifying the correct version.

That was automaticaly added when i had ran this command npx install-expo-modules@latest, Today i ran it again and now the version is "expo": "^45.0.0",

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.