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)
- 💭 Two separate frame processors at different target FPS HOT 7
- 🐛 [AVCaptureDevice setActiveColorSpace:] Not supported - use activeFormat.supportedColorSpaces'. HOT 2
- APK Size increase After implementing react-native-vision-camera lib double the apk size HOT 4
- 💭 Why the Photo Result Does Not Come Out in the Specified Aspect Ratio HOT 1
- 🐛 `finally` on a `Promise` stops camera on Android HOT 3
- 🐛 [V4][Android] Release crash: maxImages (6) has already been acquired HOT 1
- 🔧 Not able to build expo dev client when using any of the given frame processing plugin for OCR HOT 2
- 🐛 [Android] isActive change doesn't happen fast enough causing device/camera-already-in-use error when switching to native camera app HOT 1
- 🔧 Execution failed for task ':react-native-vision-camera:compileReleaseKotlin'. HOT 3
- 🔧 This API is provided only for React Native frameworks and not intended for general users. This API can change between minor versions in alignment with React Native frameworks and won't be considered a breaking change. HOT 10
- 💭 Android: Frameprocessor HOT 7
- 💭 Focus not work HOT 1
- 🐛 Memory leak Android HOT 6
- 💭 [iOS] Did someone manage to get to reasonable FPS with ML Kit Pose Detection (native frame processor plugin)? HOT 2
- 💭 Lifecycle methods for native frame processors HOT 5
- 💭 How to access GPS location tags in photo metadata? HOT 4
- 🐛 takePhoto() function working very slowly on Android HOT 3
- 🔧 A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction HOT 12
- 💭 How does RNVC interact with OS camera settings? HOT 1
- 💭 Is there a migration guide from V3 to V4? 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.