Please provide the following:
- SDK Version: 38.0.2
- Platforms(Android/iOS/web/all): Android
Code looks similar to the following:
import * as MediaLibrary from 'expo-media-library';
import * as ImagePicker from 'expo-image-picker';
import * as Permissions from 'expo-permissions';
// ...
const result = await ImagePicker.launchCameraAsync();
if (!result.cancelled) {
console.log("result:", result.uri);
const cachedAsset = await MediaLibrary.createAssetAsync(result.uri);
console.log("cachedAsset", cachedAsset); // <------ THIS
} else {
console.log("CANCELLED");
}
// ...
The line marked with THIS
is never executed. It seems like the code throws an error, but even if I use the .catch()
or if I use a try/catch
, I don’t get any error and the Promise is never resolved.
This is only happening on some specific devices:
- Works in Samsung A7 (Android 8)
- Doesn’t work on Samsung S10+ (Android 10)
- Doesn’t work on LG K5 (Android 9)