react-native-vision-camera
react-native-vision-camera copied to clipboard
🐛 `[session/invalid-output-configuration]`: Cannot create session on some Xiaomi phones
What's happening?
Camera.onError(session/invalid-output-configuration): Failed to configure the Camera Session because the output/stream configurations are invalid! [session/invalid-output-configuration: Failed to configure the Camera Session because the output/stream configurations are invalid!]
Reproduceable Code
import React, {useState, useEffect, useRef} from 'react';
import {
SafeAreaView,
StyleSheet,
Text,
View,
ActivityIndicator,
TouchableOpacity,
Image,
Dimensions,
} from 'react-native';
import {Camera, useCameraDevice} from 'react-native-vision-camera';
const {width, height} = Dimensions.get('window');
export default function App() {
const camera = useRef(null);
const [cameraPermission, setCameraPermission] = useState();
const [photoPath, setPhotoPath] = useState();
useEffect(() => {
(async () => {
const cameraPermissionStatus =
await Camera.requestCameraPermission();
setCameraPermission(cameraPermissionStatus);
})();
}, []);
const device = useCameraDevice('front');
console.log(camera);
const handleTakePhoto = async () => {
try {
const photo = await camera.current.takePhoto({
flash: 'on',
});
setPhotoPath(photo.path);
} catch (e) {
console.log(e);
}
};
const renderContent = () => {
if (cameraPermission !== 'granted') {
return null;
}
if (device == null) {
return <ActivityIndicator size="large" color="#1C6758" />;
}
return (
<View>
<Camera
style={{
...StyleSheet.absoluteFill,
flex: 1,
width,
height,
}}
ref={camera}
device={device}
photo={true}
isActive={true}
/>
<TouchableOpacity style={styles.btn} onPress={handleTakePhoto}>
<Text style={styles.btnText}>Take Photo</Text>
</TouchableOpacity>
{photoPath && (
<Image style={styles.image} source={{uri: photoPath}} />
)}
</View>
);
};
return (
<View style={styles.screen}>
<SafeAreaView style={styles.saveArea}>
<View style={styles.header}>
<Text style={styles.headerText}>
React Native Camera Libraries
</Text>
</View>
</SafeAreaView>
<View style={styles.caption}>
<Text style={styles.captionText}>
Welcome To React-Native-Vision-Camera Tutorial
</Text>
</View>
{renderContent()}
</View>
);
}
const styles = StyleSheet.create({
screen: {
flex: 1,
backgroundColor: '#EEF2E6',
},
saveArea: {
backgroundColor: '#3D8361',
},
header: {
height: 50,
backgroundColor: '#3D8361',
alignItems: 'center',
justifyContent: 'center',
},
headerText: {
color: '#ffffff',
fontSize: 20,
},
caption: {
height: 100,
justifyContent: 'center',
alignItems: 'center',
},
captionText: {
color: '#100F0F',
fontSize: 16,
fontWeight: '600',
},
camera: {
height: 460,
width: '92%',
alignSelf: 'center',
},
photoAndVideoCamera: {
height: 360,
},
barcodeText: {
paddingHorizontal: 16,
paddingVertical: 20,
textAlign: 'center',
color: '#100F0F',
fontSize: 24,
},
pickerSelect: {
paddingVertical: 12,
},
image: {
marginHorizontal: 16,
paddingTop: 8,
width: 80,
height: 80,
},
dropdownPickerWrapper: {
paddingHorizontal: 16,
paddingBottom: 16,
zIndex: 9,
},
btnGroup: {
margin: 16,
flexDirection: 'row',
},
btn: {
backgroundColor: '#63995f',
margin: 13,
paddingHorizontal: 20,
paddingVertical: 16,
borderRadius: 8,
},
btnText: {
color: '#ffffff',
fontSize: 20,
textAlign: 'center',
},
video: {
marginHorizontal: 16,
height: 100,
width: 80,
position: 'absolute',
right: 0,
bottom: -80,
},
});
Relevant log output
05-08 22:23:38.440 6636 6636 I CameraSession: Camera Lifecycle changed to CREATED!
05-08 22:23:38.440 490 1912 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4
05-08 22:23:38.441 6636 6636 I CameraView: Updating CameraSession...
05-08 22:23:38.447 6636 6636 I CameraSession: configure { ... }: Waiting for lock...
05-08 22:23:38.447 6636 6636 I CameraSession: configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=true, outputsChanged=true, sidePropsChanged=true, isActiveChanged=true)
05-08 22:23:38.447 6636 6636 I CameraSession: Creating new Outputs for Camera #1...
05-08 22:23:38.447 6636 6636 I CameraSession: Using FPS Range: null
05-08 22:23:38.447 6636 6636 I CameraSession: Creating Preview output...
05-08 22:23:38.447 6636 6636 I CameraSession: Creating Photo output...
05-08 22:23:38.447 6636 6636 I CameraSession: Successfully created new Outputs for Camera #1!
05-08 22:23:38.447 6636 6636 I CameraSession: Binding Camera #1...
05-08 22:23:38.448 6636 6636 I CameraSession: Binding 2 use-cases...
05-08 22:23:38.450 6636 6636 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
05-08 22:23:38.450 6636 6636 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
05-08 22:23:38.453 6636 6636 D DynamicRangeResolver: Resolved dynamic range for use case androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79 to no compatible HDR dynamic ranges.
05-08 22:23:38.453 6636 6636 D DynamicRangeResolver: DynamicRange@bd6951a{encoding=UNSPECIFIED, bitDepth=0}
05-08 22:23:38.453 6636 6636 D DynamicRangeResolver: ->
05-08 22:23:38.453 6636 6636 D DynamicRangeResolver: DynamicRange@ec957c5{encoding=SDR, bitDepth=8}
05-08 22:23:38.455 6636 6636 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
05-08 22:23:38.455 6636 6636 D DeferrableSurface: Surface created[total_surfaces=1, used_surfaces=0](androidx.camera.core.processing.SurfaceEdge$SettableSurface@ec82015}
05-08 22:23:38.456 6636 6636 D DeferrableSurface: Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@17a891}
05-08 22:23:38.457 6636 6636 D DeferrableSurface: New surface in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.SurfaceRequest$2@17a891}
05-08 22:23:38.457 6636 6636 D DeferrableSurface: use count+1, useCount=1 androidx.camera.core.SurfaceRequest$2@17a891
05-08 22:23:38.457 6636 6636 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
05-08 22:23:38.458 6636 6636 D ImageCapture: createPipeline(cameraId: 1, streamSpec: StreamSpec{resolution=1920x1440, dynamicRange=DynamicRange@ec957c5{encoding=SDR, bitDepth=8}, expectedFrameRateRange=[0, 0], implementationOptions=androidx.camera.camera2.impl.Camera2ImplConfig@8e78982})
05-08 22:23:38.458 6636 6636 D DeferrableSurface: Surface created[total_surfaces=3, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@3075893}
05-08 22:23:38.459 6636 6636 I CameraSession: Successfully bound Camera #1!
05-08 22:23:38.459 6636 6636 I CameraSession: Camera Lifecycle changed to STARTED!
05-08 22:23:38.459 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Use case androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864 ACTIVE
05-08 22:23:38.459 6636 6636 I CameraView: invokeOnStopped()
05-08 22:23:38.460 6636 6707 D UseCaseAttachState: Active and attached use case: [] for camera: 1
05-08 22:23:38.460 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Use case androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827 ACTIVE
05-08 22:23:38.460 6636 6707 D UseCaseAttachState: Active and attached use case: [] for camera: 1
05-08 22:23:38.460 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Use case androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864 ACTIVE
05-08 22:23:38.460 6636 6636 I CameraSession: Camera State: CLOSED (has error: false)
05-08 22:23:38.460 6636 6707 D UseCaseAttachState: Active and attached use case: [] for camera: 1
05-08 22:23:38.460 6636 6636 I CameraSession: Camera Lifecycle changed to RESUMED!
05-08 22:23:38.460 6636 6636 I CameraSession: configure { ... }: Completed CameraSession Configuration! (State: RESUMED)
05-08 22:23:38.460 6636 6707 D UseCaseAttachState: Active and attached use case: [] for camera: 1
05-08 22:23:38.460 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Use cases [androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827, androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864] now ATTACHED
05-08 22:23:38.461 6636 6707 D UseCaseAttachState: All use case: [androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864, androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827] for camera: 1
05-08 22:23:38.461 6636 6707 D Camera2CameraImpl: mMeteringRepeating is ATTACHED, SessionConfig Surfaces: 2, CaptureConfig Surfaces: 1
05-08 22:23:38.461 6636 6707 D UseCaseAttachState: Active and attached use case: [androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864, androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827] for camera: 1
05-08 22:23:38.461 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Resetting Capture Session
05-08 22:23:38.461 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Releasing session in state INITIALIZED
05-08 22:23:38.461 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Attempting to force open the camera.
05-08 22:23:38.461 6636 6707 D CameraStateRegistry: tryOpenCamera(Camera@d5da260[id=1]) [Available Cameras: 1, Already Open: false (Previous state: CLOSED)] --> SUCCESS
05-08 22:23:38.461 6636 6707 D CameraStateRegistry: Recalculating open cameras:
05-08 22:23:38.461 6636 6707 D CameraStateRegistry: Camera State
05-08 22:23:38.461 6636 6707 D CameraStateRegistry: -------------------------------------------------------------------
05-08 22:23:38.461 6636 6707 D CameraStateRegistry: Camera@d5da260[id=1] OPENING
05-08 22:23:38.461 6636 6707 D CameraStateRegistry: -------------------------------------------------------------------
05-08 22:23:38.461 6636 6707 D CameraStateRegistry: Open count: 1 (Max allowed: 1)
05-08 22:23:38.462 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Opening camera.
05-08 22:23:38.463 6636 6636 D PreviewView: Surface requested by Preview.
05-08 22:23:38.467 6636 6636 D SurfaceViewImpl: Surface created.
05-08 22:23:38.467 6636 6636 D SurfaceViewImpl: Surface changed. Size: 1600x1200
05-08 22:23:38.473 6636 6636 D PreviewView: Preview transformation info updated. TransformationInfo{getCropRect=Rect(0, 0 - 1600, 1200), getRotationDegrees=270, getTargetRotation=-1, hasCameraTransform=true, getSensorToBufferTransform=Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}, isMirroring=true}
05-08 22:23:38.473 6636 6636 D PreviewTransform: Transformation info set: TransformationInfo{getCropRect=Rect(0, 0 - 1600, 1200), getRotationDegrees=270, getTargetRotation=-1, hasCameraTransform=true, getSensorToBufferTransform=Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}, isMirroring=true} 1600x1200 true
05-08 22:23:38.473 6636 6636 D CameraOrientationUtil: getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
05-08 22:23:38.473 6636 6636 D SurfaceViewImpl: Surface set on Preview.
05-08 22:23:38.473 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Transitioning camera internal state: INITIALIZED --> OPENING
05-08 22:23:38.473 6636 6707 D CameraStateMachine: New public camera state CameraState{type=OPENING, error=null} from OPENING and null
05-08 22:23:38.473 6636 6707 D CameraStateMachine: Publishing new public camera state CameraState{type=OPENING, error=null}
05-08 22:23:38.473 6636 6636 I CameraSession: Camera State: OPENING (has error: false)
05-08 22:23:38.474 6636 6707 D UseCaseAttachState: All use case: [androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864, androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827] for camera: 1
05-08 22:23:38.475 364 705 I CameraService: CameraService::connect call (PID -1 "com.hubsoft_client_app.dev", camera ID 1) for HAL version default and Camera API version 2
05-08 22:23:38.476 364 705 I Camera2ClientBase: Camera 1: Opened. Client: com.hubsoft_client_app.dev (PID 6636, UID 10168)
05-08 22:23:38.476 364 705 I CameraDeviceClient: CameraDeviceClient 1: Opened
05-08 22:23:38.477 364 705 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=1, newStatus=0
05-08 22:23:38.478 302 358 E libc : Access denied finding property "persist.camera.profiler.open_close"
05-08 22:23:38.476 302 302 W HwBinder:302_1: type=1400 audit(0.0:274): avc: denied { read } for name="u:object_r:default_prop:s0" dev="tmpfs" ino=9319 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0
05-08 22:23:38.479 6636 6695 I CameraDevices: Camera #1 is now unavailable.
05-08 22:23:38.480 490 862 E JavaBinder: *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
05-08 22:23:38.480 490 862 E JavaBinder: java.lang.RuntimeException: android.os.RemoteException: Couldn't get ApplicationInfo for package [email protected]::ISensorManager
05-08 22:23:38.480 490 862 E JavaBinder: at android.os.Parcel.writeException(Parcel.java:2158)
05-08 22:23:38.480 490 862 E JavaBinder: at android.os.Binder.execTransactInternal(Binder.java:1178)
05-08 22:23:38.480 490 862 E JavaBinder: at android.os.Binder.execTransact(Binder.java:1123)
05-08 22:23:38.480 490 862 E JavaBinder: Caused by: android.os.RemoteException: Couldn't get ApplicationInfo for package [email protected]::ISensorManager
05-08 22:23:38.480 490 862 E JavaBinder: at com.android.server.pm.PackageManagerService$PackageManagerNative.getTargetSdkVersionForPackage(PackageManagerService.java:23980)
05-08 22:23:38.480 490 862 E JavaBinder: at android.content.pm.IPackageManagerNative$Stub.onTransact(IPackageManagerNative.java:255)
05-08 22:23:38.480 490 862 E JavaBinder: at android.os.Binder.execTransactInternal(Binder.java:1159)
05-08 22:23:38.480 490 862 E JavaBinder: ... 1 more
05-08 22:23:38.481 302 358 W EmulatedRequestState: InitializeControlDefaults: No available post RAW boost! Setting default!
05-08 22:23:38.481 302 358 I chatty : uid=1000(system) HwBinder:302_1 identical 2 lines
05-08 22:23:38.481 302 358 W EmulatedRequestState: InitializeControlDefaults: No available post RAW boost! Setting default!
05-08 22:23:38.481 364 705 I CameraProviderManager: Camera device [email protected]/internal/1 torch status is now NOT_AVAILABLE
05-08 22:23:38.481 364 705 I CameraService: onTorchStatusChangedLocked: Torch status changed for cameraId=1, newStatus=0
05-08 22:23:38.481 180 180 I hwservicemanager: getTransport: Cannot find entry [email protected]::IMapper/default in either framework or device manifest.
05-08 22:23:38.482 302 358 D HostConnection: createUnique: call
05-08 22:23:38.483 302 358 D HostConnection: HostConnection::get() New Host Connection established 0xb4000074261b0f10, tid 358
05-08 22:23:38.483 302 358 D goldfish-address-space: allocate: Ask for block of size 0x100
05-08 22:23:38.483 302 358 D goldfish-address-space: allocate: ioctl allocate returned offset 0x1f7ff8000 size 0x8000
05-08 22:23:38.483 302 358 D GCH_CameraDeviceSession: FindLibraryPaths: Unable to open directory /vendor/lib64/camera/capture_sessions/ (No such file or directory)
05-08 22:23:38.483 302 358 I GCH_CameraDeviceSession: Create: Created a device session for camera 1 with 3 physical cameras: 24 25 26
05-08 22:23:38.484 302 358 E FMQ : grantorIdx must be less than 3
05-08 22:23:38.484 302 358 E FMQ : grantorIdx must be less than 3
05-08 22:23:38.484 180 180 I hwservicemanager: getTransport: Cannot find entry [email protected]::IMapper/default in either framework or device manifest.
05-08 22:23:38.484 302 358 D HostConnection: createUnique: call
05-08 22:23:38.484 302 358 D HostConnection: HostConnection::get() New Host Connection established 0xb4000074261b0b50, tid 358
05-08 22:23:38.485 302 358 D goldfish-address-space: allocate: Ask for block of size 0x100
05-08 22:23:38.485 302 358 D goldfish-address-space: allocate: ioctl allocate returned offset 0x1f7ff8000 size 0x8000
05-08 22:23:38.485 180 180 E SELinux : avc: denied { find } for interface=android.hardware.thermal::IThermal sid=u:r:hal_camera_default:s0 pid=302 scontext=u:r:hal_camera_default:s0 tcontext=u:object_r:hal_thermal_hwservice:s0 tclass=hwservice_manager permissive=0
05-08 22:23:38.485 302 358 E GCH_HidlCameraDeviceSession: Initialize: Getting thermal failed.
05-08 22:23:38.485 302 358 E GCH_HidlCameraDeviceSession: RegisterThermalChangedCallback: thermal was not initialized.
05-08 22:23:38.485 302 358 W GCH_CameraDeviceSession: SetSessionCallback: Registering thermal callback failed: No such device(-19)
05-08 22:23:38.485 364 705 E FMQ : grantorIdx must be less than 3
05-08 22:23:38.486 364 705 E FMQ : grantorIdx must be less than 3
05-08 22:23:38.487 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Use case androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827 ACTIVE
05-08 22:23:38.488 6636 6707 D UseCaseAttachState: Active and attached use case: [androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864, androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827] for camera: 1
05-08 22:23:38.488 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Use case androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864 ACTIVE
05-08 22:23:38.489 6636 6707 D UseCaseAttachState: Active and attached use case: [androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864, androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827] for camera: 1
05-08 22:23:38.489 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} CameraDevice.onOpened()
05-08 22:23:38.489 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Transitioning camera internal state: OPENING --> OPENED
05-08 22:23:38.489 6636 6707 D CameraStateRegistry: Recalculating open cameras:
05-08 22:23:38.489 6636 6707 D CameraStateRegistry: Camera State
05-08 22:23:38.489 6636 6707 D CameraStateRegistry: -------------------------------------------------------------------
05-08 22:23:38.489 6636 6707 D CameraStateRegistry: Camera@d5da260[id=1] OPEN
05-08 22:23:38.489 6636 6707 D CameraStateRegistry: -------------------------------------------------------------------
05-08 22:23:38.489 6636 6707 D CameraStateRegistry: Open count: 1 (Max allowed: 1)
05-08 22:23:38.489 6636 6707 D CameraStateMachine: New public camera state CameraState{type=OPEN, error=null} from OPEN and null
05-08 22:23:38.489 6636 6707 D CameraStateMachine: Publishing new public camera state CameraState{type=OPEN, error=null}
05-08 22:23:38.489 6636 6636 I CameraSession: Camera State: OPEN (has error: false)
05-08 22:23:38.489 6636 6636 I CameraView: invokeOnInitialized()
05-08 22:23:38.489 6636 6707 D UseCaseAttachState: All use case: [androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864, androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827] for camera: 1
05-08 22:23:38.490 6636 6707 D UseCaseAttachState: Active and attached use case: [androidx.camera.core.ImageCapture-c9205850-3b92-4ed1-9e2a-67c38d392cc0249896864, androidx.camera.core.Preview-127c013d-7289-4da7-bbbb-4438a9096e79193265827] for camera: 1
05-08 22:23:38.491 6636 6707 D SyncCaptureSessionBase: [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@9349c73] getSurface done with results: [Surface(name=null)/@0x7049c94, Surface(name=null)/@0x2f1f0e2]
05-08 22:23:38.491 6636 6707 D CaptureSession: Opening capture session.
05-08 22:23:38.493 302 7370 E EmulatedRequestState: GetDefaultRequest: Unsupported request type: 5
05-08 22:23:38.493 302 7370 E GCH_CameraDeviceSession: ConstructDefaultRequestSettings: Construct default settings for type 5 failed: Invalid argument(-22)
05-08 22:23:38.493 364 705 I Camera3-Device: createDefaultRequest: template 5 is not supported on this camera device
05-08 22:23:38.494 6636 6707 W CaptureSession: Opening session with fail OPENING
05-08 22:23:38.494 6636 6707 W CaptureSession: java.lang.IllegalArgumentException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1001)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:165)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureRequest(CameraDeviceImpl.java:793)
05-08 22:23:38.494 6636 6707 W CaptureSession: at androidx.camera.camera2.internal.Camera2CaptureRequestBuilder.buildWithoutTarget(Camera2CaptureRequestBuilder.java:213)
05-08 22:23:38.494 6636 6707 W CaptureSession: at androidx.camera.camera2.internal.CaptureSession.openCaptureSession(CaptureSession.java:334)
05-08 22:23:38.494 6636 6707 W CaptureSession: at androidx.camera.camera2.internal.CaptureSession.lambda$open$0$androidx-camera-camera2-internal-CaptureSession(CaptureSession.java:215)
05-08 22:23:38.494 6636 6707 W CaptureSession: at androidx.camera.camera2.internal.CaptureSession$$ExternalSyntheticLambda2.apply(Unknown Source:8)
05-08 22:23:38.494 6636 6707 W CaptureSession: at androidx.camera.core.impl.utils.futures.ChainingListenableFuture.run(ChainingListenableFuture.java:203)
05-08 22:23:38.494 6636 6707 W CaptureSession: at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:231)
05-08 22:23:38.494 6636 6707 W CaptureSession: at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:173)
05-08 22:23:38.494 6636 6707 W CaptureSession: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
05-08 22:23:38.494 6636 6707 W CaptureSession: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
05-08 22:23:38.494 6636 6707 W CaptureSession: at java.lang.Thread.run(Thread.java:923)
05-08 22:23:38.494 6636 6707 W CaptureSession: Caused by: android.os.ServiceSpecificException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22) (code 3)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.os.Parcel.createException(Parcel.java:2357)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.os.Parcel.readException(Parcel.java:2340)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.os.Parcel.readException(Parcel.java:2282)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.createDefaultRequest(ICameraDeviceUser.java:976)
05-08 22:23:38.494 6636 6707 W CaptureSession: at android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:163)
05-08 22:23:38.494 6636 6707 W CaptureSession: ... 11 more
05-08 22:23:38.494 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Transitioning camera internal state: OPENED --> OPENED
05-08 22:23:38.494 6636 6707 D CameraStateMachine: New public camera state CameraState{type=OPEN, error=StateError{code=4, cause=java.lang.IllegalArgumentException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)}} from OPEN and StateError{code=4, cause=java.lang.IllegalArgumentException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)}
05-08 22:23:38.494 6636 6707 D CameraStateMachine: Publishing new public camera state CameraState{type=OPEN, error=StateError{code=4, cause=java.lang.IllegalArgumentException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)}}
05-08 22:23:38.494 6636 6636 I CameraSession: Camera State: OPEN (has error: true)
05-08 22:23:38.494 6636 6636 E CameraView: invokeOnError(...):
05-08 22:23:38.494 6636 6636 W System.err: com.mrousavy.camera.core.InvalidOutputConfigurationError: Failed to configure the Camera Session because the output/stream configurations are invalid!
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: Unable to configure camera Camera@d5da260[id=1]
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: java.lang.IllegalArgumentException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1001)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:165)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureRequest(CameraDeviceImpl.java:793)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at androidx.camera.camera2.internal.Camera2CaptureRequestBuilder.buildWithoutTarget(Camera2CaptureRequestBuilder.java:213)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at androidx.camera.camera2.internal.CaptureSession.openCaptureSession(CaptureSession.java:334)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at androidx.camera.camera2.internal.CaptureSession.lambda$open$0$androidx-camera-camera2-internal-CaptureSession(CaptureSession.java:215)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at androidx.camera.camera2.internal.CaptureSession$$ExternalSyntheticLambda2.apply(Unknown Source:8)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at androidx.camera.core.impl.utils.futures.ChainingListenableFuture.run(ChainingListenableFuture.java:203)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:231)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:173)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at java.lang.Thread.run(Thread.java:923)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: Caused by: android.os.ServiceSpecificException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22) (code 3)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.os.Parcel.createException(Parcel.java:2357)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.os.Parcel.readException(Parcel.java:2340)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.os.Parcel.readException(Parcel.java:2282)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.createDefaultRequest(ICameraDeviceUser.java:976)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: at android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:163)
05-08 22:23:38.494 6636 6707 E Camera2CameraImpl: ... 11 more
05-08 22:23:38.494 6636 6636 W System.err: at com.mrousavy.camera.extensions.StateError_toCameraErrorKt.toCameraError(StateError+toCameraError.kt:23)
05-08 22:23:38.494 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Resetting Capture Session
05-08 22:23:38.495 6636 6636 W System.err: at com.mrousavy.camera.core.CameraSession$configureCamera$2.invoke(CameraSession.kt:426)
05-08 22:23:38.495 6636 6636 W System.err: at com.mrousavy.camera.core.CameraSession$configureCamera$2.invoke(CameraSession.kt:414)
05-08 22:23:38.495 6636 6636 W System.err: at com.mrousavy.camera.core.CameraSession.configureCamera$lambda$9(CameraSession.kt:414)
05-08 22:23:38.495 6636 6636 W System.err: at com.mrousavy.camera.core.CameraSession.$r8$lambda$6yhdgdG34C2UHCXviHGpbs3-Kgs(Unknown Source:0)
05-08 22:23:38.495 6636 6636 W System.err: at com.mrousavy.camera.core.CameraSession$$ExternalSyntheticLambda1.onChanged(Unknown Source:2)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
05-08 22:23:38.495 6636 6707 D Camera2CameraImpl: {Camera@d5da260[id=1]} Releasing session in state OPENED
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.camera2.internal.Camera2CameraInfoImpl$RedirectableLiveData$$ExternalSyntheticLambda0.onChanged(Unknown Source:2)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.MediatorLiveData$Source.onChanged(MediatorLiveData.java:152)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.lifecycle.LiveData$1.run(LiveData.java:93)
05-08 22:23:38.495 6636 6636 W System.err: at android.os.Handler.handleCallback(Handler.java:938)
05-08 22:23:38.495 6636 6636 W System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
05-08 22:23:38.495 6636 6636 W System.err: at android.os.Looper.loop(Looper.java:223)
05-08 22:23:38.495 6636 6636 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7656)
05-08 22:23:38.495 6636 6636 W System.err: at java.lang.reflect.Method.invoke(Native Method)
05-08 22:23:38.495 6636 6636 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
05-08 22:23:38.495 6636 6636 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
05-08 22:23:38.495 6636 6636 W System.err: Caused by: java.lang.IllegalArgumentException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)
05-08 22:23:38.495 6636 6636 W System.err: at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1001)
05-08 22:23:38.495 6636 6636 W System.err: at android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:165)
05-08 22:23:38.495 6636 6636 W System.err: at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureRequest(CameraDeviceImpl.java:793)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.camera2.internal.Camera2CaptureRequestBuilder.buildWithoutTarget(Camera2CaptureRequestBuilder.java:213)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.camera2.internal.CaptureSession.openCaptureSession(CaptureSession.java:334)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.camera2.internal.CaptureSession.lambda$open$0$androidx-camera-camera2-internal-CaptureSession(CaptureSession.java:215)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.camera2.internal.CaptureSession$$ExternalSyntheticLambda2.apply(Unknown Source:8)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.core.impl.utils.futures.ChainingListenableFuture.run(ChainingListenableFuture.java:203)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:231)
05-08 22:23:38.495 6636 6636 W System.err: at androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:173)
05-08 22:23:38.495 6636 6636 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
05-08 22:23:38.495 6636 6636 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
05-08 22:23:38.495 6636 6636 W System.err: at java.lang.Thread.run(Thread.java:923)
05-08 22:23:38.495 6636 6636 W System.err: Caused by: android.os.ServiceSpecificException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22) (code 3)
05-08 22:23:38.495 6636 6636 W System.err: at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
05-08 22:23:38.495 6636 6636 W System.err: at android.os.Parcel.createException(Parcel.java:2357)
05-08 22:23:38.495 6636 6636 W System.err: at android.os.Parcel.readException(Parcel.java:2340)
05-08 22:23:38.495 6636 6636 W System.err: at android.os.Parcel.readException(Parcel.java:2282)
05-08 22:23:38.495 6636 6636 W System.err: at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.createDefaultRequest(ICameraDeviceUser.java:976)
05-08 22:23:38.495 6636 6636 W System.err: at android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:163)
05-08 22:23:38.495 6636 6636 W System.err: ... 11 more
05-08 22:23:38.500 6636 6694 E ReactNativeJS: 'Camera.onError(session/invalid-output-configuration): Failed to configure the Camera Session because the output/stream configurations are invalid!', { [session/invalid-output-configuration: Failed to configure the Camera Session because the output/stream configurations are invalid!]
05-08 22:23:38.500 6636 6694 E ReactNativeJS: name: 'session/invalid-output-configuration',
05-08 22:23:38.500 6636 6694 E ReactNativeJS: _code: 'session/invalid-output-configuration',
05-08 22:23:38.500 6636 6694 E ReactNativeJS: _message: 'Failed to configure the Camera Session because the output/stream configurations are invalid!',
05-08 22:23:38.500 6636 6694 E ReactNativeJS: _cause:
05-08 22:23:38.500 6636 6694 E ReactNativeJS: { cause:
05-08 22:23:38.500 6636 6694 E ReactNativeJS: { stacktrace: 'android.os.ServiceSpecificException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22) (code 3)\n\tat android.os.Parcel.createExceptionOrNull(Parcel.java:2387)\n\tat android.os.Parcel.createException(Parcel.java:2357)\n\tat android.os.Parcel.readException(Parcel.java:2340)\n\tat android.os.Parcel.readException(Parcel.java:2282)\n\tat android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.createDefaultRequest(ICameraDeviceUser.java:976)\n\tat android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:163)\n\tat android.hardware.camera2.impl.CameraDeviceImpl.createCaptureRequest(CameraDeviceImpl.java:793)\n\tat androidx.camera.camera2.internal.Camera2CaptureRequestBuilder.buildWithoutTarget(Camera2CaptureRequestBuilder.java:213)\n\tat androidx.camera.camera2.internal.CaptureSession.openCaptureSession(CaptureSession.java:334)\n\tat androidx.camera.camera2.internal.CaptureSession.lambda$open$0$androidx-camera-camera2-internal-CaptureSession(CaptureSession.java:215)\n\tat androidx.camera.camera2.internal.CaptureSession$$ExternalSyntheticLambda2.apply(Unknown Source:8)\n\tat androidx.camera.core.impl.utils.futures.ChainingListenableFuture.run(ChainingListenableFuture.java:203)\n\tat androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:231)\n\tat androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:173)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n\tat java.lang.Thread.run(Thread.java:923)\n',
05-08 22:23:38.500 6636 6694 E ReactNativeJS: message: 'createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)' },
05-08 22:23:38.500 6636 6694 E ReactNativeJS: stacktrace: 'java.lang.IllegalArgumentException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22)\n\tat android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1001)\n\tat android.hardware.camera2.impl.ICameraDeviceUserWrapper.createDefaultRequest(ICameraDeviceUserWrapper.java:165)\n\tat android.hardware.camera2.impl.CameraDeviceImpl.createCaptureRequest(CameraDeviceImpl.java:793)\n\tat androidx.camera.camera2.internal.Camera2CaptureRequestBuilder.buildWithoutTarget(Camera2CaptureRequestBuilder.java:213)\n\tat androidx.camera.camera2.internal.CaptureSession.openCaptureSession(CaptureSession.java:334)\n\tat androidx.camera.camera2.internal.CaptureSession.lambda$open$0$androidx-camera-camera2-internal-CaptureSession(CaptureSession.java:215)\n\tat androidx.camera.camera2.internal.CaptureSession$$ExternalSyntheticLambda2.apply(Unknown Source:8)\n\tat androidx.camera.core.impl.utils.futures.ChainingListenableFuture.run(ChainingListenableFuture.java:203)\n\tat androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.workOnQueue(SequentialExecutor.java:231)\n\tat androidx.camera.core.impl.utils.executor.SequentialExecutor$QueueWorker.run(SequentialExecutor.java:173)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n\tat java.lang.Thread.run(Thread.java:923)\nCaused by: android.os.ServiceSpecificException: createDefaultRequest:1613: Camera 1: Template ID 5 is invalid or not supported: Invalid argument (-22) (code 3)\n\tat android.os.Parcel.createExceptionOrN
05-08 22:23:38.591 299 6943 W android.hardware.audio.service.ranchu: TinyalsaSink::write:125 pcm_write was late reading frames, dropping 22131 us of audio
05-08 22:23:41.359 299 6943 I chatty : uid=1041(audioserver) audio.service.r identical 125 lines
05-08 22:23:41.380 299 6943 W android.hardware.audio.service.ranchu: TinyalsaSink::write:125 pcm_write was late reading frames, dropping 22131 us of audio
05-08 22:23:41.399 490 1912 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4
05-08 22:23:43.317 180 180 E SELinux : avc: denied { find } for interface=android.hardware.memtrack::IMemtrack sid=u:r:gmscore_app:s0:c512,c768 pid=6411 scontext=u:r:gmscore_app:s0:c512,c768 tcontext=u:object_r:hal_memtrack_hwservice:s0 tclass=hwservice_manager permissive=0
05-08 22:23:43.317 6411 7434 E memtrack: Couldn't load memtrack module
05-08 22:23:43.485 1517 1569 I PeriodicStatsRunner: PeriodicStatsRunner.call():180 call()
05-08 22:23:43.485 1517 1569 I PeriodicStatsRunner: PeriodicStatsRunner.call():184 No submit PeriodicStats since input started.
05-08 22:23:48.573 299 7414 W android.hardware.audio.service.ranchu: TinyalsaSink::consumeThread:176 pcm_write failed with res=-1
05-08 22:23:53.077 490 1857 I ActivityManager: Killing 6349:com.google.android.partnersetup/u0a117 (adj 985): empty #17
05-08 22:23:53.090 297 297 I Zygote : Process 6349 exited due to signal 9 (Killed)
05-08 22:23:53.115 490 532 I libprocessgroup: Successfully killed process cgroup uid 10117 pid 6349 in 35ms
Camera Device
{"formats": [{"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 1440, "photoWidth": 1920, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 1080, "photoWidth": 1920, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 960, "photoWidth": 1920, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 1200, "photoWidth": 1600, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 1080, "photoWidth": 1440, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 960, "photoWidth": 1280, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 720, "photoWidth": 1280, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 768, "photoWidth": 1024, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 600, "photoWidth": 800, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 480, "photoWidth": 720, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 480, "photoWidth": 640, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 360, "photoWidth": 640, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 288, "photoWidth": 352, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 77.70146040253039, "maxFps": 30, "maxISO": 1000, "minFps": 7, "minISO": 100, "photoHeight": 240, "photoWidth": 320, "pixelFormats": [Array], "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}], "hardwareLevel": "full", "hasFlash": true, "hasTorch": true, "id": "1", "isMultiCam": true, "maxExposure": 24, "maxZoom": 8, "minExposure": -24, "minFocusDistance": 0, "minZoom": 1, "name": "1 (FRONT) androidx.camera.camera2", "neutralZoom": 1, "physicalDevices": ["wide-angle-camera", "wide-angle-camera", "telephoto-camera", "telephoto-camera"], "position": "front", "sensorOrientation": "landscape-right", "supportsFocus": true, "supportsLowLightBoost": false, "supportsRawCapture": false}
Device
Android 10, 11, 12 (Especially on Xiaomi phones)
VisionCamera Version
4.0.3
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (⚠️ your issue might get ignored & closed if you don't try this)
Additional information
- [ ] I am using Expo
- [ ] I have enabled Frame Processors (react-native-worklets-core)
- [X] I have read the Troubleshooting Guide
- [X] I agree to follow this project's Code of Conduct
- [X] I searched for similar issues in this repository and found none.
It was able to resolve this issue by rolling back to version 3.9.2.
Might be related. #2777
Might be related. #2777
@iqbaldev46 thank you so much! This solves my problem
Having the same issue on RedMi Note 7 Pro with Android 11
"react-native-vision-camera": "^4.0.3",
Hey - just created a PR that maybe fixes this - can you test if that works for you? https://github.com/mrousavy/react-native-vision-camera/pull/2897 🙏
Hi, I'm still getting this error on my Android test device, Samsung Galaxy S21.
I'm using the latest version 4.0.5.
I'm using the prop photoQualityBalance="speed".
ERROR Camera.onError(session/invalid-output-configuration): Failed to configure the Camera Session because the output/stream configurations are invalid! [session/invalid-output-configuration: Failed to configure the Camera Session because the output/stream configurations are invalid!]
Camera device
{"formats": [{"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2268, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1816, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1728, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2160, "photoWidth": 3840, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 3024, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 2400, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1440, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 824, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1440, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1088, "photoWidth": 1088, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 960, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 720, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 360, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 144, "photoWidth": 176, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 2160, "videoStabilizationModes": [Array], "videoWidth": 3840}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2268, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1816, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1728, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2160, "photoWidth": 3840, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 3024, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 2400, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1440, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 824, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1440, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1088, "photoWidth": 1088, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 960, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 720, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 360, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 144, "photoWidth": 176, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 1080, "videoStabilizationModes": [Array], "videoWidth": 1920}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2268, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1816, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1728, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2160, "photoWidth": 3840, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 3024, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 2400, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1440, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 824, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1440, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1088, "photoWidth": 1088, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 960, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 720, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 360, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 144, "photoWidth": 176, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2268, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1816, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1728, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2160, "photoWidth": 3840, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 3024, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 2400, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1440, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 824, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1440, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1088, "photoWidth": 1088, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 960, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 720, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 360, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 144, "photoWidth": 176, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2268, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1816, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1728, "photoWidth": 4032, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 2160, "photoWidth": 3840, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 3024, "photoWidth": 3024, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 2400, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1440, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 824, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1080, "photoWidth": 1440, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 1088, "photoWidth": 1088, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 720, "photoWidth": 960, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 720, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 360, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 80.0605180983776, "maxFps": 30, "maxISO": 3200, "minFps": 7, "minISO": 50, "photoHeight": 144, "photoWidth": 176, "supportsDepthCapture": false, "supportsPhotoHdr": true, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}], "hardwareLevel": "full", "hasFlash": true, "hasTorch": true, "id": "0", "isMultiCam": false, "maxExposure": 20, "maxZoom": 8, "minExposure": -20, "minFocusDistance": 7.000000066757203, "minZoom": 1, "name": "0 (BACK) androidx.camera.camera2", "neutralZoom": 1, "physicalDevices": ["wide-angle-camera"], "position": "back", "sensorOrientation": "landscape-left", "supportsFocus": true, "supportsLowLightBoost": false, "supportsRawCapture": false}
Is there any information that would help debug this issue that I should provide?
Thanks
@samuelbeaulieu are you using useSkiaFrameProcessor? I am wondering if this has something to do with trying to use SkiaFrameProcessor in combination with the camera. I start getting a similar error only when I try to implement photo={true} in combination with SkiaFrameProcessor. My camera stops opening and I get the following log:
I am not using useSkiaFrameProcessor
I have the same problem with "react-native-vision-camera": "^4.3.2" and "react-native": "0.74.2"
I solved the error by passing the prop:
photoQualityBalance={"speed"}
Note: The property without braces "{}" photoQualityBalance="speed" did not apply the change, just inserting the braces photoQualityBalance={"speed"}.
I get this error sporadically in development (Expo development client) on Pixel 6a using 4.5.1. It rarely occurs and may only happen during a refresh. Reloading the app manually and going to the camera view doesn't seem to trigger it.
I have not specified the photoQualityBalance prop.
I've been facing the issue on the Pixel 8 Pro. I have tried both qualityPrioritization="speed" and qualityPrioritization="quality".
react-native-vision-camera: 4.5.2react-native": 0.74.5
I'm also hitting this same issue and it is happening with 4.5.3 with Pixel 8 Pro in emulator.
Based on this question and also https://github.com/mrousavy/react-native-vision-camera/issues/2777 this sounds related to incorrect resolution configuration. Setting qualityPrioritization had no effect.
I solved this by adding the following:
const [isCameraActive, setIsCameraActive] = useState(true); useFocusEffect( React.useCallback(() => { setIsCameraActive(true); // Activate camera on focus return () => setIsCameraActive(false); // Deactivate camera on blur }, []) );
<Camera
style={styles.cameraInsideScannerBox}
device={device}
codeScanner={codeScanner}
isActive={isCameraActive}
/>