[jira] [Commented] (CB-6034) File transfer fails every other attempt on Android

2015-05-05 Thread Young Park (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14529902#comment-14529902
 ] 

Young Park commented on CB-6034:


Hi,
I'm using 
cordova-plugin-file 2.0.0 File
cordova-plugin-file-transfer 1.0.0 File Transfer
and seems with Cordova 5.0.0, this is happening again. It works fine with iOS; 
however not for Android. first attempt to download gives code 3.

 File transfer fails every other attempt on Android
 --

 Key: CB-6034
 URL: https://issues.apache.org/jira/browse/CB-6034
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File Transfer
Affects Versions: 3.3.0
 Environment: Tested on Android 4.4  4.1 with File Transfer plugin 
 v1.0.0
Reporter: Boston Dell-Vandenberg

 Uploading a file to a remote server using the file transfer plugin it fails 
 on every other attempt. The first attempt succeeds, second fails, third 
 succeeds and so on. It reliably fails on every other attempt.
 The file transfer works fine on Blackberry 10 and iOS builds using the same 
 code.
 Logcat output:
 {code}
 E/FileTransfer(22258): 
 {target:https:\/\/api.pamfax.biz\/FaxJob\/AddFile?filename=GetFile-12.pdfapioutputformat=API_FORMAT_JSONapicheck=f4aed3c821ffbf340d62040528c08db5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs,source:cdvfile:\/\/localhost\/persistent\/Download\/GetFile-12.pdf,http_status:0,code:3}
 E/FileTransfer(22258): java.io.EOFException
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:148)
 E/FileTransfer(22258):at 
 org.apache.cordova.filetransfer.FileTransfer$1.run(FileTransfer.java:441)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 E/FileTransfer(22258):at java.lang.Thread.run(Thread.java:841)
 E/FileTransfer(22258): Failed after uploading 256232 of 256232 bytes.
 {code}
 Here is the code I am using:
 {code}
 var uploadFile = function (fileUri, mimeType) {
 var options = new FileUploadOptions(),
   filename = fileUri.substr(fileUri.lastIndexOf('/') + 1).split('?')[0],
   url = Api.getUrl('FaxJob/AddFile', { filename: filename }),
   ft = new FileTransfer();
 options.fileKey = 'file';
 options.fileName = filename;
 options.params = { filename: filename };
 ft.upload(
   fileUri,
   encodeURI(url),
   function(entry) {
 $timeout(function () {
   $scope.$apply(function () {
 $log.debug('file uploaded: ', entry);
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $scope.getFiles();
   });
 });
   },
   function(error) {
 $timeout(function () {
   $scope.$apply(function () {
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $rootScope.message = { type: 'danger', content: 
 'ERR_FILE_WRONG_CHECKSUM' };
 $log.error('File transfer error code: ' + error.code);
 $log.error('File transfer error source: ' + error.source);
 $log.error('File transfer error target: ' + error.target);
   });
 });
   },
   options
 );
 {code}
 Javascript console error output:
 {code}
 File transfer error code: 3
 File transfer error source: 
 cdvfile://localhost/persistent/Download/GetFile-12.pdf
 File transfer error target: 
 https://api.pamfax.biz/FaxJob/AddFile?filename=GetFile-12.pdfapioutputform…b5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs
  
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

[jira] [Commented] (CB-6034) File transfer fails every other attempt on Android

2014-02-22 Thread Boston Dell-Vandenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13909499#comment-13909499
 ] 

Boston Dell-Vandenberg commented on CB-6034:


Just tested with 3.4.0 and issue looks to be resolve. Thanks!

 File transfer fails every other attempt on Android
 --

 Key: CB-6034
 URL: https://issues.apache.org/jira/browse/CB-6034
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File Transfer
Affects Versions: 3.3.0
 Environment: Tested on Android 4.4  4.1 with File Transfer plugin 
 v1.0.0
Reporter: Boston Dell-Vandenberg

 Uploading a file to a remote server using the file transfer plugin it fails 
 on every other attempt. The first attempt succeeds, second fails, third 
 succeeds and so on. It reliably fails on every other attempt.
 The file transfer works fine on Blackberry 10 and iOS builds using the same 
 code.
 Logcat output:
 {code}
 E/FileTransfer(22258): 
 {target:https:\/\/api.pamfax.biz\/FaxJob\/AddFile?filename=GetFile-12.pdfapioutputformat=API_FORMAT_JSONapicheck=f4aed3c821ffbf340d62040528c08db5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs,source:cdvfile:\/\/localhost\/persistent\/Download\/GetFile-12.pdf,http_status:0,code:3}
 E/FileTransfer(22258): java.io.EOFException
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:148)
 E/FileTransfer(22258):at 
 org.apache.cordova.filetransfer.FileTransfer$1.run(FileTransfer.java:441)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 E/FileTransfer(22258):at java.lang.Thread.run(Thread.java:841)
 E/FileTransfer(22258): Failed after uploading 256232 of 256232 bytes.
 {code}
 Here is the code I am using:
 {code}
 var uploadFile = function (fileUri, mimeType) {
 var options = new FileUploadOptions(),
   filename = fileUri.substr(fileUri.lastIndexOf('/') + 1).split('?')[0],
   url = Api.getUrl('FaxJob/AddFile', { filename: filename }),
   ft = new FileTransfer();
 options.fileKey = 'file';
 options.fileName = filename;
 options.params = { filename: filename };
 ft.upload(
   fileUri,
   encodeURI(url),
   function(entry) {
 $timeout(function () {
   $scope.$apply(function () {
 $log.debug('file uploaded: ', entry);
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $scope.getFiles();
   });
 });
   },
   function(error) {
 $timeout(function () {
   $scope.$apply(function () {
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $rootScope.message = { type: 'danger', content: 
 'ERR_FILE_WRONG_CHECKSUM' };
 $log.error('File transfer error code: ' + error.code);
 $log.error('File transfer error source: ' + error.source);
 $log.error('File transfer error target: ' + error.target);
   });
 });
   },
   options
 );
 {code}
 Javascript console error output:
 {code}
 File transfer error code: 3
 File transfer error source: 
 cdvfile://localhost/persistent/Download/GetFile-12.pdf
 File transfer error target: 
 https://api.pamfax.biz/FaxJob/AddFile?filename=GetFile-12.pdfapioutputform…b5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs
  
 {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CB-6034) File transfer fails every other attempt on Android

2014-02-14 Thread Andrew Grieve (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13901919#comment-13901919
 ] 

Andrew Grieve commented on CB-6034:
---

Wow, thanks for pointing that out. It did exist... maybe some npm DB issues? 
Steve re-published it under a different tag. If you can, try again using 
cordova@rc

 File transfer fails every other attempt on Android
 --

 Key: CB-6034
 URL: https://issues.apache.org/jira/browse/CB-6034
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File Transfer
Affects Versions: 3.3.0
 Environment: Tested on Android 4.4  4.1 with File Transfer plugin 
 v1.0.0
Reporter: Boston Dell-Vandenberg

 Uploading a file to a remote server using the file transfer plugin it fails 
 on every other attempt. The first attempt succeeds, second fails, third 
 succeeds and so on. It reliably fails on every other attempt.
 The file transfer works fine on Blackberry 10 and iOS builds using the same 
 code.
 Logcat output:
 {code}
 E/FileTransfer(22258): 
 {target:https:\/\/api.pamfax.biz\/FaxJob\/AddFile?filename=GetFile-12.pdfapioutputformat=API_FORMAT_JSONapicheck=f4aed3c821ffbf340d62040528c08db5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs,source:cdvfile:\/\/localhost\/persistent\/Download\/GetFile-12.pdf,http_status:0,code:3}
 E/FileTransfer(22258): java.io.EOFException
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:148)
 E/FileTransfer(22258):at 
 org.apache.cordova.filetransfer.FileTransfer$1.run(FileTransfer.java:441)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 E/FileTransfer(22258):at java.lang.Thread.run(Thread.java:841)
 E/FileTransfer(22258): Failed after uploading 256232 of 256232 bytes.
 {code}
 Here is the code I am using:
 {code}
 var uploadFile = function (fileUri, mimeType) {
 var options = new FileUploadOptions(),
   filename = fileUri.substr(fileUri.lastIndexOf('/') + 1).split('?')[0],
   url = Api.getUrl('FaxJob/AddFile', { filename: filename }),
   ft = new FileTransfer();
 options.fileKey = 'file';
 options.fileName = filename;
 options.params = { filename: filename };
 ft.upload(
   fileUri,
   encodeURI(url),
   function(entry) {
 $timeout(function () {
   $scope.$apply(function () {
 $log.debug('file uploaded: ', entry);
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $scope.getFiles();
   });
 });
   },
   function(error) {
 $timeout(function () {
   $scope.$apply(function () {
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $rootScope.message = { type: 'danger', content: 
 'ERR_FILE_WRONG_CHECKSUM' };
 $log.error('File transfer error code: ' + error.code);
 $log.error('File transfer error source: ' + error.source);
 $log.error('File transfer error target: ' + error.target);
   });
 });
   },
   options
 );
 {code}
 Javascript console error output:
 {code}
 File transfer error code: 3
 File transfer error source: 
 cdvfile://localhost/persistent/Download/GetFile-12.pdf
 File transfer error target: 
 https://api.pamfax.biz/FaxJob/AddFile?filename=GetFile-12.pdfapioutputform…b5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs
  
 {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)


[jira] [Commented] (CB-6034) File transfer fails every other attempt on Android

2014-02-13 Thread Boston Dell-Vandenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13900814#comment-13900814
 ] 

