react-native-vision-camera
react-native-vision-camera copied to clipboard
🐛 [unknown/unknown] Only the original thread that created a view hierarchy can touch its views.
What's happening?
In some of the devices like samsung note 5 , realme 11 pro + 5g etc.. iam getting blanck screen instead of camera view in the screen iam getting blacnk screen sometimes green screen. In version 2 vision camera this works fine but in vision camera 3 camera is not working.
Reproduceable Code
const camera = useRef(null);
const [cameraPermission, setCameraPermission] = useState();
useEffect(() => {
requestCameraPermissions().then(hasPermission => {
if (hasPermission) {
setCameraPermission(true);
} else {
console.error('Permissions not granted');
// Handle lack of permissions appropriately
}
});
}, []);
async function requestCameraPermissions() {
if (Platform.OS === 'android') {
const cameraPermission = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.CAMERA,
);
const microphonePermission = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,
);
return (
cameraPermission === PermissionsAndroid.RESULTS.GRANTED &&
microphonePermission === PermissionsAndroid.RESULTS.GRANTED
);
} else {
// For iOS, use react-native-vision-camera's requestCameraPermission method
const cameraPermissionStatus = await Camera.requestCameraPermission();
const microphonePermissionStatus =
await Camera.requestMicrophonePermission();
return (
cameraPermissionStatus === 'authorized' &&
microphonePermissionStatus === 'authorized'
);
}
}
useEffect(() => {
async function setupSing() {
let isSetup = await setupPlayer();
setIsPlayerReady(isSetup);
}
if (cameraPermission) {
setupSing();
}
}, [cameraPermission]);
const cameraDevice = useCameraDevice('front');
const renderRecordingVideo = () => {
return (
<View>
{
// videoPath ? (
// <Video source={{uri: videoPath}} style={styles.photoAndVideoCamera} />
// ) : (
cameraDevice && (
<Camera
ref={camera}
style={[styles.camera, styles.photoAndVideoCamera]}
device={cameraDevice}
isActive
video
audio
/>
)
// )
}
Relevant log output
2024-01-09 11:57:21.219 25473-25473 ViewRootIm...nActivity] com.superstar D ViewPostImeInputStage processPointer 0
2024-01-09 11:57:21.300 25473-25473 ViewRootIm...nActivity] com.superstar D ViewPostImeInputStage processPointer 1
2024-01-09 11:57:22.026 25473-25473 ViewRootIm...nActivity] com.superstar D mHardwareRenderer.destroy()#4
2024-01-09 11:57:22.026 25473-25473 ViewRootIm...nActivity] com.superstar D dispatchDetachedFromWindow
2024-01-09 11:57:22.040 25473-25473 InputTransport com.superstar D Input channel destroyed: fd=112
2024-01-09 11:57:22.118 25473-25473 ViewRootIm...nActivity] com.superstar D Relayout returned: oldFrame=[0,0][1080,1920] newFrame=[0,0][1080,1920] result=0x1 surface={isValid=true 536356361728} surfaceGenerationChanged=false
2024-01-09 11:57:22.159 25473-25473 PreviewView com.superstar I Creating PreviewView...
2024-01-09 11:57:22.167 25473-25473 PreviewView com.superstar I PreviewView onMeasure(0, 0)
2024-01-09 11:57:22.167 25473-25473 PreviewView com.superstar D coverSize :: 1920x1080 (0.5625), 0x0 (NaN)
2024-01-09 11:57:22.168 25473-25473 PreviewView com.superstar D Fitted dimensions set: 0x0
2024-01-09 11:57:22.174 25473-25473 PreviewView com.superstar I Resizing PreviewView to 1920 x 1080...
2024-01-09 11:57:22.174 25473-25473 CameraView com.superstar I Updating CameraSession...
2024-01-09 11:57:22.176 25473-26425 CameraSession com.superstar I Updating CameraSession Configuration...
2024-01-09 11:57:22.177 25473-26425 CameraSession com.superstar I Configuring Camera #1...
2024-01-09 11:57:22.177 25473-26425 CameraManager com.superstar I Camera 1: Opening...
2024-01-09 11:57:22.178 25473-25473 ViewRootIm...nActivity] com.superstar D MSG_WINDOW_FOCUS_CHANGED 1
2024-01-09 11:57:22.178 25473-25473 ViewRootIm...nActivity] com.superstar D mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true 536356361728}
2024-01-09 11:57:22.180 25473-25473 InputMethodManager com.superstar V Starting input: tba=android.view.inputmethod.EditorInfo@f1cf2ef nm : com.superstar ic=null
2024-01-09 11:57:22.180 25473-25473 InputMethodManager com.superstar I [IMM] startInputInner - mService.startInputOrWindowGainedFocus
2024-01-09 11:57:22.182 25473-25473 InputTransport com.superstar D Input channel constructed: fd=112
2024-01-09 11:57:22.182 25473-25473 InputTransport com.superstar D Input channel destroyed: fd=154
2024-01-09 11:57:22.182 25473-25473 ViewRootImpl com.superstar E sendUserActionEvent() mView == null
2024-01-09 11:57:22.214 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.275 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.277 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.279 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.290 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.292 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.293 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.297 25473-25488 CameraManagerGlobal com.superstar I postSingleUpdate : Camera id 1 has status changed to 0x1
2024-01-09 11:57:22.302 25473-25581 CameraManagerGlobal com.superstar I postSingleUpdate : Camera id 1 has status changed to 0xfffffffe
2024-01-09 11:57:22.303 25473-26096 CameraDevices com.superstar I Camera #1: Available!
2024-01-09 11:57:22.303 25473-26096 CameraDevices com.superstar I Camera #1: Unavailable!
2024-01-09 11:57:22.305 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.307 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.322 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.338 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.369 25473-26425 CameraManager com.superstar I Camera 1: Disconnected!
2024-01-09 11:57:22.370 25473-26425 CameraSession com.superstar E Camera Device android.hardware.camera2.impl.CameraDeviceImpl@43859a has been disconnected!
com.mrousavy.camera.core.CameraDisconnectedError: [session/camera-has-been-disconnected] The given Camera device (id: 1) has been disconnected! Error: DISCONNECTED
at com.mrousavy.camera.extensions.CameraManager_openCameraKt$openCamera$2$callback$1.onDisconnected(CameraManager+openCamera.kt:38)
at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:230)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
2024-01-09 11:57:22.370 25473-26425 CameraView com.superstar E invokeOnError(...):
2024-01-09 11:57:22.371 25473-26425 System.err com.superstar W com.mrousavy.camera.core.CameraDisconnectedError: [session/camera-has-been-disconnected] The given Camera device (id: 1) has been disconnected! Error: DISCONNECTED
2024-01-09 11:57:22.372 25473-26425 System.err com.superstar W at com.mrousavy.camera.extensions.CameraManager_openCameraKt$openCamera$2$callback$1.onDisconnected(CameraManager+openCamera.kt:38)
2024-01-09 11:57:22.372 25473-26425 System.err com.superstar W at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:230)
2024-01-09 11:57:22.372 25473-26425 System.err com.superstar W at android.os.Handler.handleCallback(Handler.java:751)
2024-01-09 11:57:22.372 25473-26425 System.err com.superstar W at android.os.Handler.dispatchMessage(Handler.java:95)
2024-01-09 11:57:22.372 25473-26425 System.err com.superstar W at android.os.Looper.loop(Looper.java:154)
2024-01-09 11:57:22.372 25473-26425 System.err com.superstar W at android.os.HandlerThread.run(HandlerThread.java:61)
2024-01-09 11:57:22.373 25473-26425 CameraManager com.superstar I Camera 1: Opened!
2024-01-09 11:57:22.375 25473-26425 PreviewView com.superstar I Resizing PreviewView to 1920 x 1080...
2024-01-09 11:57:22.375 25473-26425 CameraSession com.superstar I Successfully configured Camera #1!
2024-01-09 11:57:22.376 25473-26425 CameraSession com.superstar I Configuring Session for Camera #1...
2024-01-09 11:57:22.377 25473-26425 CameraSession com.superstar I Adding 1920 x 1440 Video Output in Format #34...
2024-01-09 11:57:22.377 25473-26425 VideoPipeline com.superstar I Initializing 1920 x 1440 Video Pipeline (format: NATIVE)
2024-01-09 11:57:22.378 25473-26425 libEGL com.superstar E eglQueryContext:881 error 3006 (EGL_BAD_CONTEXT)
2024-01-09 11:57:22.380 25473-26425 CreateCaptureSession com.superstar I Camera 1: Creating Capture Session #1010... Hardware Level: 0} | Outputs: [android.hardware.camera2.params.OutputConfiguration@169543df]
2024-01-09 11:57:22.380 25473-26425 CreateCaptureSession com.superstar I Using legacy API (<28)
2024-01-09 11:57:22.390 25473-25473 CameraView com.superstar I Updating CameraSession...
2024-01-09 11:57:22.392 25473-25473 PreviewView com.superstar I PreviewView onMeasure(1080, 1724)
2024-01-09 11:57:22.392 25473-26425 CreateCaptureSession com.superstar I Camera 1: Capture Session #1009 closed!
2024-01-09 11:57:22.392 25473-25473 PreviewView com.superstar D coverSize :: 1920x1080 (0.5625), 1080x1724 (0.6264501160092807)
2024-01-09 11:57:22.392 25473-25473 PreviewView com.superstar D Fitted dimensions set: 1080x1920
2024-01-09 11:57:22.392 25473-26425 CameraSession com.superstar I Camera Session android.hardware.camera2.impl.CameraCaptureSessionImpl@af0071c has been closed!
2024-01-09 11:57:22.393 25473-26425 CreateCaptureSession com.superstar I Camera 1: Capture Session #1010 configured!
2024-01-09 11:57:22.394 25473-26425 CameraSession com.superstar I Successfully configured Session with 1 outputs for Camera #1!
2024-01-09 11:57:22.394 25473-26425 CameraSession com.superstar I Updating Video Outputs...
2024-01-09 11:57:22.394 25473-26425 VideoPipeline com.superstar I Removing FrameProcessor Output...
2024-01-09 11:57:22.394 25473-26425 VideoPipeline com.superstar I Removing RecordingSession Output...
2024-01-09 11:57:22.394 25473-26425 CameraSession com.superstar I Successfully updated CameraSession Configuration! isActive: false
2024-01-09 11:57:22.394 25473-26425 CameraView com.superstar I invokeOnInitialized()
2024-01-09 11:57:22.396 25473-26425 CameraSession com.superstar I Updating CameraSession Configuration...
2024-01-09 11:57:22.396 25473-26425 CameraSession com.superstar W Preview Output is null, aborting...
2024-01-09 11:57:22.396 25473-26425 CameraSession com.superstar I Successfully updated CameraSession Configuration! isActive: true
2024-01-09 11:57:22.418 25473-25473 ViewRootIm...nActivity] com.superstar D Relayout returned: oldFrame=[0,0][1080,1920] newFrame=[0,0][1080,1920] result=0x1 surface={isValid=true 536356361728} surfaceGenerationChanged=false
2024-01-09 11:57:22.433 25473-25473 SurfaceView com.superstar D Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,-98][1080,1822] result=0x7 surface={Surface(name=null)/@0xd876120 isValid=true 536356474880}
2024-01-09 11:57:22.433 25473-25473 CameraSession com.superstar I PreviewView Surface created! Surface(name=null)/@0xfc4ad9
2024-01-09 11:57:22.433 25473-25473 CameraSession com.superstar I Setting Preview Output...
2024-01-09 11:57:22.433 25473-25473 CameraSession com.superstar I PreviewView Surface updated! Surface(name=null)/@0xfc4ad9 1920 x 1080
2024-01-09 11:57:22.433 25473-26425 CameraSession com.superstar I Updating CameraSession Configuration...
2024-01-09 11:57:22.434 25473-26425 CameraSession com.superstar I Configuring Session for Camera #1...
2024-01-09 11:57:22.434 25473-26425 SurfaceOutput com.superstar I Closing 1920x1440 Video Pipeline..
2024-01-09 11:57:22.436 25473-26425 CameraSession com.superstar I Adding 1920 x 1440 Video Output in Format #34...
2024-01-09 11:57:22.436 25473-26425 VideoPipeline com.superstar I Initializing 1920 x 1440 Video Pipeline (format: NATIVE)
2024-01-09 11:57:22.437 25473-26425 libEGL com.superstar E eglQueryContext:881 error 3006 (EGL_BAD_CONTEXT)
2024-01-09 11:57:22.440 25473-26425 CameraSession com.superstar I Adding 1440 x 1080 Preview Output...
2024-01-09 11:57:22.441 25473-26425 PreviewView com.superstar I Resizing PreviewView to 1440 x 1080...
2024-01-09 11:57:22.442 25473-26425 CameraSession com.superstar E Failed to configure CameraSession! Error: Only the original thread that created a view hierarchy can touch its views., Config-Diff: Difference(deviceChanged=false, outputsChanged=true, sidePropsChanged=true)
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:7816)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:1345)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:5446)
at android.view.View.invalidateInternal(View.java:14755)
at android.view.View.invalidate(View.java:14719)
at android.view.View.invalidate(View.java:14703)
at com.mrousavy.camera.core.PreviewView.setSize(PreviewView.kt:27)
at com.mrousavy.camera.core.CameraSession.configureOutputs(CameraSession.kt:335)
at com.mrousavy.camera.core.CameraSession.configure(CameraSession.kt:136)
at com.mrousavy.camera.core.CameraSession$createPreviewOutput$1.invokeSuspend(CameraSession.kt:205)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
2024-01-09 11:57:22.442 25473-26425 CameraView com.superstar E invokeOnError(...):
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:7816)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:1345)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.view.ViewGroup.invalidateChild(ViewGroup.java:5446)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.view.View.invalidateInternal(View.java:14755)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.view.View.invalidate(View.java:14719)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.view.View.invalidate(View.java:14703)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at com.mrousavy.camera.core.PreviewView.setSize(PreviewView.kt:27)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at com.mrousavy.camera.core.CameraSession.configureOutputs(CameraSession.kt:335)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at com.mrousavy.camera.core.CameraSession.configure(CameraSession.kt:136)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at com.mrousavy.camera.core.CameraSession$createPreviewOutput$1.invokeSuspend(CameraSession.kt:205)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.os.Handler.handleCallback(Handler.java:751)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.os.Handler.dispatchMessage(Handler.java:95)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.os.Looper.loop(Looper.java:154)
2024-01-09 11:57:22.442 25473-26425 System.err com.superstar W at android.os.HandlerThread.run(HandlerThread.java:61)
2024-01-09 11:57:22.444 25473-26425 CreateCaptureSession com.superstar I Camera 1: Capture Session #1010 closed!
2024-01-09 11:57:22.456 25473-25473 PreviewView com.superstar I PreviewView onMeasure(1080, 1919)
2024-01-09 11:57:22.456 25473-25473 PreviewView com.superstar D coverSize :: 1920x1080 (0.5625), 1080x1919 (0.5627931214174049)
2024-01-09 11:57:22.456 25473-25473 PreviewView com.superstar D Fitted dimensions set: 1080x1920
2024-01-09 11:57:22.476 25473-25473 SurfaceView com.superstar D Relayout returned: oldFrame=[0,-98][1080,1822] newFrame=[0,0][1080,1920] result=0x21 surface={Surface(name=null)/@0xd876120 isValid=true 536356492800}
2024-01-09 11:57:22.476 25473-25473 CameraSession com.superstar I PreviewView Surface updated! Surface(name=null)/@0xfc4ad9 1440 x 1080
2024-01-09 11:57:22.606 25473-25486 art com.superstar I Background sticky concurrent mark sweep GC freed 360090(14MB) AllocSpace objects, 0(0B) LOS objects, 32% free, 30MB/45MB, paused 772us total 159.536ms
2024-01-09 11:57:22.717 25473-26095 ReactNativeJS com.superstar E 'Camera.onError(unknown/unknown): [unknown/unknown] Only the original thread that created a view hierarchy can touch its views.', { [unknown/unknown: [unknown/unknown] Only the original thread that created a view hierarchy can touch its views.]
name: 'unknown/unknown',
_code: 'unknown/unknown',
_message: '[unknown/unknown] Only the original thread that created a view hierarchy can touch its views.',
_cause:
{ stacktrace: 'android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.\n\tat android.view.ViewRootImpl.checkThread(ViewRootImpl.java:7816)\n\tat android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:1345)\n\tat android.view.ViewGroup.invalidateChild(ViewGroup.java:5446)\n\tat android.view.View.invalidateInternal(View.java:14755)\n\tat android.view.View.invalidate(View.java:14719)\n\tat android.view.View.invalidate(View.java:14703)\n\tat com.mrousavy.camera.core.PreviewView.setSize(PreviewView.kt:27)\n\tat com.mrousavy.camera.core.CameraSession.configureOutputs(CameraSession.kt:335)\n\tat com.mrousavy.camera.core.CameraSession.configure(CameraSession.kt:136)\n\tat com.mrousavy.camera.core.CameraSession$createPreviewOutput$1.invokeSuspend(CameraSession.kt:205)\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)\n\tat android.os.Handler.handleCallback(Handler.java:751)\n\tat android.os.Handler.dispatchMessage(Handler.java:95)\n\tat android.os.Looper.loop(Looper.java:154)\n\tat android.os.HandlerThread.run(HandlerThread.java:61)\n',
message: 'Only the original thread that created a view hierarchy can touch its views.' } }
2024-01-09 11:57:22.907 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.973 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.974 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.989 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.990 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:22.991 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.007 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.008 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.009 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.023 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.024 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.190 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.191 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.192 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.206 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.207 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.208 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.223 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.240 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.241 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.257 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.424 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.440 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.441 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.442 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.457 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.458 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.459 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.474 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.475 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.491 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.724 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.726 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.741 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.742 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.743 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.758 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.759 25473-25473 TextView com.superstar D setTypeface with style : 0
2024-01-09 11:57:23.774 25473-25473 TextView com.superstar D setTypeface with style : 0
Camera Device
{
"sensorOrientation": "landscape-left",
"hardwareLevel": "limited",
"maxZoom": 4,
"minZoom": 1,
"supportsLowLightBoost": false,
"neutralZoom": 1,
"physicalDevices": [
"wide-angle-camera"
],
"supportsFocus": true,
"supportsRawCapture": false,
"isMultiCam": false,
"name": "FRONT (1)",
"hasFlash": false,
"hasTorch": false,
"position": "front",
"id": "1"
}
Device
Samsung galaxy note 5 , realme 11 pro + 5g
VisionCamera Version
3.6.10
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.
Latest version should fix your error
Hey! this is fixed in the last version :)
Hey! this is fixed in the last version :)
i tried and working for back cam but when i use front cam I am getting a green colour screen nothing else. also when i log camDevices i got like below.
{ "sensorOrientation": "landscape-left", "hardwareLevel": "limited", "maxZoom": 4, "minZoom": 1, "maxExposure": 4, "supportsLowLightBoost": false, "neutralZoom": 1, "physicalDevices": [ "wide-angle-camera" ], "supportsFocus": true, "supportsRawCapture": false, "isMultiCam": false, "minExposure": -4, "name": "FRONT (1)", "hasFlash": false, "hasTorch": false, "position": "front", "id": "1" }
Latest version should fix your error
not working for front cam iam getting a green screen while using front camera. but if i just change the position from back to front while app is running front camera will turn on. but if we directly use front camera its green color screen
@mrousavy could you please help me with this?
I'm sorry I don't have the free time to look into this.
Also I cannot reproduce it.
@favazpa I had the same problem on my Redmi note, tested now on 3.8.0 and it's working. Try to update again to the latest version and the troubleshoot guide https://react-native-vision-camera.com/docs/guides/troubleshooting