Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 takePhoto() generate a fully green image - An unknown error occurred while creating the Camera Session, but the Camera can recover from it #2686

Closed
3 of 5 tasks
Kohys58 opened this issue Mar 25, 2024 · 29 comments 路 Fixed by #2897
Labels
馃悰 bug Something isn't working

Comments

@Kohys58
Copy link

Kohys58 commented Mar 25, 2024

What's happening?

Question

I'm using react-native-vision-camera: 4.0.0-beta.10, react-native: 0.72.6 (Target SDK has been upgraded to 34).

Device is : Samsung TAB A8 (Android 14)

My code is based on the one provided in the example App (pretty much a copy paste).

Just removed the qualityPrioritization has it not available in the method anymore.

What would be the issue?

When I try to take the picture it gives me the following error :

[session/recoverable-error: An unknown error occurred while creating the Camera Session, but the Camera can recover from it.]

This shows when being in portrait and landscape, in both case it results in generating a fully green image instead of the correct picture :

mrousavy-2103577504236634562

What I tried

Tried to enable precapture on Android

Reproduceable Code

const photo = await camera.current.takePhoto({
    flash: flash,
    enableShutterSound: false,
});

Relevant log output

2024-03-25 15:00:41.875 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  ViewPostIme pointer 0
2024-03-25 15:00:41.897 17079-17388 ReactNativeJS           com.ag_consulting                    D  state: BEGAN
2024-03-25 15:00:41.957 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  ViewPostIme pointer 1
2024-03-25 15:00:41.965 17079-17079 unknown:ReactNative     com.ag_consulting                    W  Can't cancel already finished gesture. Is a child View trying to start a gesture from an UP/CANCEL event?
2024-03-25 15:00:41.975 17079-17388 ReactNativeJS           com.ag_consulting                    D  state: ACTIVE
2024-03-25 15:00:41.976 17079-17388 ReactNativeJS           com.ag_consulting                    D  state: END
2024-03-25 15:00:41.976 17079-17388 ReactNativeJS           com.ag_consulting                    I  Taking photo...
2024-03-25 15:00:41.981 17079-17079 CameraView              com.ag_consulting                    D  Finding view 2463...
2024-03-25 15:00:41.981 17079-17079 CameraView              com.ag_consulting                    D  Found view 2463!
2024-03-25 15:00:41.982 17079-20690 CameraView.takePhoto    com.ag_consulting                    I  Taking photo... Options: {enableShutterSound=false, flash=off}
2024-03-25 15:00:41.986 17079-17407 UseCaseAttachState      com.ag_consulting                    D  Active and attached use case: [androidx.camera.core.ImageCapture-23d35658-291b-4022-a2df-9a459c0dbc6a11304672, androidx.camera.core.Preview-381b6c7e-3dad-4070-a988-be4f0c93d17d148722915] for camera: 0
2024-03-25 15:00:41.990 17079-17079 ImageCapture            com.ag_consulting                    D  takePictureInternal
2024-03-25 15:00:41.991 17079-17079 CameraOrientationUtil   com.ag_consulting                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-03-25 15:00:41.991 17079-17079 TakePictureManager      com.ag_consulting                    D  Issue the next TakePictureRequest.
2024-03-25 15:00:41.995 17079-17407 CaptureSession          com.ag_consulting                    D  Attempting to submit CaptureRequest after setting
2024-03-25 15:00:41.995 17079-17407 CaptureSession          com.ag_consulting                    D  Issuing request for session.
2024-03-25 15:00:41.995 17079-17407 Camera2Cap...estBuilder com.ag_consulting                    D  createCaptureRequest
2024-03-25 15:00:42.159 17079-17407 ZslControlImpl          com.ag_consulting                    E  dequeueImageFromBuffer no such element
2024-03-25 15:00:42.160 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Issue capture request
2024-03-25 15:00:42.160 17079-17407 CaptureSession          com.ag_consulting                    D  Issuing capture request.
2024-03-25 15:00:42.163 17079-17407 Camera2Cap...estBuilder com.ag_consulting                    D  createCaptureRequest
2024-03-25 15:00:42.193 17079-17094 gralloc4                com.ag_consulting                    I  register: id=410000001a8, handle:0xb4000073c4004e00, vaddr=0x72ea57d000
2024-03-25 15:00:42.298 17079-20693 TrafficStats            com.ag_consulting                    D  tagSocket(122) with statsTag=0xffffffff, statsUid=-1
2024-03-25 15:00:42.458 17079-17079 CameraView              com.ag_consulting                    I  invokeOnShutter(PHOTO)
2024-03-25 15:00:42.501 17079-17079 gralloc4                com.ag_consulting                    W  Could not find component description for FourCC value 0, alloc_format 0x21
2024-03-25 15:00:42.501 17079-17079 gralloc4                com.ag_consulting                    I  lockBuffer: id=410000001a8, vaddr=0x72ea57d000
2024-03-25 15:00:42.510 17079-17405 DeferrableSurface       com.ag_consulting                    D  use count-1,  useCount=1 closed=false androidx.camera.core.SurfaceRequest$2@d2d9437
2024-03-25 15:00:42.511 17079-17405 DeferrableSurface       com.ag_consulting                    D  use count-1,  useCount=0 closed=false androidx.camera.core.impl.ImmediateSurface@516f709
2024-03-25 15:00:42.511 17079-17405 DeferrableSurface       com.ag_consulting                    D  Surface no longer in use[total_surfaces=3, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@516f709}
2024-03-25 15:00:42.512 17079-17079 TakePictureManager      com.ag_consulting                    D  Issue the next TakePictureRequest.
2024-03-25 15:00:42.512 17079-17079 TakePictureManager      com.ag_consulting                    D  No new request.
2024-03-25 15:00:42.513 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Camera receive onErrorCallback
2024-03-25 15:00:42.514 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  CameraDevice.onError(): 0 failed with ERROR_CAMERA_DEVICE while in OPENED state. Will attempt recovering from error.
2024-03-25 15:00:42.515 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  Attempt to reopen camera[0] after error[ERROR_CAMERA_DEVICE]
2024-03-25 15:00:42.517 17079-19645 gralloc4                com.ag_consulting                    I  unlockBuffer: id=410000001a8, vaddr=0x72ea57d000
2024-03-25 15:00:42.517 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Transitioning camera internal state: OPENED --> REOPENING
2024-03-25 15:00:42.525 17079-17405 CameraStateRegistry     com.ag_consulting                    D  Recalculating open cameras:
                                                                                                    Camera                                       State                 
                                                                                                    -------------------------------------------------------------------
                                                                                                    Camera@cb8838[id=1]                          UNKNOWN               
                                                                                                    Camera@8c68ed9[id=0]                         OPENING               
                                                                                                    -------------------------------------------------------------------
                                                                                                    Open count: 1 (Max allowed: 1)
