Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
None
-
None
-
iOS 9.2
Cordova 5.4.1
Cordova iOS platform 4.0.1
cordova-plugin-file-transfer 1.5.1-dev
Description
I am using cordova-plugin-file-transfer plugin in a cordova app to download a static file from a remote server. It works fine in normal cases. But when the server is down, the app crashes. I found the following logs if I debug it in Xcode:
2016-01-20 21:32:26.972 Kuai[2031:908675] -[CDVFileTransfer download:] [Line 417] File Transfer downloading file... 2016-01-20 21:32:26.978 Kuai[2031:908736] FileTransferError { body = ""; code = 3; "http_status" = 0; source = "file:///var/mobile/Containers/Data/Application/AADA2EB9-2DCA-44DD-A588-BD7E7B1B5B81/Documents/www/index.html"; target = "file:///var/mobile/Containers/Data/Application/AADA2EB9-2DCA-44DD-A588-BD7E7B1B5B81/Documents/www/index.html"; } 2016-01-20 21:32:26.978 Kuai[2031:908736] File Transfer Error: The requested URL was not found on this server. 2016-01-20 21:32:27.033 Kuai[2031:908675] THREAD WARNING: ['Notification'] took '17.649902' ms. Plugin should use a background thread. 2016-01-20 21:32:27.038 Kuai[2031:908675] -[__NSDictionaryI length]: unrecognized selector sent to instance 0x1402ebdb0 2016-01-20 21:32:27.039 Kuai[2031:908675] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI length]: unrecognized selector sent to instance 0x1402ebdb0'
The error callback is not invoked.