bhandaribhuminpfizer opened a new issue #717:
URL: https://github.com/apache/cordova-plugin-camera/issues/717
# Bug Report
Try to pick gallery picture after select image and click on choose button
app is stuck testing on iOSv14.3
```
connection on anonymousListener or serviceListener from pid 4341: Warning:
Exception caught during invocation of selector
didSelectMediaWithInfoDictionary:, dropping incoming message and invalidating
the connection.
Exception: *** -[NSURL URLByAppendingPathExtension:]: component, components,
or pathExtension cannot be nil.
*** -[NSURL URLByAppendingPathExtension:]: component, components, or
pathExtension cannot be nil.
(
0 CoreFoundation 0x00007fff20420af6
__exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20177e78
objc_exception_throw + 48
2 Foundation 0x00007fff2085f900
-[NSURL(NSURLPathUtilities) URLByDeletingPathExtension] + 0
3 PhotosUI 0x00007fff3f7074be
-[PUPhotoPickerExtensionHostContext
_UIImagePickerControllerInfoDictionaryFromPhotoPickerInfoDictionary:] + 2177
4 PhotosUI 0x00007fff3f706aaf
-[PUPhotoPickerExtensionHostContext didSelectMediaWithInfoDictionary:] + 34
5 Foundation 0x00007fff209280e3
__NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 10
6 Foundation 0x00007fff20926e1b
-[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 2268
7 Foundation 0x00007fff20928412
message_handler + 206
8 libxpc.dylib 0x00007fff20055cac
_xpc_connection_call_event_handler + 56
9 libxpc.dylib 0x00007fff2005603e
_xpc_connection_mach_event + 905
10 libdispatch.dylib 0x000000010bc1ca68
_dispatch_client_callout4 + 9
11 libdispatch.dylib 0x000000010bc36ba8
_dispatch_mach_msg_invoke + 550
12 libdispatch.dylib 0x000000010bc230ad
_dispatch_lane_serial_drain + 307
13 libdispatch.dylib 0x000000010bc37a76
_dispatch_mach_invoke + 563
14 libdispatch.dylib 0x000000010bc230ad
_dispatch_lane_serial_drain + 307
15 libdispatch.dylib 0x000000010bc23f9d
_dispatch_lane_invoke + 493
16 libdispatch.dylib 0x000000010bc2fde2
_dispatch_workloop_worker_thread + 882
17 libsystem_pthread.dylib 0x00007fff60c8e499
_pthread_wqthread + 314
18 libsystem_pthread.dylib 0x00007fff60c8d467
start_wqthread + 15
)
```
### Command or Code
```
this._camera
.getPicture(this.optionsForType(type))
.then((imageUrlToBeNormalized) => {
// Handle cases for different URLs
console.log('imageUrlToBeNormalized',imageUrlToBeNormalized);
this.normalizeUrl(imageUrlToBeNormalized, type).then((imageUrl) =>
{
console.log('after normalizeUrl',imageUrl);
// Get file name and path
const name = imageUrl.substr(
parseInt(imageUrl.lastIndexOf("/"), 10) + 1
);
const namePath = imageUrl.substr(
0,
parseInt(imageUrl.lastIndexOf("/"), 10) + 1
);
// Copy file
this._file
.copyFile(namePath, name, this._file.dataDirectory,
UUID.UUID())
.then(async (file) => {
console.log('file',file);
console.log('after
convertFileSrc',this._webview.convertFileSrc(file.nativeURL));
resolve(await this._webview.convertFileSrc(file.nativeURL));
})
.catch((e) => {
console.log('file error ',JSON.stringify(e));
reject(e);
});
});
})
.catch((e) => {
console.log('getPicture error ',JSON.stringify(e));
reject(e);
});
```
### Version information
```
Ionic:
Ionic CLI : 5.4.16
Ionic Framework : @ionic/angular 4.11.10
@angular-devkit/build-angular : 0.803.23
@angular-devkit/schematics : 8.3.23
@angular/cli : 8.3.23
@ionic/angular-toolkit : 2.1.2
Capacitor:
Capacitor CLI : 1.4.0
@capacitor/core : 2.4.1
Utility:
cordova-res : 0.15.3
native-run : 1.3.0
System:
NodeJS : v10.17.0
npm : 6.11.3
OS : macOS Big Sur
```
## follow below link
https://stackoverflow.com/questions/50207748/image-picker-viewcontroller-app-stuck-nsxpcconnection
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]