[
https://issues.apache.org/jira/browse/CB-10393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15429399#comment-15429399
]
Sergey Shakhnazarov commented on CB-10393:
------------------------------------------
[~fakrurazie], could you describe the Windows Phone 8.1 apps issues you are
facing?
The following code does not crash for me on cordova-windows (WP 8.1, Win 8.1):
{code}
var fileTransfer = new FileTransfer();
var uri = encodeURI("http://google.com/test.txt");
var fileURL = "cdvfile://localhost/persistent/test.txt";
fileTransfer.download(
uri,
fileURL,
function(entry) {
console.log("download complete: " + entry.toURL());
navigator.notification.alert("download complete");
},
function(error) {
console.log("download error source " + error.source);
console.log("download error target " + error.target);
console.log("download error code" + error.code);
navigator.notification.alert(JSON.stringify(error));
}
);
{code}
> Crashes when the URL to download is not found on the server
> -----------------------------------------------------------
>
> Key: CB-10393
> URL: https://issues.apache.org/jira/browse/CB-10393
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File Transfer
> Environment: iOS 9.2
> Cordova 5.4.1
> Cordova iOS platform 4.0.1
> cordova-plugin-file-transfer 1.5.1-dev
> Reporter: Ying Bian
> Labels: iOS, triaged
>
> 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:
> {noformat}
> 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'
> {noformat}
> The error callback is not invoked.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]