[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2014-10-10 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon edited comment on CB-2293 at 10/11/14 12:31 AM:
-

Hey guys, just wanted to point out that this is once again an issue on Cordova 
3.6

Added the connection close headers, and false to the upload method parameters 
as well as chunked mode = false. 

Now it works again


was (Author: amritk):
Hey guys, just wanted to point out that this is once again an issue on Cordova 
3.6

 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin File Transfer
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Fix For: 3.4.0

 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.io.DataOutputStream.write(DataOutputStream.java:98)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:372)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): Caused by: 
 libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendtoBytes(Native Method)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendto(Posix.java:146)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
 01-21 13:48:02.555: E/FileTransfer(8894): 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2014-08-18 Thread Amruthesh C (JIRA)

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

Amruthesh C edited comment on CB-2293 at 8/18/14 9:16 AM:
--

I'm facing a similar issue. The image upload fails in Windows Phone 8 (Nokia 
Lumia 720). 

I'm using the latest stable version of the plugin r0.4.5 from below.

https://github.com/apache/cordova-plugin-file-transfer/blob/master/doc/index.md

The example mentioned as part of the plugin document from the above link is not 
working in Windows Phone 8.

The issue is with sending params object as part of the request options. The 
upload works when params object is removed from the request.

There is a work around for this as we can send the required params as part of 
the server URL itself.

Example: https://someserver?param1=param1param2=param2;

Sending params like above works. But of course your server side code should be 
able to extract it if required.

But there are many servers which discard any extra param being sent to it as 
part of the URl and would not consider it.

Anybody facing a similar issue and have found any alternate solution to this?



was (Author: amruthesh c):
I'm facing a similar issue. The image upload fails in Windows Phone 8 (Nokia 
Lumia 720). 

I'm using the latest stable version of the plugin r0.4.5 from below.

[https://github.com/apache/cordova-plugin-file-transfer/blob/master/doc/index.md][1]

The example mentioned as part of the plugin document from the above link is not 
working in Windows Phone 8.

The issue is with sending params object as part of the request options. The 
upload works when params object is removed from the request.

There is a work around for this as we can send the required params as part of 
the server URL itself.

Example: `https://someserver?param1=param1param2=param2`

Sending params like above works. But of course your server side code should be 
able to extract it if required.

But there are many servers which discard any extra param being sent to it as 
part of the URl and would not consider it.

Anybody facing a similar issue and have found any alternate solution to this?


  [1]: 
https://github.com/apache/cordova-plugin-file-transfer/blob/master/doc/index.md

 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin File Transfer
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Fix For: 3.4.0

 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2014-03-03 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon edited comment on CB-2293 at 3/3/14 10:16 PM:
---

Confirmed it works!

Thanks guys


was (Author: amritk):
Confirmed it works!

 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin File Transfer
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Fix For: 3.4.0

 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.io.DataOutputStream.write(DataOutputStream.java:98)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:372)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): Caused by: 
 libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendtoBytes(Native Method)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendto(Posix.java:146)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:473)
 01-21 13:48:02.555: E/FileTransfer(8894): ... 9 more
 01-21 13:48:02.575: D/CordovaLog(8894): error: 
 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2014-02-05 Thread Sergio Gimeno (JIRA)

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

Sergio Gimeno edited comment on CB-2293 at 2/5/14 3:39 PM:
---

I'm using Cordova 3.3.1 on Android 4.2.2
Googling a bit I found this 
http://grandiz.com/phonegap-development/phonegap-file-transfer-error-code-3-solved/

I was able to upload multiple pictures by sending the header Connection: 
'close' on the ft.upload. 



was (Author: sgimeno):
I'm using Cordova 3.3.1 on Android 4.2.2
Googling a bit I was able to upload multiple pictures by sending the header 
Connection: 'close' on the ft.upload. 
http://grandiz.com/phonegap-development/phonegap-file-transfer-error-code-3-solved/

 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin File Transfer
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.io.DataOutputStream.write(DataOutputStream.java:98)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:372)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): Caused by: 
 libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendtoBytes(Native Method)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2014-02-05 Thread Ian Clelland (JIRA)

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

Ian Clelland edited comment on CB-2293 at 2/5/14 4:43 PM:
--

Should {{Connection: close}} be set on every upload?

There is obviously some efficiency gained by maintaining open connections, but 
I think we can sacrifice that if we gain the ability to reliably upload 
multiple files.

I'm a little worried by David Kaneda's comment above, saying that {{Connection: 
close}} wasn't sufficient, but perhaps he was using it in such a way that the 
header didn't make it out to the actual request on the wire.

I'll add the header for all uploads in the dev version, and we can see if that 
improves the situation for those people still seeing this issue.


was (Author: iclelland):
Should {{Connection: close}} be set on every upload?

There is obviously some efficiency gained by maintaining open connections, but 
I think we can sacrifice that if we gain the ability to reliably upload 
multiple files.

I'm a little worried by David Kaneda's comment above, saying that {{Connection: 
close}} wasn't sufficient, but perhaps we was using it in such a way that the 
header didn't make it out to the actual request on the wire.

I'll add the header for all uploads in the dev version, and we can see if that 
improves the situation for those people still seeing this issue.

 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin File Transfer
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.io.DataOutputStream.write(DataOutputStream.java:98)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2013-12-24 Thread Guillaume Charhon (JIRA)

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

Guillaume Charhon edited comment on CB-2293 at 12/24/13 10:58 AM:
--

I have the same issue on my Android phone (4.2.2) with Phonegap 3.3.

12-24 11:51:44.160: E/FileTransfer(28597):  at 
com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
12-24 11:51:44.160: E/FileTransfer(28597):  at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
12-24 11:51:44.160: E/FileTransfer(28597):  at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
12-24 11:51:44.160: E/FileTransfer(28597):  at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
12-24 11:51:44.160: E/FileTransfer(28597):  at 
org.apache.cordova.filetransfer.FileTransfer$3.run(FileTransfer.java:444)
12-24 11:51:44.160: E/FileTransfer(28597):  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-24 11:51:44.160: E/FileTransfer(28597):  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-24 11:51:44.160: E/FileTransfer(28597):  at 
java.lang.Thread.run(Thread.java:856)



was (Author: poiuytrez):
I have the same issue on my Android phone (4.2.2) with Phonegap 3.3.

 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin File Transfer
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Fix For: 2.8.0

 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.io.DataOutputStream.write(DataOutputStream.java:98)
 01-21 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2013-08-29 Thread John Croucher (JIRA)

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

John Croucher edited comment on CB-2293 at 8/29/13 7:05 AM:


I can confirm it is still an issue in version 3.0.0.

It occurs for me intermittently, on a HTC phone, and any virtual devices.

I have tried the suggested fixes. 

- Add System.setProperty(http.keepAlive, false);
- Remove conn.setRequestProperty(Connection, Keep-Alive); from 
FileTransfer.java. It already does not exist.

I can also confirm that when the error occurs it is *not* hitting the server at 
all, even though it says Sent 15007 of 15007.


08-29 15:06:55.172: D/FileTransfer(531): upload 
content://media/external/images/media/14 to 
http://exampledomain.com?page=do_upload
08-29 15:06:55.172: D/FileTransfer(531): fileKey: image
08-29 15:06:55.172: D/FileTransfer(531): fileName: 14
08-29 15:06:55.172: D/FileTransfer(531): mimeType: image/jpeg
08-29 15:06:55.172: D/FileTransfer(531): params: {}
08-29 15:06:55.172: D/FileTransfer(531): trustEveryone: true
08-29 15:06:55.172: D/FileTransfer(531): chunkedMode: false
08-29 15:06:55.172: D/FileTransfer(531): headers: null
08-29 15:06:55.172: D/FileTransfer(531): objectId: 1
08-29 15:06:55.172: D/FileTransfer(531): httpMethod: POST
08-29 15:06:55.192: D/FileTransfer(531): Content Length: 15007
08-29 15:06:55.202: D/FileTransfer(531): Sent 15007 of 15007
08-29 15:06:55.202: W/PluginManager(531): THREAD WARNING: exec() call to 
FileTransfer.upload blocked the main thread for 54ms. Plugin should use 
CordovaInterface.getThreadPool().
08-29 15:06:55.212: W/FileTransfer(531): Error getting HTTP status code from 
connection.
08-29 15:06:55.212: W/FileTransfer(531): java.io.EOFException
08-29 15:06:55.212: W/FileTransfer(531):at 
com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
08-29 15:06:55.212: W/FileTransfer(531):at 
com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
08-29 15:06:55.212: W/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
08-29 15:06:55.212: W/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
08-29 15:06:55.212: W/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
08-29 15:06:55.212: W/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
08-29 15:06:55.212: W/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
08-29 15:06:55.212: W/FileTransfer(531):at 
org.apache.cordova.filetransfer.FileTransfer$3.run(FileTransfer.java:444)
08-29 15:06:55.212: W/FileTransfer(531):at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
08-29 15:06:55.212: W/FileTransfer(531):at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
08-29 15:06:55.212: W/FileTransfer(531):at 
java.lang.Thread.run(Thread.java:856)
08-29 15:06:55.223: E/FileTransfer(531): 
{target:http:\/\/exampledomain.com\/?page=do_upload,source:content:\/\/media\/external\/images\/media\/14,http_status:0,code:3}
08-29 15:06:55.223: E/FileTransfer(531): java.io.EOFException
08-29 15:06:55.223: E/FileTransfer(531):at 
com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
08-29 15:06:55.223: E/FileTransfer(531):at 
com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
08-29 15:06:55.223: E/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
08-29 15:06:55.223: E/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
08-29 15:06:55.223: E/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
08-29 15:06:55.223: E/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
08-29 15:06:55.223: E/FileTransfer(531):at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
08-29 15:06:55.223: E/FileTransfer(531):at 
org.apache.cordova.filetransfer.FileTransfer$3.run(FileTransfer.java:444)
08-29 15:06:55.223: E/FileTransfer(531):at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
08-29 15:06:55.223: E/FileTransfer(531):at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
08-29 15:06:55.223: E/FileTransfer(531):at 
java.lang.Thread.run(Thread.java:856)
08-29 15:06:55.223: E/FileTransfer(531): Failed after uploading 15007 of 15007 
bytes.



[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2013-08-22 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon edited comment on CB-2293 at 8/22/13 9:49 PM:
---

I can confirm the problem still exists in Cordova 2.9


08-22 14:42:54.619: D/FileTransfer(22007): fileKey: photo
08-22 14:42:54.619: D/FileTransfer(22007): fileName: 1377207773325.jpg
08-22 14:42:54.619: D/FileTransfer(22007): mimeType: image/jpeg
08-22 14:42:54.619: D/FileTransfer(22007): params: {}
08-22 14:42:54.619: D/FileTransfer(22007): trustEveryone: false
08-22 14:42:54.619: D/FileTransfer(22007): chunkedMode: true
08-22 14:42:54.619: D/FileTransfer(22007): headers: null
08-22 14:42:54.619: D/FileTransfer(22007): objectId: 2
08-22 14:42:54.619: D/FileTransfer(22007): httpMethod: POST
08-22 14:42:54.639: D/dalvikvm(22007): GC_EXPLICIT freed 31262K, 95% free 
4093K/70964K, paused 3ms+11ms, total 33ms
08-22 14:42:54.639: D/FileTransfer(22007): Content Length: 211809
08-22 14:42:54.649: W/CursorWrapperInner(22007): Cursor finalized without prior 
close()
08-22 14:42:54.779: W/FileTransfer(22007): Error getting HTTP status code from 
connection.
08-22 14:42:54.779: W/FileTransfer(22007): java.io.EOFException
08-22 14:42:54.779: W/FileTransfer(22007):  at 
com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:594)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
org.apache.cordova.FileTransfer.access$700(FileTransfer.java:69)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
org.apache.cordova.FileTransfer$1.run(FileTransfer.java:494)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-22 14:42:54.779: W/FileTransfer(22007):  at 
java.lang.Thread.run(Thread.java:856)
08-22 14:42:54.789: E/FileTransfer(22007): 
{target:http:\/\/xx\/api\/photo_uploads\/create\/test?version=2api_key=xxsource=androidapp-2.40,source:file:\/\/\/storage\/emulated\/0\/Android\/data\/com.hockeycommunity.hc_staging\/cache\/1377207773325.jpg,http_status:0,code:3}
08-22 14:42:54.789: E/FileTransfer(22007): java.net.SocketException: sendto 
failed: EPIPE (Broken pipe)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
libcore.io.IoBridge.sendto(IoBridge.java:475)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
java.net.PlainSocketImpl.write(PlainSocketImpl.java:507)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
java.io.BufferedOutputStream.write(BufferedOutputStream.java:131)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
com.squareup.okhttp.internal.http.HttpTransport$FixedLengthOutputStream.write(HttpTransport.java:228)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
com.squareup.okhttp.internal.FaultRecoveringOutputStream.write(FaultRecoveringOutputStream.java:60)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
org.apache.cordova.FileTransfer$1.run(FileTransfer.java:425)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-22 14:42:54.789: E/FileTransfer(22007):  at 
java.lang.Thread.run(Thread.java:856)
08-22 14:42:54.789: E/FileTransfer(22007): Caused by: 
libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
08-22 14:42:54.789: 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2013-06-30 Thread Jason Milkins (JIRA)

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

Jason Milkins edited comment on CB-2293 at 6/30/13 8:40 AM:


Ok, as promised, there's a demo project (using 2.8.0) for Android, which has 
been tested on the Samsung Galaxy S3, which exhibits this error, I've set the 
default upload URL to use http://posttestserver.com so that we can avoid 
concerns about the quality of the server, this is a demo server, which is 
used many times every day. (it's written in PHP FYI)

It will respond with the location of a post log, which will include a url for 
the uploaded photo

The app expects you to take a photo before uploading.

You are able to edit:

* Service/Host url

* Parameter/key name

* HTTP method (POST or PUT)

I've also tested this on a Nexus 7 tablet, and notice that we get the same 
error for EVERY upload attempt, so there are clearly device specific issues at 
play. (same code 3 error)



  was (Author: jasonm23):
Ok, as promised, there's a demo project (using 2.8.0) for Android, which 
has been tested on the Samsung Galaxy S3, which exhibits this error, I've set 
the default upload URL to use http://posttestserver.com so that we can avoid 
concerns about the quality of the server, this is a demo server, which is 
used many times every day. (it's written in PHP FYI)

It will respond with the location of a post log, which will include a url for 
the uploaded photo

The app expects you to take a photo before uploading.

You are able to edit:

* Service/Host url

* Parameter/key name

* HTTP method (POST or PUT)

I've also tested this on a Nexus 7 tablet, and notice that we get the same 
error for EVERY upload attempt, so there are clearly device specific issues at 
play.


  
 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Fix For: 2.8.0

 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2013-06-10 Thread Jason Milkins (JIRA)

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

Jason Milkins edited comment on CB-2293 at 6/11/13 3:31 AM:


I've tested my existing issue against 2.8.0 and I still get every other upload 
failing.

I look forward to some additional feedback on this.

  was (Author: jasonm23):
I've tested my existing issue against 2.8.0 and I still get every other 
upload failing, I haven't yet looked into this deeply enough to see if there's 
any difference in 2.8.0.

I look forward to some additional feedback on this.
  
 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Fix For: 2.8.0

 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.io.DataOutputStream.write(DataOutputStream.java:98)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:372)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): Caused by: 
 libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendtoBytes(Native Method)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendto(Posix.java:146)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 

[jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture

2013-04-05 Thread Ian Clelland (JIRA)

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

Ian Clelland edited comment on CB-2293 at 4/5/13 4:07 PM:
--

I'll definitely push my branch so that you can try it yourself, as soon as I 
have it working.

FYI, I got Jesse Wilson to open an issue on OkHttp for this as well: 
https://github.com/square/okhttp/issues/137

I'll be tracking any progress that I make on the HTTP side there.

  was (Author: iclelland):
I'll definitely pust my branch so that you can try it yourself, as soon as 
I have it working.

FYI, I got Jesse Wilson to open an issue on OkHttp for this as well: 
https://github.com/square/okhttp/issues/137

I'll be tracking any progress that I make on the HTTP side there.
  
 File Transfer of picture fails on every other picture
 -

 Key: CB-2293
 URL: https://issues.apache.org/jira/browse/CB-2293
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 2.2.0, 2.3.0
 Environment: Tested on a Motorola Atrix HD(Android 4.1.2) as well as 
 a Samsung Galaxy S3(Android 4.1.1)
Reporter: Amrit Kahlon
Assignee: Ian Clelland
 Attachments: cordova-2.4.0rc1.jar


 When uploading pictures using the File Transfer function on android, the 
 first picture will upload fine. Then the second upload will give the 
 following error:
 01-21 13:48:02.545: W/FileTransfer(8894): Error getting HTTP status code from 
 connection.
 01-21 13:48:02.545: W/FileTransfer(8894): java.io.EOFException
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.io.Streams.readAsciiLine(Streams.java:203)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:535)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer.access$500(FileTransfer.java:62)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:437)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.545: W/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): 
 {target:http:\/\/xxx.xxx.xxx\/api\/photo_uploads\/create?version=2api_key=xsource=androidapp-2.2.1,source:file:\/\/\/storage\/sdcard0\/Android\/data\/com.hockeycommunity.hc_app\/cache\/resize.jpg?1358804880392,code:3}
 01-21 13:48:02.555: E/FileTransfer(8894): java.net.SocketException: sendto 
 failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.IoBridge.sendto(IoBridge.java:475)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.io.DataOutputStream.write(DataOutputStream.java:98)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 org.apache.cordova.FileTransfer$1.run(FileTransfer.java:372)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 java.lang.Thread.run(Thread.java:856)
 01-21 13:48:02.555: E/FileTransfer(8894): Caused by: 
 libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
 01-21 13:48:02.555: E/FileTransfer(8894): at 
 libcore.io.Posix.sendtoBytes(Native Method)