You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
recently I am facing the Issue that my app crashes when I am trying to call the function "captureImage". The function did in fact work for quite some time, so I don't actually know why it doesn't anymore.
`
function captureImage(storePath) {
try {
var newPath = storePath;
var captureSuccess = function (mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
let name = new Date().getTime();
moveFile(path, FILE_DIRECTORY + newPath, name + ".jpg");
}
};
// capture error callback
var captureError = function (error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};
// start image capture
navigator.device.capture.captureImage(captureSuccess, captureError, { limit: 1 });
} catch(e) {
console.log(e);
}
}
`
The app doesn't even Catch the exception. Instead it just crashes. And leaves me this error-message:
"*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <MainViewController: 0x101513700>.'"
The "NSInvalidArgumentException" kinda confuses me a bit, as it seems like I am passing some wrong functions for success and error. But as mentioned before this code worked for me like for more than a year and I did not change anything since then.
Bug Report
Hi guys,
recently I am facing the Issue that my app crashes when I am trying to call the function "captureImage". The function did in fact work for quite some time, so I don't actually know why it doesn't anymore.
`
function captureImage(storePath) {
}
`
The app doesn't even Catch the exception. Instead it just crashes. And leaves me this error-message:
"*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <MainViewController: 0x101513700>.'"
The "NSInvalidArgumentException" kinda confuses me a bit, as it seems like I am passing some wrong functions for success and error. But as mentioned before this code worked for me like for more than a year and I did not change anything since then.
Cordova version: 9.0.0
Cordova-Ins version: 4.5.5
iOS Version: 13.2.3
Device: iPad (6. Gen)
The text was updated successfully, but these errors were encountered: