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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why this library want access to device camera and bluethooth permissions? #1091

Open
sunbyte opened this issue Dec 8, 2023 · 7 comments
Open
Labels

Comments

@sunbyte
Copy link

sunbyte commented Dec 8, 2023

When a video is played I got this in Logcat

getCameraCharacteristics: java.lang.IllegalArgumentException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1625) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:671) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:612) at Dw0.i(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:15) at org.chromium.media.VideoCaptureFactory.isLegacyOrDeprecatedDevice(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) at org.chromium.media.VideoCaptureFactory.getDeviceName(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) Caused by: android.os.ServiceSpecificException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) (code 3) at android.os.Parcel.createExceptionOrNull(Parcel.java:3071) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.hardware.ICameraService$Stub$Proxy.getCameraCharacteristics(ICameraService.java:805) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:650) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:612)  at Dw0.i(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:15)  at org.chromium.media.VideoCaptureFactory.isLegacyOrDeprecatedDevice(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1)  at org.chromium.media.VideoCaptureFactory.getDeviceName(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1)  2023-12-08 16:27:26.082 18878-19015 cr_VideoCapture com.todoboom.app E getCameraCharacteristics: java.lang.IllegalArgumentException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1625) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:671) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:612) at Dw0.i(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:15) at org.chromium.media.VideoCaptureFactory.isLegacyOrDeprecatedDevice(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) at org.chromium.media.VideoCaptureFactory.getDeviceId(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) Caused by: android.os.ServiceSpecificException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) (code 3) at android.os.Parcel.createExceptionOrNull(Parcel.java:3071) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.hardware.ICameraService$Stub$Proxy.getCameraCharacteristics(ICameraService.java:805) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:650) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:612)  at Dw0.i(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:15)  at org.chromium.media.VideoCaptureFactory.isLegacyOrDeprecatedDevice(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1)  at org.chromium.media.VideoCaptureFactory.getDeviceId(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1)  2023-12-08 16:27:26.093 18878-19015 cr_VideoCapture com.todoboom.app E getCameraCharacteristics: java.lang.IllegalArgumentException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1625) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:671) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:612) at Dw0.i(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:15) at org.chromium.media.VideoCaptureFactory.isLegacyOrDeprecatedDevice(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) at org.chromium.media.VideoCaptureFactory.getCaptureApiType(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) Caused by: android.os.ServiceSpecificException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) (code 3) at android.os.Parcel.createExceptionOrNull(Parcel.java:3071) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.hardware.ICameraService$Stub$Proxy.getCameraCharacteristics(ICameraService.java:805) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:650) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:612)  at Dw0.i(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:15)  at org.chromium.media.VideoCaptureFactory.isLegacyOrDeprecatedDevice(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1)  at org.chromium.media.VideoCaptureFactory.getCaptureApiType(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1)  2023-12-08 16:27:26.122 18878-19015 cr_VideoCapture com.todoboom.app E getCameraCharacteristics: java.lang.IllegalArgumentException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1625) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:671) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:612) at Dw0.i(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:15) at org.chromium.media.VideoCaptureFactory.isLegacyOrDeprecatedDevice(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) at org.chromium.media.VideoCaptureFactory.getFacingMode(chromium-TrichromeWebViewGoogle6432.apk-stable-567263637:1) Caused by: android.os.ServiceSpecificException: getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2) (code 3) at android.os.Parcel.createExceptionOrNull(Parcel.java:3071) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.hardware.ICameraService$Stub$Proxy.getCameraCharacteristics(ICameraService.java:805) at android.hardware.camera2.CameraManager.getCameraCharacteristics(CameraManager.java:650)

@PierfrancescoSoffritti
Copy link
Owner

I don't think this error comes from the library. Why do you think that?

@sunbyte
Copy link
Author

sunbyte commented Dec 8, 2023

Because this is happening when the library try to load and play video. If I remove the library I don't have this problem. In our application we do not use camera or camera permissions.

@PierfrancescoSoffritti
Copy link
Owner

The library doesn't require access to camera or bluetooth either.

@billdizl
Copy link

yes ,The library doesn't require access to camera or bluetooth either. This library is equivalent to webview, this webview may load youtube link,so doesn't require access to camera or bluetooth either.

@sunbyte
Copy link
Author

sunbyte commented Dec 11, 2023

This library TRY to access camera information and bluetooth when a video is loaded. You can see it very easy in the logcat. Maybe your library use another library that do this actions.

@billdizl
Copy link

billdizl commented Dec 11, 2023

Please check your code,If you still think it's a problem with the library,You can do this,
have 3 ways to test and verify

  1. you close all app for your mobile ,Run your app and check if logcat has the log
  2. Run the demo of the library to check if the issue exists
  3. Replace the phone and try again with 1 and 2 above. If they still exist, provide feedback again
    @sunbyte

@PierfrancescoSoffritti
Copy link
Owner

Let us know if you see the same log from the sample app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants