react-native-camera-kit icon indicating copy to clipboard operation
react-native-camera-kit copied to clipboard

Cannot take picture - Camera is closed

Open Damil2020 opened this issue 3 years ago • 7 comments

Issue Description

When using camera.capture, nothing really happens and the promise gets rejected after a while, stating "Camera is closed".

Steps to Reproduce / Code Snippets / Screenshots

Just try to capture an image.


Environment

  • React Native version: 0.64.2
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Device with AndroidX - Debug

Damil2020 avatar Jul 29 '21 06:07 Damil2020

I am getting the same issue on android 12

waleed-nemreeni avatar Jan 10 '22 09:01 waleed-nemreeni

Yep, same issue. Any solutions?

AdamSheaHewett avatar May 26 '22 21:05 AdamSheaHewett

Same, what's up ?

Etx17 avatar Mar 12 '23 16:03 Etx17

@Damil2020 problem solved? I am getting the same issue

Henriquehlr avatar Aug 14 '23 02:08 Henriquehlr

If you are using the emulator, it's common for the backfacing (default) camera to not work. It reports it as 'closed' or start misbehaving. You can test using a physical device, or upgrade Android studio and your emulator image to something newer to restore support.

scarlac avatar Aug 14 '23 23:08 scarlac

If you are using the emulator, it's common for the backfacing (default) camera to not work. It reports it as 'closed' or start misbehaving. You can test using a physical device, or upgrade Android studio and your emulator image to something newer to restore support.

ERROR Error capturing photo: [Error: takePicture failed: Camera is closed.] error is occurring even after generating an apk, error is occurring even after generating an apk, only with the rear camera

Henriquehlr avatar Aug 16 '23 02:08 Henriquehlr

Hello! I never was able to find a solution for this, so I ended using *react-native-image-picker *instead https://github.com/react-native-image-picker/react-native-image-picker

Regards, Damian

El mar, 15 ago 2023 a las 23:30, Henrique Lucas Rodrigues (< @.***>) escribió:

If you are using the emulator, it's common for the backfacing (default) camera to not work. It reports it as 'closed' or start misbehaving. You can test using a physical device, or upgrade Android studio and your emulator image to something newer to restore support.

ERROR Error capturing photo: [Error: takePicture failed: Camera is closed.] error is occurring even after generating an apk, error is occurring even after generating an apk, only with the rear camera

— Reply to this email directly, view it on GitHub https://github.com/teslamotors/react-native-camera-kit/issues/416#issuecomment-1679873542, or unsubscribe https://github.com/notifications/unsubscribe-auth/APV5FDLAXWJU4CG74ORMDLDXVQWDBANCNFSM5BFYNDUA . You are receiving this because you were mentioned.Message ID: @.***>

Damil2020 avatar Aug 16 '23 06:08 Damil2020