2024-03-25 15:00:42.526 17079-17405 CameraStateMachine      com.ag_consulting                    D  New public camera state CameraState{type=OPENING, error=StateError{code=3, cause=null}} from OPENING and StateError{code=3, cause=null}
2024-03-25 15:00:42.527 17079-17405 CameraStateMachine      com.ag_consulting                    D  Publishing new public camera state CameraState{type=OPENING, error=StateError{code=3, cause=null}}
2024-03-25 15:00:42.529 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Resetting Capture Session
2024-03-25 15:00:42.530 17079-17405 SyncCaptureSessionImpl  com.ag_consulting                    D  [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@be41ca3] Session call close()
2024-03-25 15:00:42.530 17079-17079 CameraSession           com.ag_consulting                    I  Camera State: OPENING (has error: true)
2024-03-25 15:00:42.531 17079-17079 CameraView              com.ag_consulting                    E  invokeOnError(...):
2024-03-25 15:00:42.531 17079-17079 System.err              com.ag_consulting                    W  com.mrousavy.camera.core.RecoverableError: An unknown error occurred while creating the Camera Session, but the Camera can recover from it.
2024-03-25 15:00:42.532 17079-17079 System.err              com.ag_consulting                    W  	at com.mrousavy.camera.extensions.StateError_toCameraErrorKt.toCameraError(StateError+toCameraError.kt:22)
2024-03-25 15:00:42.533 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Releasing session in state REOPENING
2024-03-25 15:00:42.533 17079-17079 System.err              com.ag_consulting                    W  	at com.mrousavy.camera.core.CameraSession$configureCamera$2.invoke(CameraSession.kt:431)
2024-03-25 15:00:42.533 17079-17079 System.err              com.ag_consulting                    W  	at com.mrousavy.camera.core.CameraSession$configureCamera$2.invoke(CameraSession.kt:419)
2024-03-25 15:00:42.533 17079-17405 SyncCaptureSessionImpl  com.ag_consulting                    D  [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@be41ca3] onClosed()
2024-03-25 15:00:42.534 17079-17079 System.err              com.ag_consulting                    W  	at com.mrousavy.camera.core.CameraSession.configureCamera$lambda$9(CameraSession.kt:419)
2024-03-25 15:00:42.535 17079-17079 System.err              com.ag_consulting                    W  	at com.mrousavy.camera.core.CameraSession.$r8$lambda$6yhdgdG34C2UHCXviHGpbs3-Kgs(Unknown Source:0)
2024-03-25 15:00:42.535 17079-17079 System.err              com.ag_consulting                    W  	at com.mrousavy.camera.core.CameraSession$$ExternalSyntheticLambda1.onChanged(Unknown Source:2)
2024-03-25 15:00:42.535 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
2024-03-25 15:00:42.536 17079-17405 CaptureSession          com.ag_consulting                    D  onSessionFinished()
2024-03-25 15:00:42.536 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
2024-03-25 15:00:42.537 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
2024-03-25 15:00:42.537 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
2024-03-25 15:00:42.538 17079-17079 System.err              com.ag_consulting                    W  	at androidx.camera.camera2.internal.Camera2CameraInfoImpl$RedirectableLiveData$$ExternalSyntheticLambda0.onChanged(Unknown Source:2)
2024-03-25 15:00:42.538 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.MediatorLiveData$Source.onChanged(MediatorLiveData.java:152)
2024-03-25 15:00:42.539 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
2024-03-25 15:00:42.539 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} closing camera
2024-03-25 15:00:42.539 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
2024-03-25 15:00:42.540 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
2024-03-25 15:00:42.540 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
2024-03-25 15:00:42.540 17079-17079 System.err              com.ag_consulting                    W  	at androidx.lifecycle.LiveData$1.run(LiveData.java:93)
2024-03-25 15:00:42.541 17079-17079 System.err              com.ag_consulting                    W  	at android.os.Handler.handleCallback(Handler.java:958)
2024-03-25 15:00:42.541 17079-17079 System.err              com.ag_consulting                    W  	at android.os.Handler.dispatchMessage(Handler.java:99)
2024-03-25 15:00:42.541 17079-17079 System.err              com.ag_consulting                    W  	at android.os.Looper.loopOnce(Looper.java:230)
2024-03-25 15:00:42.542 17079-17079 System.err              com.ag_consulting                    W  	at android.os.Looper.loop(Looper.java:319)
2024-03-25 15:00:42.542 17079-17079 System.err              com.ag_consulting                    W  	at android.app.ActivityThread.main(ActivityThread.java:8913)
2024-03-25 15:00:42.542 17079-17079 System.err              com.ag_consulting                    W  	at java.lang.reflect.Method.invoke(Native Method)
2024-03-25 15:00:42.543 17079-17079 System.err              com.ag_consulting                    W  	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
2024-03-25 15:00:42.543 17079-17079 System.err              com.ag_consulting                    W  	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
2024-03-25 15:00:42.554 17079-17388 ReactNativeJS           com.ag_consulting                    E  { [session/recoverable-error: An unknown error occurred while creating the Camera Session, but the Camera can recover from it.]
                                                                                                      name: 'session/recoverable-error',
                                                                                                      _code: 'session/recoverable-error',
                                                                                                      _message: 'An unknown error occurred while creating the Camera Session, but the Camera can recover from it.',
                                                                                                      _cause: undefined }
2024-03-25 15:00:42.561 17079-20697 CameraView.takePhoto    com.ag_consulting                    I  Successfully captured 2448 x 2448 photo!
2024-03-25 15:00:42.564 17079-17388 ReactNativeJS           com.ag_consulting                    I  Media captured! {"isMirrored":false,"path":"/data/user/0/com.ag_consulting/cache/mrousavy-5336774907299197601.jpg","isRawPhoto":false,"height":2448,"orientation":"portrait","width":2448}
2024-03-25 15:00:42.796 17079-17079 ScrollView              com.ag_consulting                    D  initGoToTop
2024-03-25 15:00:42.890 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.904 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.918 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.939 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.942 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.947 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.957 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.963 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:42.990 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:42.990 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:42.999 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.001 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.003 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.004 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.005 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.005 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.014 17079-17164 TrafficStats            com.ag_consulting                    D  tagSocket(125) with statsTag=0xffffffff, statsUid=-1
2024-03-25 15:00:43.024 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.026 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.029 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.031 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.044 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.044 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.064 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.068 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.073 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.077 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.078 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.078 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.232 17079-17405 gralloc4                com.ag_consulting                    I  unregister: id=4100000019c, handle:0xb4000074534bc600, vaddr=0x73ecca8000
2024-03-25 15:00:43.233 17079-17405 gralloc4                com.ag_consulting                    I  unregister: id=4100000019d, handle:0xb40000720e9f6b00, vaddr=0x73e9f96000
2024-03-25 15:00:43.233 17079-17405 gralloc4                com.ag_consulting                    I  unregister: id=4100000019e, handle:0xb40000744b882800, vaddr=0x73e9d5c000
2024-03-25 15:00:43.233 17079-17405 gralloc4                com.ag_consulting                    I  unregister: id=4100000019f, handle:0xb4000073c3cec900, vaddr=0x73e9b22000
2024-03-25 15:00:43.233 17079-17405 gralloc4                com.ag_consulting                    I  unregister: id=410000001a0, handle:0xb4000073c3cecd00, vaddr=0x73e4a5c000
2024-03-25 15:00:43.234 17079-17405 gralloc4                com.ag_consulting                    I  unregister: id=410000001a8, handle:0xb4000073c4004e00, vaddr=0x72ea57d000
2024-03-25 15:00:43.241 17079-17093 CameraManagerGlobal     com.ag_consulting                    I  postSingleUpdate device: camera id 0 status STATUS_PRESENT
2024-03-25 15:00:43.242 17079-17093 CameraManagerGlobal     com.ag_consulting                    I  postSingleUpdate device: camera id 0 status STATUS_PRESENT
2024-03-25 15:00:43.243 17079-17389 CameraDevices           com.ag_consulting                    I  Camera #0 is now available.
2024-03-25 15:00:43.245 17079-17093 CameraManagerGlobal     com.ag_consulting                    I  postSingleUpdate device: camera id 0 status STATUS_PRESENT
2024-03-25 15:00:43.249 17079-17093 CameraManagerGlobal     com.ag_consulting                    I  Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client com.ag_consulting API Level 2 User Id 0
2024-03-25 15:00:43.251 17079-17405 SyncCaptureSessionImpl  com.ag_consulting                    D  [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@be41ca3] Session call super.close()
2024-03-25 15:00:43.253 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} CameraDevice.onClosed()
2024-03-25 15:00:43.254 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Camera closed due to error: ERROR_CAMERA_DEVICE
2024-03-25 15:00:43.256 17079-17405 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Attempting camera re-open in 700ms: androidx.camera.camera2.internal.Camera2CameraImpl$StateCallback$ScheduledReopen@6d8a463 activeResuming = true
2024-03-25 15:00:43.257 17079-17405 SyncCaptureSessionImpl  com.ag_consulting                    D  [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@be41ca3] onClosed()
2024-03-25 15:00:43.267 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.306 17079-17079 ScrollView              com.ag_consulting                    D  initGoToTop
2024-03-25 15:00:43.322 17079-17079 Dialog                  com.ag_consulting                    I  mIsDeviceDefault = false, mIsSamsungBasicInteraction = false, isMetaDataInActivity = false
2024-03-25 15:00:43.322 17079-17079 unknown:ReactModalHost  com.ag_consulting                    E  Creating new dialog from context: com.ag_consulting.MainActivity@b770599@192349593
2024-03-25 15:00:43.328 17079-17079 DecorView               com.ag_consulting                    I  setWindowBackground: isPopOver=false color=0 d=android.graphics.drawable.ColorDrawable@cb43cdb
2024-03-25 15:00:43.336 17079-17190 NativeCust...ncyManager com.ag_consulting                    D  [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
2024-03-25 15:00:43.345 17079-17079 InsetsController        com.ag_consulting                    I  onStateChanged: host=com.ag_consulting/com.ag_consulting.MainActivity, from=android.view.ViewRootImpl.setView:1744, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1920, 1200), mDisplayCutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=0 displayHeight=0 physicalDisplayWidth=0 physicalDisplayHeight=0 density={0.0} cutoutSpec={} rotation={0} scale={0.0} physicalPixelDisplaySizeRatio={0.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=20, center=Point(20, 20)}, RoundedCorner{position=TopRight, radius=20, center=Point(1900, 20)}, RoundedCorner{position=BottomRight, radius=20, center=Point(1900, 1180)}, RoundedCorner{position=BottomLeft, radius=20, center=Point(20, 1180)}]}  mRoundedCornerFrame=Rect(0, 0 - 1920, 1200), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(1854, 0 - 1920, 36) rotation=1}, mDisplayShape=DisplayShape{ spec=1237991957 displayWidth=1200 displayHeight=1920 physicalPixelDisplaySizeRatio=1.0 rotation=1 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {e3030001 mType=navigationBars mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {e3030005 mType=mandatorySystemGestures mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030006 mType=tappableElement mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {62b80000 mType=statusBars mFrame=[0,0][1920,36] mVisible=true mFlags=[]}, InsetsSource: {62b80005 mType=mandatorySystemGestures mFrame=[0,0][1920,36] mVisible=true mFlags=[]}, InsetsSource: {62b80006 mType=tappableElement mFrame=[0,0][1920,36] mVisible=true mFlags=[]} }
2024-03-25 15:00:43.346 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  synced displayState. AttachInfo displayState=2
2024-03-25 15:00:43.346 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  setView = com.android.internal.policy.DecorView@b50ba8d TM=true
2024-03-25 15:00:43.374 17079-17079 InsetsController        com.ag_consulting                    I  onStateChanged: host=com.ag_consulting/com.ag_consulting.MainActivity, from=android.view.ViewRootImpl.relayoutWindow:9989, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1920, 1200), mDisplayCutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=0 displayHeight=0 physicalDisplayWidth=0 physicalDisplayHeight=0 density={0.0} cutoutSpec={} rotation={0} scale={0.0} physicalPixelDisplaySizeRatio={0.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=20, center=Point(20, 20)}, RoundedCorner{position=TopRight, radius=20, center=Point(1900, 20)}, RoundedCorner{position=BottomRight, radius=20, center=Point(1900, 1180)}, RoundedCorner{position=BottomLeft, radius=20, center=Point(20, 1180)}]}  mRoundedCornerFrame=Rect(0, 0 - 1920, 1200), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(1854, 0 - 1920, 36) rotation=1}, mDisplayShape=DisplayShape{ spec=1237991957 displayWidth=1200 displayHeight=1920 physicalPixelDisplaySizeRatio=1.0 rotation=1 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {e3030001 mType=navigationBars mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {e3030005 mType=mandatorySystemGestures mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030006 mType=tappableElement mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags=[]}, InsetsSource: {62b80000 mType=statusBars mFrame=[0,0][1920,36] mVisible=true mFlags=[]}, InsetsSource: {62b80005 mType=mandatorySystemGestures mFrame=[0,0][1920,36] mVisible=true mFlags=[]}, InsetsSource: {62b80006 mType=tappableElement mFrame=[0,0][1920,36] mVisible=true mFlags=[]} }
2024-03-25 15:00:43.378 17079-17079 BLASTBufferQueue_Java   com.ag_consulting                    I  new BLASTBufferQueue, mName= ViewRootImpl@61302b6[MainActivity] mNativeObject= 0xb4000073c3c7c900 sc.mNativeObject= 0xb4000073c8489340 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3015 android.view.ViewRootImpl.relayoutWindow:10048 android.view.ViewRootImpl.performTraversals:4092 android.view.ViewRootImpl.doTraversal:3275 android.view.ViewRootImpl$TraversalRunnable.run:11257 android.view.Choreographer$CallbackRecord.run:1650 android.view.Choreographer$CallbackRecord.run:1659 android.view.Choreographer.doCallbacks:1129 android.view.Choreographer.doFrame:1055 android.view.Choreographer$FrameDisplayEventReceiver.run:1622 
2024-03-25 15:00:43.379 17079-17079 BLASTBufferQueue_Java   com.ag_consulting                    I  update, w= 1920 h= 1200 mName = ViewRootImpl@61302b6[MainActivity] mNativeObject= 0xb4000073c3c7c900 sc.mNativeObject= 0xb4000073c8489340 format= -2 caller= android.graphics.BLASTBufferQueue.<init>:89 android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3015 android.view.ViewRootImpl.relayoutWindow:10048 android.view.ViewRootImpl.performTraversals:4092 android.view.ViewRootImpl.doTraversal:3275 android.view.ViewRootImpl$TraversalRunnable.run:11257 
2024-03-25 15:00:43.380 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  Relayout returned: old=(0,0,1920,1200) new=(0,0,1920,1200) relayoutAsync=false req=(1920,1200)0 dur=23 res=0x403 s={true 0xb4000073c3d90800} ch=true seqId=0
2024-03-25 15:00:43.383 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    D  mThreadedRenderer.initialize() mSurface={isValid=true 0xb4000073c3d90800} hwInitialized=true
2024-03-25 15:00:43.385 17079-20700 gralloc4                com.ag_consulting                    I  register: id=410000001a9, handle:0xb400007459c83500, vaddr=0x7216312000
2024-03-25 15:00:43.386 17079-20700 gralloc4                com.ag_consulting                    I  register: id=410000001aa, handle:0xb400007459c83800, vaddr=0x7213a24000
2024-03-25 15:00:43.386 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    D  reportNextDraw android.view.ViewRootImpl.performTraversals:4694 android.view.ViewRootImpl.doTraversal:3275 android.view.ViewRootImpl$TraversalRunnable.run:11257 android.view.Choreographer$CallbackRecord.run:1650 android.view.Choreographer$CallbackRecord.run:1659 
2024-03-25 15:00:43.387 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    D  Setup new sync=wmsSync-ViewRootImpl@61302b6[MainActivity]#38
2024-03-25 15:00:43.387 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    D  Creating new active sync group ViewRootImpl@61302b6[MainActivity]#39
2024-03-25 15:00:43.388 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    D  registerCallbacksForSync syncBuffer=false
2024-03-25 15:00:43.388 17079-20700 gralloc4                com.ag_consulting                    I  register: id=410000001ab, handle:0xb400007459c83a00, vaddr=0x720d35a000
2024-03-25 15:00:43.390 17079-17190 gralloc4                com.ag_consulting                    I  unregister: id=410000001ab, handle:0xb400007459c83a00, vaddr=0x720d35a000
2024-03-25 15:00:43.391 17079-17289 ViewRootIm...nActivity] com.ag_consulting                    D  Received frameDrawingCallback syncResult=0 frameNum=1.
2024-03-25 15:00:43.391 17079-17289 ViewRootIm...nActivity] com.ag_consulting                    I  mWNT: t=0xb4000073c84d9480 mBlastBufferQueue=0xb4000073c3c7c900 fn= 1 caller= android.view.ViewRootImpl$8.onFrameDraw:13674 android.view.ThreadedRenderer$1.onFrameDraw:788 <bottom of call stack> 
2024-03-25 15:00:43.392 17079-17289 ViewRootIm...nActivity] com.ag_consulting                    D  Setting up sync and frameCommitCallback
2024-03-25 15:00:43.392 17079-17190 gralloc4                com.ag_consulting                    I  register: id=410000001ac, handle:0xb400007459c83a00, vaddr=0x72ea532000
2024-03-25 15:00:43.397 17079-17190 BLASTBufferQueue        com.ag_consulting                    D  [ViewRootImpl@61302b6[MainActivity]#20](f:0,a:0) onFrameAvailable the first frame is available
2024-03-25 15:00:43.398 17079-17190 ViewRootIm...nActivity] com.ag_consulting                    D  Received frameCommittedCallback lastAttemptedDrawFrameNum=1 didProduceBuffer=true
2024-03-25 15:00:43.399 17079-17190 OpenGLRenderer          com.ag_consulting                    D  CFMS:: SetUp Pid : 17079    Tid : 17190
2024-03-25 15:00:43.399 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    D  reportDrawFinished
2024-03-25 15:00:43.402 17079-17079 unknown:ReactModalHost  com.ag_consulting                    E  Updating existing dialog with context: com.ag_consulting.MainActivity@b770599@192349593
2024-03-25 15:00:43.412 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  registerCallbackForPendingTransactions
2024-03-25 15:00:43.414 17079-17079 InsetsSourceConsumer    com.ag_consulting                    I  applyRequestedVisibilityToControl: visible=true, type=statusBars, host=com.ag_consulting/com.ag_consulting.MainActivity
2024-03-25 15:00:43.415 17079-17079 InsetsSourceConsumer    com.ag_consulting                    I  applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=com.ag_consulting/com.ag_consulting.MainActivity
2024-03-25 15:00:43.418 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  handleWindowFocusChanged: 0 0 call from android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged:0
2024-03-25 15:00:43.418 17079-17079 ImeFocusController      com.ag_consulting                    I  onPreWindowFocus: skipped, hasWindowFocusfalse mHasImeFocus=true
2024-03-25 15:00:43.419 17079-17079 ImeFocusController      com.ag_consulting                    I  onPostWindowFocus: skipped, hasWindowFocusfalse mHasImeFocus=true
2024-03-25 15:00:43.428 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.431 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.433 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.436 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.440 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.441 17079-17389 unknown:ReactNative     com.ag_consulting                    W  Attempt to set local data for view with unknown tag: -1
2024-03-25 15:00:43.464 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  handleWindowFocusChanged: 1 0 call from android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged:0
2024-03-25 15:00:43.464 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    D  mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb4000073c3d90800}
2024-03-25 15:00:43.465 17079-17079 InputMethodManagerUtils com.ag_consulting                    D  startInputInner - Id : 0
2024-03-25 15:00:43.465 17079-17079 InputMethodManager      com.ag_consulting                    I  startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus
2024-03-25 15:00:43.483 17079-17079 InsetsSourceConsumer    com.ag_consulting                    I  applyRequestedVisibilityToControl: visible=false, type=ime, host=com.ag_consulting/com.ag_consulting.MainActivity
2024-03-25 15:00:43.543 17079-17079 ScrollView              com.ag_consulting                    D  initGoToTop
2024-03-25 15:00:43.610 17079-17079 ScrollView              com.ag_consulting                    D  initGoToTop
2024-03-25 15:00:43.620 17079-17079 Dialog                  com.ag_consulting                    I  mIsDeviceDefault = false, mIsSamsungBasicInteraction = false, isMetaDataInActivity = false
2024-03-25 15:00:43.620 17079-17079 unknown:ReactModalHost  com.ag_consulting                    E  Creating new dialog from context: com.ag_consulting.MainActivity@b770599@192349593
2024-03-25 15:00:43.626 17079-17079 DecorView               com.ag_consulting                    I  setWindowBackground: isPopOver=false color=0 d=android.graphics.drawable.ColorDrawable@136ab01
2024-03-25 15:00:43.632 17079-17190 NativeCust...ncyManager com.ag_consulting                    D  [NativeCFMS] BpCustomFrequencyManager::BpCustomFrequencyManager()
2024-03-25 15:00:43.642 17079-17079 InsetsController        com.ag_consulting                    I  onStateChanged: host=com.ag_consulting/com.ag_consulting.MainActivity, from=android.view.ViewRootImpl.setView:1744, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1920, 1200), mDisplayCutout=DisplayCutout{insets=Rect(0, 0 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=0 displayHeight=0 physicalDisplayWidth=0 physicalDisplayHeight=0 density={0.0} cutoutSpec={} rotation={0} scale={0.0} physicalPixelDisplaySizeRatio={0.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=20, center=Point(20, 20)}, RoundedCorner{position=TopRight, radius=20, center=Point(1900, 20)}, RoundedCorner{position=BottomRight, radius=20, center=Point(1900, 1180)}, RoundedCorner{position=BottomLeft, radius=20, center=Point(20, 1180)}]}  mRoundedCornerFrame=Rect(0, 0 - 1920, 1200), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(1854, 0 - 1920, 36) rotation=1}, mDisplayShape=DisplayShape{ spec=1237991957 displayWidth=1200 displayHeight=1920 physicalPixelDisplaySizeRatio=1.0 rotation=1 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {e3030001 mType=navigationBars mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {e3030005 mType=mandatorySystemGestures mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030006 mType=tappableElement mFrame=[0,1128][1920,1200] mVisible=true mFlags=[]}, InsetsSource: {e3030024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags=[]}, InsetsSource: {62b80000 mType=statusBars mFrame=[0,0][1920,36] mVisible=true mFlags=[]}, InsetsSource: {62b80005 mType=mandatorySystemGestures mFrame=[0,0][1920,36] mVisible=true mFlags=[]}, InsetsSource: {62b80006 mType=tappableElement mFrame=[0,0][1920,36] mVisible=true mFlags=[]} }
2024-03-25 15:00:43.643 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  synced displayState. AttachInfo displayState=2
2024-03-25 15:00:43.644 17079-17079 ViewRootIm...nActivity] com.ag_consulting                    I  setView = com.android.internal.policy.DecorView@c44c783 TM=true
2024-03-25 15:00:43.647 17079-17079 SurfaceView@5672458     com.ag_consulting                    I  onWindowVisibilityChanged(8) false android.view.SurfaceView{5672458 V.E...... ........ 0,0-1440,1080} of ViewRootImpl@b36cfa5[MainActivity]
2024-03-25 15:00:43.647 17079-17079 SurfaceView             com.ag_consulting                    I  90645592 Changes: creating=false format=false size=false visible=true alpha=false hint=false visible=true left=false top=false z=false attached=true lifecycleStrategy=false
2024-03-25 15:00:43.647 17079-17079 SurfaceView@5672458     com.ag_consulting                    I  90645592 Cur surface: Surface(name=null)/@0xcceffed
2024-03-25 15:00:43.648 17079-17079 SurfaceView             com.ag_consulting                    I  90645592 surfaceDestroyed
2024-03-25 15:00:43.648 17079-17079 SurfaceView@5672458     com.ag_consulting                    I  surfaceDestroyed callback.size 1 #2 android.view.SurfaceView{5672458 V.E...... ........ 0,0-1440,1080}
2024-03-25 15:00:43.648 17079-17079 SurfaceViewImpl         com.ag_consulting                    D  Surface destroyed.
2024-03-25 15:00:43.648 17079-17079 SurfaceViewImpl         com.ag_consulting                    D  Surface closed androidx.camera.core.SurfaceRequest@4409d36
2024-03-25 15:00:43.648 17079-17079 DeferrableSurface       com.ag_consulting                    D  surface closed,  useCount=1 closed=true androidx.camera.core.SurfaceRequest$2@d2d9437
2024-03-25 15:00:43.648 17079-17079 SurfaceView@5672458     com.ag_consulting                    I  updateSurface: mVisible = false mSurface.isValid() = true
2024-03-25 15:00:43.649 17079-17079 gralloc4                com.ag_consulting                    I  unregister: id=410000001a1, handle:0xb40000720e9f6d00, vaddr=0x73e3e75000
2024-03-25 15:00:43.649 17079-17079 SurfaceView@5672458     com.ag_consulting                    I  releaseSurfaces: viewRoot = ViewRootImpl@b36cfa5[MainActivity]
2024-03-25 15:00:43.649 17079-17079 SurfaceView@5672458     com.ag_consulting                    V  Layout: x=0 y=-138 w=1440 h=1080, frame=Rect(0, 0 - 1440, 1080)
2024-03-25 15:00:43.649 17079-17079 SurfaceView             com.ag_consulting                    I  90645592 Detaching SV
2024-03-25 15:00:43.650 17079-17079 SurfaceView             com.ag_consulting                    I  90645592 Changes: creating=false format=false size=false visible=false alpha=false hint=false visible=false left=false top=false z=false attached=false lifecycleStrategy=false
2024-03-25 15:00:43.650 17079-17079 SurfaceView@5672458     com.ag_consulting                    I  onDetachedFromWindow: tryReleaseSurfaces()
2024-03-25 15:00:43.650 17079-17079 SurfaceView@5672458     com.ag_consulting                    I  releaseSurfaces: viewRoot = ViewRootImpl@b36cfa5[MainActivity]
2024-03-25 15:00:43.652 17079-17079 ReactNative             com.ag_consulting                    I  [GESTURE HANDLER] Tearing down gesture handler registered for root view com.facebook.react.ReactRootView{bcc2707 V.E...... .......D 0,0-1920,1092 #b}
2024-03-25 15:00:43.652 17079-17079 CameraSession           com.ag_consulting                    I  Closing CameraSession...
2024-03-25 15:00:43.653 17079-17079 ScreenFlashWrapper      com.ag_consulting                    W  completePendingScreenFlashClear: none pending!
2024-03-25 15:00:43.655 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Use cases [androidx.camera.core.Preview-381b6c7e-3dad-4070-a988-be4f0c93d17d148722915, androidx.camera.core.ImageCapture-23d35658-291b-4022-a2df-9a459c0dbc6a11304672] now DETACHED for camera
2024-03-25 15:00:43.655 17079-17407 UseCaseAttachState      com.ag_consulting                    D  All use case: [] for camera: 0
2024-03-25 15:00:43.655 17079-17079 DeferrableSurface       com.ag_consulting                    D  surface closed,  useCount=0 closed=true androidx.camera.core.processing.SurfaceEdge$SettableSurface@38e7d5b
2024-03-25 15:00:43.655 17079-17079 DeferrableSurface       com.ag_consulting                    D  Surface terminated[total_surfaces=2, used_surfaces=1](androidx.camera.core.processing.SurfaceEdge$SettableSurface@38e7d5b}
2024-03-25 15:00:43.656 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Resetting Capture Session
2024-03-25 15:00:43.656 17079-17079 DeferrableSurface       com.ag_consulting                    D  use count-1,  useCount=0 closed=true androidx.camera.core.SurfaceRequest$2@d2d9437
2024-03-25 15:00:43.656 17079-17079 DeferrableSurface       com.ag_consulting                    D  Surface no longer in use[total_surfaces=2, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@d2d9437}
2024-03-25 15:00:43.656 17079-17079 DeferrableSurface       com.ag_consulting                    D  Surface terminated[total_surfaces=1, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@d2d9437}
2024-03-25 15:00:43.656 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Releasing session in state REOPENING
2024-03-25 15:00:43.657 17079-17407 UseCaseAttachState      com.ag_consulting                    D  Active and attached use case: [] for camera: 0
2024-03-25 15:00:43.657 17079-17079 ScreenFlashWrapper      com.ag_consulting                    W  completePendingScreenFlashClear: none pending!
2024-03-25 15:00:43.657 17079-17079 ImageCapture            com.ag_consulting                    D  clearPipeline
2024-03-25 15:00:43.657 17079-17079 DeferrableSurface       com.ag_consulting                    D  surface closed,  useCount=0 closed=true androidx.camera.core.impl.ImmediateSurface@516f709
2024-03-25 15:00:43.657 17079-17079 DeferrableSurface       com.ag_consulting                    D  Surface terminated[total_surfaces=0, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@516f709}
2024-03-25 15:00:43.658 17079-17079 CameraSession           com.ag_consulting                    I  Camera Lifecycle changed to STARTED!
2024-03-25 15:00:43.658 17079-17407 UseCaseAttachState      com.ag_consulting                    D  Active and attached use case: [] for camera: 0
2024-03-25 15:00:43.658 17079-17079 CameraSession           com.ag_consulting                    I  Camera Lifecycle changed to CREATED!
2024-03-25 15:00:43.658 17079-17079 CameraSession           com.ag_consulting                    I  Camera Lifecycle changed to DESTROYED!
2024-03-25 15:00:43.660 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Closing camera.
2024-03-25 15:00:43.661 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Cancelling scheduled re-open: androidx.camera.camera2.internal.Camera2CameraImpl$StateCallback$ScheduledReopen@6d8a463
2024-03-25 15:00:43.661 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Transitioning camera internal state: REOPENING --> CLOSING
2024-03-25 15:00:43.663 17079-17407 CameraStateRegistry     com.ag_consulting                    D  Recalculating open cameras:
                                                                                                    Camera                                       State                 
                                                                                                    -------------------------------------------------------------------
                                                                                                    Camera@cb8838[id=1]                          UNKNOWN               
                                                                                                    Camera@8c68ed9[id=0]                         CLOSING               
                                                                                                    -------------------------------------------------------------------
                                                                                                    Open count: 1 (Max allowed: 1)
2024-03-25 15:00:43.663 17079-17407 CameraStateMachine      com.ag_consulting                    D  New public camera state CameraState{type=CLOSING, error=null} from CLOSING and null
2024-03-25 15:00:43.663 17079-17407 CameraStateMachine      com.ag_consulting                    D  Publishing new public camera state CameraState{type=CLOSING, error=null}
2024-03-25 15:00:43.664 17079-17407 Camera2CameraImpl       com.ag_consulting                    D  {Camera@8c68ed9[id=0]} Transitioning camera internal state: CLOSING --> INITIALIZED
2024-03-25 15:00:43.666 17079-17407 CameraStateRegistry     com.ag_consulting                    D  Recalculating open cameras:
                                                                                                    Camera                                       State                 
                                                                                                    -------------------------------------------------------------------
                                                                                                    Camera@cb8838[id=1]                          UNKNOWN               
                                                                                                    Camera@8c68ed9[id=0]                         CLOSED                
                                                                                                    -------------------------------------------------------------------
                                                                                                    Open count: 0 (Max allowed: 1)
2024-03-25 15:00:43.666 17079-17407 CameraStateMachine      com.ag_consulting                    D  New public camera state CameraState{type=CLOSED, error=null} from CLOSED and null
2024-03-25 15:00:43.666 17079-17407 CameraStateMachine      com.ag_consulting                    D  Publishing new public camera state CameraState{type=CLOSED, error=null}
2024-03-25 15:00:43.667 17079-17407 UseCaseAttachState      com.ag_consulting                    D  Active and attached use case: [] for camera: 0
2024-03-25 15:00:43.675 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.678 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.682 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.686 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.696 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.698 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.700 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.710 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.721 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.723 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.724 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.732 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.751 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.753 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.755 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.761 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.762 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.768 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.769 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.771 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.775 17079-17079 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.782 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.791 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.798 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.806 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.814 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.821 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.828 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.836 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.844 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.851 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput
2024-03-25 15:00:43.858 17079-17389 InputMethodManager      com.ag_consulting                    I  invalidateInput

Camera Device

{
  "formats": [],
  "sensorOrientation": "landscape-left",
  "hardwareLevel": "limited",
  "maxZoom": 10,
  "minZoom": 1,
  "maxExposure": 30,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": false,
  "isMultiCam": false,
  "minFocusDistance": 10,
  "minExposure": -30,
  "name": "0 (BACK) androidx.camera.camera2",
  "hasFlash": false,
  "hasTorch": false,
  "position": "back",
  "id": "0"
}

Device

Samsung TAB A8 (Android 14)

VisionCamera Version

4.0.0-beta.10

Can you reproduce this issue in the VisionCamera Example app?

No, I cannot reproduce the issue in the Example app

Additional information

@Kohys58 Kohys58 added the 馃悰 bug Something isn't working label Mar 25, 2024
@mrousavy
Copy link
Owner

Did you try to reproduce that in the example app on the v4 branch?

@robertyulisman
Copy link

i get an issue to on xiamoy and realmi device, the screen si black and showing this error

WhatsApp Image 2024-03-28 at 13 46 23_acef9da1

working on another devices

this is my code

const camera = React.useRef<Camera>(null);
  const isFocused = useIsFocused();
  const appState = useAppState();
  const [isCameraActive, setIsCameraActive] = React.useState(false);
  const { hasPermission, requestPermission } = useCameraPermission();

  const [deviceDir, setDeviceDir] = React.useState<CameraPosition>('front');
  const devices = Camera.getAvailableCameraDevices();
  const device = devices.find((d) => d.position === deviceDir);

React.useEffect(() => {
    if (hasPermission) {
      if (isFocused && appState === 'active' && showCamera) {
        setIsCameraActive(true);
      }
    }
    requestPermission().then((value) => {
      if (value === true) {
        setIsCameraActive(true);
      }
    });
  }, []);


  return (
    <SafeAreaView style={StyleSheet.absoluteFill}>
      <StatusBar translucent backgroundColor={COLORS.dark[500]} />
{hasPermission && device ? (
        <React.Fragment>
          <Camera
            ref={camera}
            key={device.id}
            style={StyleSheet.absoluteFill}
            device={device}
            isActive={isCameraActive}
            photo
            onError={(err) => {
              console.log('err', err.message);
              Alert.alert('Error Camera', err.message);
            }}
          />

          <LayerCameraSvg />

          <TouchableOpacity
            onPress={closeCamera}
            style={{
              backgroundColor: COLORS.light[50],
              position: 'absolute',
              top: 50,
              right: 20,
              zIndex: 999,
              width: 30,
              height: 30,
              borderRadius: 15,
              alignItems: 'center',
              justifyContent: 'center',
            }}
          >
            <Icon width={24} height={24} name={ICONS.close} />
          </TouchableOpacity>
          <View
            style={{
              zIndex: 999,
              position: 'absolute',
              bottom: 10,
              alignItems: 'center',
              alignSelf: 'center',
            }}
          >
            <Text style={{ color: COLORS.light[50], textAlign: 'center' }} variant="heading-2">
              Sejajarkan Wajahmu
            </Text>

            <TextBody
              title="Sejajarkan wajah sesuai pola diatas dan ambil foto selfiemu"
              style={{
                color: COLORS.light[50],
                textAlign: 'center',
                width: '70%',
                marginVertical: 10,
              }}
            />
            <TouchableOpacity
              onPress={handleTakeCamera}
              // onPress={onRandomZoomPress}
              style={{ marginVertical: 20, marginTop: 20 }}
            >
              <Image
                source={require('@asset/images/shutter.png')}
                style={{ width: 80, height: 80 }}
              />
            </TouchableOpacity>
            <TouchableOpacity
              onPress={handleSwitchCamera}
              // onPress={onRandomZoomPress}
              style={{
                marginVertical: 20,
                marginTop: 40,
                position: 'absolute',
                bottom: 20,
                right: width / 6,
              }}
            >
              <Image source={ICONS.switch} style={{ width: 25, height: 25 }} />
            </TouchableOpacity>
          </View>
        </React.Fragment>
      ) : (
        <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
          <StatusBar barStyle="dark-content" />
          <Text
            variant="body-1"
            style={{
              color: COLORS.dark['500'],
            }}
          >
            No camera device or permission
          </Text>
        </View>
      )}
 </SafeAreaView>
  );

@ChristopherGabba
Copy link

ChristopherGabba commented Apr 6, 2024

+1 I'm getting this error on Google Pixel 3 just simply pressing a button that issues a takePhoto()

    "errorType": "CameraRuntimeError",
    "title": "session/recoverable-error",
    "message": "An unknown error occurred while creating the Camera Session, but the Camera can recover from it.",

Doing nothing fancy just like example app:
Capture Button:

  const takePhotoOptions = useMemo<TakePhotoOptions>(
    () => ({
      photoCodec: "jpeg",
      flash,
      quality: 90,
      enableShutterSound: false,
    }),
    [flash],
  )

  const takePhoto = useCallback(async () => {
    try {
      if (camera.current == null) throw new Error("Camera ref is null!")

      const photo = await camera.current.takePhoto(takePhotoOptions)
      onMediaCaptured(photo, "photo")
    } catch (error) {
      reportCrash({ error, method: "takePhoto", component: "CaptureButton" })
    }
  }, [camera, onMediaCaptured, takePhotoOptions])

CameraScreen:

const onMediaCaptured = useCallback(
    async (media: PhotoFile | VideoFile, type: "photo" | "video") => {
      console.log(`Media captured! ${JSON.stringify(media)}`)
    },
    [],
  )

It's getting thrown from the Camera's onError prop as a Runtime Error.
My screen is not green, it actually freezes and looks like a photo was taken but the app freezes at that point.

Edit: It only happens on my Android front camera (back camera seems to work fine). @mrousavy It's happening with your Shadowlens app too using the android front camera for Google Pixel 3. Records video fine, just the take photo.

@mrousavy
Copy link
Owner

mrousavy commented Apr 9, 2024

will push a new beta soon hopefully that fixes this

@ChristopherGabba
Copy link

Thanks @mrousavy. I did post a bug request here: https://issuetracker.google.com/issues/332350593 per your request. They did send me a demo test app apk to try out, which I plan on doing when I get off work. #2577 (comment)

@ChristopherGabba
Copy link

ChristopherGabba commented Apr 10, 2024

@mrousavy I tested the camera freezing issue on the test app that they provide and it seems to work fine on that app. That sort of rules out the issue being with the package Android camera package.

@SveBo
Copy link

SveBo commented Apr 19, 2024

I can reproduce this issue on my Samsung Tab A8 with the 4.0.0beta15 aswell.
Does someone knows where the issue lies / where to investigate ?

@mrousavy
Copy link
Owner

@SveBo @ChristopherGabba you can just play around with the settings used in configureOutputs(..) in CameraSession.kt.

Try to tweak those values, rebuild, and see if that changes anything.

@SveBo
Copy link

SveBo commented Apr 22, 2024

@mrousavy In my case (Samsung Tab A8) updating CameraX to 1.4.0-alpha05 fixed the problem for me. This seems to be a bug with some Samsung devices generating too large images.

@mrousavy
Copy link
Owner

Could you build alpha05? I couldn't build it and get errors..

@SveBo
Copy link

SveBo commented Apr 22, 2024

I just changed the react-native-vision-camera/android/build.gradle to "def camerax_version = "1.4.0-alpha05",
deleted the android build and .gradle folder,
invalidated caches in Android Studio.

It did build for me and swapping the camerax_version seems to fix the camera issue.

edit: im still on react-native-vision-camera-4.0.0-beta.15

@mrousavy
Copy link
Owner

hm, weird - the CI also fails to build: #2779

@SveBo
Copy link

SveBo commented Apr 22, 2024

Mhm.. I have to check later with the example... but maybe it is the Gradle Version?
The pipeline is using 7.5.1, Im using 8.3.
(Im not too familiar with the Android pipeline, so I could totally be wrong)

@SveBo
Copy link

SveBo commented Apr 24, 2024

This seems to work for me #2788

@SveBo
Copy link

SveBo commented Apr 24, 2024

On an interesting side note, I am not sure yet how relevant this is:

On camerax1.4.0-alpha04 the error / green image only occures if there is no frameprocessor set in the react part.
So this could either be the CameraSelector in vision-camera or camerax is doing something with ImageAnalysis that im not sure of

(Samsung is working fine on 1.4.9-alpha 5, but I got feedback that Lenovo Tab P11 is not working, but I can not confirm that reliable)

@ldalzottomp
Copy link

ldalzottomp commented Apr 25, 2024

Hello!
I have the same issue on a Galaxy Tab A8. At first I thought that the issue was with devices that don't have flash. But some devices with flash were mentioned here.
I will test the branch on my device as well.

@SveBo
Copy link

SveBo commented Apr 26, 2024

@mrousavy I found the fix for the Lenovo Tab 11 now as well.

The VisionCamera prop has
photoQualityBalance="balance" (CAPTURE_MODE_ZERO_SHUTTER_LAG) as default,
but this causes the issue even if frameprocessor / video are bound.

CameraX says this falls back to CAPTURE_MODE_MINIZE_LATENCY if the device doesn't support ZSL. This does not seem to work correctly in this case.

@mrousavy
Copy link
Owner

Yea just set it to quality or speed instead until Google fixes this bug in CameraX

@SveBo
Copy link

SveBo commented Apr 26, 2024

Thanks again for the V4 release, its way more stable now on Android 馃憤

@mrousavy
Copy link
Owner

great to hear 馃挭

@ShamuXX
Copy link

ShamuXX commented Apr 26, 2024

I have a similar problem, I was on version 3.6 but I had the streched view camera error, I tried updating to v4 to resolve it but now I have a new problem with the camera view when open and launch the camera, it turns a green background and after a few seconds the camera freezes, this is shown in the logcats:

E 'Camera.onError(session/recoverable-error): An unknown error occurred while creating the Camera Session, but the Camera can recover from it.', { [session/recoverable-error: An unknown error occurred while creating the Camera Session, but the Camera can recover from it.]
name: 'session/recoverable-error',
_code: 'session/recoverable-error',
_message: 'An unknown error occurred while creating the Camera Session, but the Camera can recover from it.', _cause: undefined }

Screenshot_20240426-114631

@dragonmaster784
Copy link

Current devices I have noticed experiencing this are:
Samsung Galaxy A05s
Samsung Galaxy A03 Core
Oppo model CPH2197
Samsung Galaxy Grand Primo
Samsung Galaxy J4 Core

Some get a black screen, other's get the green screen. I will start debugging where/why they are receiving "recoverable" error.

@dragonmaster784
Copy link

@mrousavy I found the fix for the Lenovo Tab 11 now as well.

The VisionCamera prop has photoQualityBalance="balance" (CAPTURE_MODE_ZERO_SHUTTER_LAG) as default, but this causes the issue even if frameprocessor / video are bound.

CameraX says this falls back to CAPTURE_MODE_MINIZE_LATENCY if the device doesn't support ZSL. This does not seem to work correctly in this case.

I can confirm that setting the photoQualityBalance prop to "speed" instead of its default value of "balanced", has helped resolve the black and green screens reported on the above devices 馃憤

@mrousavy
Copy link
Owner

@ChristopherGabba @dragonmaster784 could you do me a favor and report that to the Google CameraX team? It's clearly a bug - the doc of the ZSL option (which is what "balanced" is essentially) say that it will fall-back to not use ZSL, but it doesn't apparently - and fails when used in combination with video or ImageAnalysis.

Would be great if you could either tell them that in a new issue report or in the one @ChristopherGabba already created.

Thanks!

@SveBo
Copy link

SveBo commented May 20, 2024

I also posted an issue report, but it seems like, they can not reproduce it?
Sadly I do not have a device where the error occures myself (maybe its because we need to use it in combination with Video or ImageAnalysis?)

https://issuetracker.google.com/issues/337214687

@dragonmaster784
Copy link

dragonmaster784 commented May 20, 2024

Absolutely @mrousavy 馃憤 I have a reproducible device, so I'll issue a ticket to the CameraX team with a full report with the stack trace and logs once I clock off here 馃
edit: I will maybe upload my device stack trace to the open ticket from @SveBo first.

@mrousavy
Copy link
Owner

I thought this only happens when also using a Video/ImageAnalysis output, no? Or does this just happen with photo={true}, nothing else? @SveBo

Maybe worth adding that detail for them.

@mrousavy
Copy link
Owner

Hey - just created a PR to temporarily fix this - can you test if that works for you? #2897 馃檹

@ldalzottomp
Copy link

I am not reproducing this issue on a device that was previously showcasing it (Samsung galaxy tab A8) using the version 4.0.5 馃憤
Thanks for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 bug Something isn't working
Projects
None yet
8 participants