Boston Dell-Vandenberg commented on CB-6034:


Unfortunately I'm getting a version not found installing cordova@3.4.0-rc.1, 
does it exist on npm yet?

 File transfer fails every other attempt on Android
 --

 Key: CB-6034
 URL: https://issues.apache.org/jira/browse/CB-6034
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File Transfer
Affects Versions: 3.3.0
 Environment: Tested on Android 4.4  4.1 with File Transfer plugin 
 v1.0.0
Reporter: Boston Dell-Vandenberg

 Uploading a file to a remote server using the file transfer plugin it fails 
 on every other attempt. The first attempt succeeds, second fails, third 
 succeeds and so on. It reliably fails on every other attempt.
 The file transfer works fine on Blackberry 10 and iOS builds using the same 
 code.
 Logcat output:
 {code}
 E/FileTransfer(22258): 
 {target:https:\/\/api.pamfax.biz\/FaxJob\/AddFile?filename=GetFile-12.pdfapioutputformat=API_FORMAT_JSONapicheck=f4aed3c821ffbf340d62040528c08db5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs,source:cdvfile:\/\/localhost\/persistent\/Download\/GetFile-12.pdf,http_status:0,code:3}
 E/FileTransfer(22258): java.io.EOFException
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
 E/FileTransfer(22258):at 
 com.squareup.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:148)
 E/FileTransfer(22258):at 
 org.apache.cordova.filetransfer.FileTransfer$1.run(FileTransfer.java:441)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 E/FileTransfer(22258):at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
 E/FileTransfer(22258):at java.lang.Thread.run(Thread.java:841)
 E/FileTransfer(22258): Failed after uploading 256232 of 256232 bytes.
 {code}
 Here is the code I am using:
 {code}
 var uploadFile = function (fileUri, mimeType) {
 var options = new FileUploadOptions(),
   filename = fileUri.substr(fileUri.lastIndexOf('/') + 1).split('?')[0],
   url = Api.getUrl('FaxJob/AddFile', { filename: filename }),
   ft = new FileTransfer();
 options.fileKey = 'file';
 options.fileName = filename;
 options.params = { filename: filename };
 ft.upload(
   fileUri,
   encodeURI(url),
   function(entry) {
 $timeout(function () {
   $scope.$apply(function () {
 $log.debug('file uploaded: ', entry);
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $scope.getFiles();
   });
 });
   },
   function(error) {
 $timeout(function () {
   $scope.$apply(function () {
 Loading.hide();
 $scope.fax.uploadingFiles = false;
 $rootScope.message = { type: 'danger', content: 
 'ERR_FILE_WRONG_CHECKSUM' };
 $log.error('File transfer error code: ' + error.code);
 $log.error('File transfer error source: ' + error.source);
 $log.error('File transfer error target: ' + error.target);
   });
 });
   },
   options
 );
 {code}
 Javascript console error output:
 {code}
 File transfer error code: 3
 File transfer error source: 
 cdvfile://localhost/persistent/Download/GetFile-12.pdf
 File transfer error target: 
 https://api.pamfax.biz/FaxJob/AddFile?filename=GetFile-12.pdfapioutputform…b5apikey=BostonDell-Vandenbergusertoken=bd6paoben9j079lv8feebkctf1uhalvs
  
 {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)