imagePicker Crashing with Expo 31.0.0 Android 8.1
See original GitHub issueEnvironment
Expo CLI 2.4.1 environment info: System: OS: macOS 10.14.1 Shell: 3.2.57 - /bin/bash Binaries: Node: 9.4.0 - ~/.nvm/versions/node/v9.4.0/bin/node npm: 6.4.1 - ~/.nvm/versions/node/v9.4.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: expo: ^31.0.2 => 31.0.5 react: 16.5.0 => 16.5.0 react-native: https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz => 0.57.1 react-navigation: 1.5.11 => 1.5.11 npmGlobalPackages: expo-cli: 2.4.1
The device crashing is a Moto X4 Android 8.1
Steps to Reproduce
You can try the project here: https://expo.io/@receiptcoin/receiptchain
Taking a photo using the camera doesn’t crashes the app.
Here is the code I’m using
async componentDidMount() {
console.log('camera screen mounted');
const { status } = await Permissions.askAsync(Permissions.CAMERA);
const cameraRollPermission = await Permissions.askAsync(Permissions.CAMERA_ROLL);
const status_roll = cameraRollPermission.status;
console.log('status and status camera is ' , status)
console.log('status and status roll is ' , status_roll)
if (status !== 'granted') {
alert('Please grant app access to the camera so you can upload your photo.');
}
if (status_roll !== 'granted') {
alert('Please grant app access to the camera roll so you can upload your photo.');
}
//this.takePhoto();
}
takePhoto = async () => {
console.log('take photo called')
const pickerResult = await ImagePicker.launchCameraAsync({
allowsEditing: true,
aspect: [4, 4],
exif: true,
});
console.log('picker result is ' , pickerResult);
this.handleImagePicked(pickerResult);
Both permissions are granted on the user’s moto X4, but the app still crashes upon the ImagePicker.launchCameraAsync call.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:30 (7 by maintainers)
Guys, do we have an update on this ? The problem persists.
Issue continues to persist for me.