[expo-image-picker] Crash when trying to call launchCameraAsync to get an image
See original GitHub issueSummary
The application crashes when I introduce expo-image-picker
and call launchCameraAsync as specified in the documentation.
The camera starts immediately after calling launchCameraAsync. Then the application crashes when I take a picture with the camera and select the image. So it works fine until the camera is launched, but crashes when it tries to acquire an image.
As per this issue, if I go back without taking a photo after launching the camera once and then launch the camera again to take a photo, I may be able to get it.
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
44
Environment
expo-env-info 1.0.3 environment info: System: OS: Linux 5.10 Debian GNU/Linux 10 (buster) 10 (buster) Shell: 3.0.2 - /usr/bin/fish Binaries: Node: 16.13.1 - /tmp/yarn–1651720947618-0.5496521237718734/node Yarn: 1.22.17 - /tmp/yarn–1651720947618-0.5496521237718734/yarn npm: 8.1.2 - /usr/local/bin/npm IDEs: Android Studio: AI-211.7628.21.2111.8193401 npmPackages: expo: ~44.0.0 => 44.0.6 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 Expo Workflow: managed
Reproducible demo
https://github.com/chimame/react-native-camera-crash-sample
I submit the code for the crashing sample I created. It crashes both when using Expo Go and when built with EAS.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (1 by maintainers)
Adding a different permissions request didn’t help me. I’m experiencing the same error after ensuring that I have the permissions.
Hello everyone, I had the same problem, in several Samsung devices, in addition to several other devices as well.
I ended up finding a solution, which took the permissions directly from the React Native package and implemented it in my app, and to my surprise and relief, it worked perfectly, both running through the expo and also after the build. Following example code:
Hope this helps.