When obtaining some pictures on the phone file system using PHOTOLIBRARY, particularly image files stored in /Phone/Download, the app crashes. Normally it does work, but it seems in some folders the app crashes
What is expected to happen?
The function camera.getPicture(successCallback, errorCallback, options) should run the function successCallback
What does actually happen?
When the function camera.getPicture(successCallback, errorCallback, options) is called, wherein options has sourceType:Camera.PictureSourceType.PHOTOLIBRARY, the app crashes when I select certain files
Information
Command or Code
var options = {
quality: 50,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
encodingType: Camera.EncodingType.JPEG,
mediaType: Camera.MediaType.PICTURE,
allowEdit: false,
correctOrientation: true // Corrects Android orientation quirks
}
console.log('starting navigator.camera.getPicture') // this is shown
navigator.camera.getPicture(function (result) {
console.log('cameraSuccess init') // this is never shown, it crashes before
cameraSuccess(result)
},
function cameraError (error) {
console.debug('error getting photo: ' + error, 'app') // this is not shown either, the app just crashes
}, options)
What is very strange is that, when I get exactly the same picture but obtained through folder "Recent" in Android file Explorer opened by this plugin, the app does not crash.
Bug Report
Problem
When obtaining some pictures on the phone file system using
PHOTOLIBRARY
, particularly image files stored in/Phone/Download
, the app crashes. Normally it does work, but it seems in some folders the app crashesWhat is expected to happen?
The function
camera.getPicture(successCallback, errorCallback, options)
should run the functionsuccessCallback
What does actually happen?
When the function
camera.getPicture(successCallback, errorCallback, options)
is called, wherein options hassourceType:Camera.PictureSourceType.PHOTOLIBRARY
, the app crashes when I select certain filesInformation
Command or Code
Screenshots
Environment, Platform, Device
Ubuntu, Android, Samsung Galaxy A5
Version information
Cordova: 9.0.0 (cordova-lib@9.0.1)
Plugins
Java
adb
Checklist