You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Nathan (JIRA)" <ji...@apache.org> on 2014/05/06 15:25:14 UTC

[jira] [Commented] (CB-6641) File-Transfer Timeout Error

    [ https://issues.apache.org/jira/browse/CB-6641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990632#comment-13990632 ] 

Nathan commented on CB-6641:
----------------------------

Think i've found where the problem is.
 
if i use...

ft.download(url, 
localPath, 
callDirect(),
function(error)
{ //Error here.. }
,
false)

i get the problem

if i use

ft.download(url, 
localPath, 
function()
{ //do something here.. },
function(error)
{ //Error here.. }
,
false)

it works fine. ideas?

> File-Transfer Timeout Error
> ---------------------------
>
>                 Key: CB-6641
>                 URL: https://issues.apache.org/jira/browse/CB-6641
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.4.0
>            Reporter: Nathan
>
> I recently upgraded to cordova 3.4.0 and have experienced a few problems with the file-transfer plugin. the most recent problem is stated below and i must stress this worked seamlessly with 2.9 using the same javascript code.
> My application downloads a number of files one after the other. This can be up to 2000 images in a sequence. after downloading some files i get an inconsistent timeout error from the plugin. I know it inconsistent because if i re-run the same same script the files it has problems with are different. I've checked the Webserver and all looks ok. Like i stated above this worked fine before. 
> function doDownload(path) {
>     
>     window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) {
>         fileSystem.root.getFile(path, {
>             create: true,
>             exclusive: false
>         }, function (fileEntry) {
>             var localPath = fileEntry.toURL();
>             var url = encodeURI(remoteFile);
>             
>             var ft = new FileTransfer();
>             ft.onprogress = function (progressEvent) {
>                 if (progressEvent.lengthComputable) {
>                     var perVal = parseInt((progressEvent.loaded / progressEvent.total) * 100);
>                     $("#progressbar").progressbar({ value: perVal });
>                     perVal = null;
>                 } else { }
>             };
>             ft.download(url, 
>                         localPath, 
>                          function(complete)
>                         {
>                             //Download next file loop;
>                         },
>                         function(error)
>                         {
>                             //Error here..
>                         },
>                         false);
>         }, fail);
>     }, fail);
> };
> Log dump:-
> 2014-05-06 13:44:45.434 Sense-it3.4.0[1716:1023b] File Transfer Finished with response code 200
> 2014-05-06 13:44:45.974 Sense-it3.4.0[1716:52007] File Transfer Finished with response code 200
> 2014-05-06 13:44:46.063 Sense-it3.4.0[1716:1023b] File Transfer Finished with response code 200
> 2014-05-06 13:44:46.333 Sense-it3.4.0[1716:1023b] File Transfer Finished with response code 200
> 2014-05-06 13:44:46.352 Sense-it3.4.0[1716:6e0f] File Transfer Finished with response code 200
> 2014-05-06 13:44:46.663 Sense-it3.4.0[1716:52007] FileTransferError {
>     body = "";
>     code = 3;
>     "http_status" = 0;
>     source = "http://xxx/Video131.PNG";
>     target = "file:///var/mobile/Applications/CAC2F5C4-A6CE-4C84-B181-80EB0EC05863/Library/files/1/3748/1/_pointImages/22/Video131.PNG";
> }
> 2014-05-06 13:44:46.664 Sense-it3.4.0[1716:52007] File Transfer Error: The request timed out.
> 2014-05-06 13:44:46.668 Sense-it3.4.0[1716:6e0f] FileTransferError {
>     body = "";
>     code = 3;
>     "http_status" = 0;
>     source = "http://xxx/Video128.PNG";
>     target = "file:///var/mobile/Applications/CAC2F5C4-A6CE-4C84-B181-80EB0EC05863/Library/files/1/3748/1/_pointImages/22/Video128.PNG";
> }
> 2014-05-06 13:44:46.687 Sense-it3.4.0[1716:6e0f] File Transfer Error: The request timed out.
> 2014-05-06 13:44:46.668 Sense-it3.4.0[1716:52007] FileTransferError {
>     body = "";
>     code = 3;
>     "http_status" = 0;
>     source = "http://xxx/Video126.PNG";
>     target = "file:///var/mobile/Applications/CAC2F5C4-A6CE-4C84-B181-80EB0EC05863/Library/files/1/3748/1/_pointImages/22/Video126.PNG";
> }
> 2014-05-06 13:44:46.693 Sense-it3.4.0[1716:52007] File Transfer Error: The request timed out.
> 2014-05-06 13:44:46.849 Sense-it3.4.0[1716:5f103] File Transfer Finished with response code 200
> 2014-05-06 13:44:47.052 Sense-it3.4.0[1716:6e0f] File Transfer Finished with response code 200
> 2014-05-06 13:44:47.372 Sense-it3.4.0[1716:6e0f] File Transfer Finished with response code 200



--
This message was sent by Atlassian JIRA
(v6.2#6252)