opentok / opentok-android-sdk-samples

Sample applications illustrating best practices using OpenTok Android SDK.
https://tokbox.com/developer/sdks/android/
MIT License
211 stars 169 forks source link

Session 0: Exception while stopping repeating: android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): checkPidStatus:2462: The camera device has been disconnected #449

Closed jay22794 closed 1 year ago

jay22794 commented 1 year ago

The app is crashing when session is started Session 0: Exception while stopping repeating: android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): checkPidStatus:2462: The camera device has been disconnected at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1340) at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:99) at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1259) at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:578) at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:789) at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:245) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8633) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130) Caused by: android.os.ServiceSpecificException: checkPidStatus:2462: The camera device has been disconnected (code 4) at android.os.Parcel.createExceptionOrNull(Parcel.java:2399) at android.os.Parcel.createException(Parcel.java:2369) at android.os.Parcel.readException(Parcel.java:2352) at android.os.Parcel.readException(Parcel.java:2294) at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.cancelRequest(ICameraDeviceUser.java:750) at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:97) at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1259)  at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:578)  at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:789)  at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:245)  at android.os.Handler.handleCallback(Handler.java:938)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:246)  at android.app.ActivityThread.main(ActivityThread.java:8633)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130) 

Device

v-kpheng commented 1 year ago

@jay22794, thanks for letting us now about this issue.

However, steps to reproduce are missing, which makes root cause difficult. Can you please provide us with reproduction steps? Also, which devices are impacted and on which versions of the Android SDK? Can you reproduce this on the most recent version?

Please advise. Thanks!