android / android/camera-samples

CameraX:No available camera can be found.

Open
#415 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Kotlin
Stars
5.5k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

E/CameraManager: Failed to parse camera Id /dev/video0 to integer
D/CameraRepository: Added camera: /dev/video0
W/Camera2CamcorderProfileProvider: Camera id is not an integer: /dev/video0, unable to create CamcorderProfileProvider
I/Camera2CameraInfo: Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL
D/CameraValidator: Verifying camera lens facing on pad, lensFacingInteger: null
E/CameraValidator: Camera LensFacing verification failed, existing cameras: [Camera@75e5ee1[id=/dev/video0]]
W/CameraX: Retry init. Start time 102582 current time 104905
androidx.camera.core.impl.CameraValidator$CameraIdListIncorrectException: Expected camera missing from device.
at androidx.camera.core.impl.CameraValidator.validateCameras(CameraValidator.java:95)
at androidx.camera.core.CameraX.lambda$initAndRetryRecursively$9$CameraX(CameraX.java:613)
at androidx.camera.core.-$$Lambda$CameraX$u-Xx2b6YXY5GXNXRh-mDiDnHdpQ.run(Unknown Source:10)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.IllegalArgumentException: No available camera can be found.
at androidx.camera.core.CameraSelector.filter(CameraSelector.java:105)
at androidx.camera.core.CameraSelector.filter(CameraSelector.java:135)
at androidx.camera.core.CameraSelector.select(CameraSelector.java:75)
at androidx.camera.core.impl.CameraValidator.validateCameras(CameraValidator.java:81)
at androidx.camera.core.CameraX.lambda$initAndRetryRecursively$9$CameraX(CameraX.java:613) 
at androidx.camera.core.-$$Lambda$CameraX$u-Xx2b6YXY5GXNXRh-mDiDnHdpQ.run(Unknown Source:10) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:919) 

Contributor guide

Open the contributing guide

Research direction

Start with the stack-trace entry points in androidx.camera.core.impl.CameraValidator.java, CameraSelector.java, and CameraX.java, focusing on the /dev/video0 camera ID and failed lens-facing validation. Reproduce the log on the affected device, then establish the expected handling for this camera before defining the fix and its verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.