Comments (5)
Fixed this issue in #2768. πͺ
from react-native-vision-camera.
I have same issue
Relevant log output
Camera.onError(unknown/unknown): Use case Preview:androidx.camera.core.Preview-1fdaff89-d5cf-44e3-9c72-75d09de454d2 already bound to a different lifecycle. [unknown/unknown: Use case Preview:androidx.camera.core.Preview-1fdaff89-d5cf-44e3-9c72-75d09de454d2 already bound to a different lifecycle.]
**Logcat**
2024-04-18 15:48:07.680 2578-2578 CameraView pid-2578 I Updating CameraSession...
2024-04-18 15:48:07.683 2578-2578 CameraSession pid-2578 I configure { ... }: Waiting for lock...
2024-04-18 15:48:07.684 2578-2578 CameraSession pid-2578 I configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=true, outputsChanged=false, sidePropsChanged=false, isActiveChanged=false, locationChanged=false)
2024-04-18 15:48:07.684 2578-2578 CameraSession pid-2578 I Binding Camera #10...
2024-04-18 15:48:07.685 2578-2578 CameraSession pid-2578 I Binding 3 use-cases...
2024-04-18 15:48:07.687 2578-2578 CameraSession pid-2578 I Camera State: OPEN (has error: false)
2024-04-18 15:48:07.687 2578-2578 CameraView pid-2578 I invokeOnInitialized()
2024-04-18 15:48:07.688 2578-2578 CameraSession pid-2578 I Successfully bound Camera #10!
2024-04-18 15:48:07.688 2578-2578 CameraSession pid-2578 I configure { ... }: Completed CameraSession Configuration! (State: RESUMED)
2024-04-18 15:48:07.756 977-999 ndroid.systemui com.android.systemui I Background concurrent mark compact GC freed 372175(17MB) AllocSpace objects, 0(0B) LOS objects, 50% free, 16MB/33MB, paused 169us,9.742ms total 93.345ms
2024-04-18 15:48:07.879 550-647 audioserver audioserver D FGS Logger Transaction failed
2024-04-18 15:48:07.879 550-647 audioserver audioserver D -129
2024-04-18 15:48:08.883 2578-2770 EGL_emulation pid-2578 D app_time_stats: avg=83.28ms min=10.34ms max=952.59ms count=19
2024-04-18 15:48:08.970 550-639 audioserver audioserver D FGS Logger Transaction failed
2024-04-18 15:48:08.970 550-639 audioserver audioserver D -129
2024-04-18 15:48:08.994 2578-2578 CameraView pid-2578 I Updating CameraSession...
2024-04-18 15:48:08.995 2578-2578 CameraSession pid-2578 I configure { ... }: Waiting for lock...
2024-04-18 15:48:08.996 2578-2578 CameraSession pid-2578 I configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=true, outputsChanged=false, sidePropsChanged=false, isActiveChanged=false, locationChanged=false)
2024-04-18 15:48:08.996 2578-2578 CameraSession pid-2578 I Binding Camera #1...
2024-04-18 15:48:08.996 2578-2578 CameraSession pid-2578 I Binding 3 use-cases...
2024-04-18 15:48:08.997 2578-2578 CameraSession pid-2578 E Failed to configure CameraSession! Error: Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle., Config-Diff: Difference(deviceChanged=true, outputsChanged=false, sidePropsChanged=false, isActiveChanged=false, locationChanged=false)
java.lang.IllegalStateException: Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle.
at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:587)
at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:386)
at com.mrousavy.camera.core.CameraSession.configureCamera(CameraSession.kt:427)
at com.mrousavy.camera.core.CameraSession.configure(CameraSession.kt:165)
at com.mrousavy.camera.CameraView$update$1.invokeSuspend(CameraView.kt:156)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
2024-04-18 15:48:08.997 2578-2578 CameraView pid-2578 E invokeOnError(...):
2024-04-18 15:48:08.997 2578-2578 System.err pid-2578 W java.lang.IllegalStateException: Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle.
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:587)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:386)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at com.mrousavy.camera.core.CameraSession.configureCamera(CameraSession.kt:427)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at com.mrousavy.camera.core.CameraSession.configure(CameraSession.kt:165)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at com.mrousavy.camera.CameraView$update$1.invokeSuspend(CameraView.kt:156)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at android.os.Handler.handleCallback(Handler.java:958)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at android.os.Handler.dispatchMessage(Handler.java:99)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at android.os.Looper.loopOnce(Looper.java:205)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at android.os.Looper.loop(Looper.java:294)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at android.app.ActivityThread.main(ActivityThread.java:8177)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at java.lang.reflect.Method.invoke(Native Method)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
2024-04-18 15:48:08.998 2578-2578 System.err pid-2578 W at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
2024-04-18 15:48:09.016 2578-2951 ReactNativeJS pid-2578 E 'Camera.onError(unknown/unknown): Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle.', { [unknown/unknown: Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle.]
name: 'unknown/unknown',
_code: 'unknown/unknown',
_message: 'Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle.',
_cause:
{ stacktrace: 'java.lang.IllegalStateException: Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle.\n\tat androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:587)\n\tat androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:386)\n\tat com.mrousavy.camera.core.CameraSession.configureCamera(CameraSession.kt:427)\n\tat com.mrousavy.camera.core.CameraSession.configure(CameraSession.kt:165)\n\tat com.mrousavy.camera.CameraView$update$1.invokeSuspend(CameraView.kt:156)\n\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)\n\tat android.os.Handler.handleCallback(Handler.java:958)\n\tat android.os.Handler.dispatchMessage(Handler.java:99)\n\tat android.os.Looper.loopOnce(Looper.java:205)\n\tat android.os.Looper.loop(Looper.java:294)\n\tat android.app.ActivityThread.main(ActivityThread.java:8177)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)\n',
message: 'Use case Preview:androidx.camera.core.Preview-446a4f93-f850-48f1-9497-e11fd42c6df9 already bound to a different lifecycle.' } }
2024-04-18 15:48:09.068 2578-3308 TrafficStats pid-2578 D tagSocket(75) with statsTag=0xffffffff, statsUid=-1
2024-04-18 15:48:09.193 550-647 audioserver audioserver D FGS Logger Transaction failed
2024-04-18 15:48:09.193 550-647 audioserver audioserver D -129
2024-04-18 15:48:09.636 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000001/CronetDynamite.dm': No such file or directory
2024-04-18 15:48:09.636 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000001/CronetDynamite.dm': No such file or directory
2024-04-18 15:48:09.637 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000002/DynamiteLoader.dm': No such file or directory
2024-04-18 15:48:09.637 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000002/DynamiteLoader.dm': No such file or directory
2024-04-18 15:48:09.650 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000005/GoogleCertificates.dm': No such file or directory
2024-04-18 15:48:09.650 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000005/GoogleCertificates.dm': No such file or directory
2024-04-18 15:48:09.653 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000000d/dl-VisionOcrDynamite.integ_231602402100000.dm': No such file or directory
2024-04-18 15:48:09.653 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000000d/dl-VisionOcrDynamite.integ_231602402100000.dm': No such file or directory
2024-04-18 15:48:09.654 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000000a/dl-MlkitBarcodeUi.optional_231818100000.dm': No such file or directory
2024-04-18 15:48:09.654 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000000a/dl-MlkitBarcodeUi.optional_231818100000.dm': No such file or directory
2024-04-18 15:48:09.659 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000000b/dl-MlkitOcrCommon.optional_231818100400.dm': No such file or directory
2024-04-18 15:48:09.659 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/0000000b/dl-MlkitOcrCommon.optional_231818100400.dm': No such file or directory
2024-04-18 15:48:09.659 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000000/AdsDynamite.dm': No such file or directory
2024-04-18 15:48:09.659 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000000/AdsDynamite.dm': No such file or directory
2024-04-18 15:48:09.661 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000018/dl-VisionOcr.optional_241017100000.dm': No such file or directory
2024-04-18 15:48:09.661 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000018/dl-VisionOcr.optional_241017100000.dm': No such file or directory
2024-04-18 15:48:09.662 3241-3244 ziparchive pid-3241 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000013/DynamiteLoader.dm': No such file or directory
Camera Device
{
"formats": [],
"sensorOrientation": "landscape-left",
"hardwareLevel": "limited",
"maxZoom": 1,
"minZoom": 1,
"maxExposure": 6,
"supportsLowLightBoost": false,
"neutralZoom": 1,
"physicalDevices": [
"ultra-wide-angle-camera"
],
"supportsFocus": false,
"supportsRawCapture": false,
"isMultiCam": false,
"minFocusDistance": 0,
"minExposure": -6,
"name": "10 (BACK) androidx.camera.camera2",
"hasFlash": false,
"hasTorch": false,
"position": "back",
"id": "10"
}
Device
Samsung A71 - Android 13, Android Emulator - Android 13,14
VisionCamera Version
4.0.0-beta.14
from react-native-vision-camera.
see this
#2721 (comment)
from react-native-vision-camera.
Duplicate of #2721
from react-native-vision-camera.
Also without sharing logs I cannot help you @lv-saikrishna.
Thanks for extending this and sharing logs @EmanuilM though.
from react-native-vision-camera.
Related Issues (20)
- π Camera preview doesn't show the full image even with resizeMode='contain' HOT 2
- orientationOutput isn't applied in IOS with skia HOT 15
- Build failed in RN version 0.74.2 androidπ§ HOT 1
- π HOT 7
- π test HOT 4
- π Test HOT 2
- π onStatusChanged override function missing for android versions before api 29 HOT 3
- π Hello, I have a question for you... we use your plugin, but we have a problem with the fact that the preview is smaller than the filmed or photographed area. how should we solve this? HOT 3
- π Diffrent area - video/photo HOT 2
- π How to get preview size (height and width) on resizeMode="contain" HOT 3
- π Get "Missing purpose string" Apple violation when VCEnableLocation is false HOT 3
- π onIitialized only work when the isActive once. HOT 2
- π onOutputOrientationChanged outputs wrong value on tablets HOT 6
- β¨ Hello author, can you add a cropping function after taking the photo? HOT 3
- π system/camera-is-restricted Camera functionality is not available because it has been restricted by the operating system, possibly due to a device policy. HOT 4
- π Question: Implementing Virtual Background and AR Try-On Glasses with Frame Processing HOT 2
- π CodeScanner does not recognize Data Matrix code on a black background HOT 2
- π photo.orientation is wrong when outputOrientation = preview on Android HOT 2
- π OutputOrientation: "Duplicate label in when" HOT 1
- π Add filter to photo when photo is taken HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.