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

2015-12-02 Thread Mayank Kumar (JIRA)

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

Mayank Kumar commented on CB-2293:
--

I have passed trustAllHosts option true to file transfer plugin. All the 
alternate upload fails issue didn't occur again.

> 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=2_key=x=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] [Commented] (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 commented on CB-2293:
--

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): 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] [Commented] (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 commented on CB-2293:
-

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 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)
 

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

2014-08-18 Thread Ian Clelland (JIRA)

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

Ian Clelland commented on CB-2293:
--

I've moved your comment to a new issue (CB-7326). It's almost certainly a 
different issue on WP8; this was an Android native-side problem.

 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] [Commented] (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 commented on CB-2293:
--

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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2014-02-07 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

Cordova 3.4.0rc1 contains an updated version of OkHttp, which judging from it's 
changelog might address this issue.

If anyone would like to try it out:

{code}
npm install -g cordova@3.4.0-rc.1
cordova platform update android
{code}

 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 
 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] [Commented] (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 commented on CB-2293:
--

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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2014-02-01 Thread henco schoeman (JIRA)

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

henco schoeman commented on CB-2293:


Ok same problem here, is there perhaps another thread where this issue is 
discussed?

 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 
 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] [Commented] (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 commented on CB-2293:
---

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 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-10-09 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

There were some fixes to OkHttp that sound promising:

https://github.com/square/okhttp/commit/155a516b54ed60ec796cf5b9f2d8705012c5ceae

It's possible that if you update the version of OkHttp that the problem will be 
fixed.

You would do so by:
1. Check out cordova-android from 
https://git-wip-us.apache.org/repos/asf?p=cordova-android.git
2. Swap in a new version of OkHttp (under framework/src/com/squareup/okhttp)
3. Go into your projects/android directory
4. Run path/to/cordova-android/bin/update


If that doesn't work, then a work-around is to just retry a failed request. 

 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 
 

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

2013-10-08 Thread Surhid Amatya (JIRA)

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

Surhid Amatya commented on CB-2293:
---

Yes, this issue is still there when uploading multiple file. Is there any 
workaround? I tried keeping this in code too  options.headers = {
Connection: close
  }

But all in vain.

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-09-16 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

Looks like a newer version of OkHttp has a chance of fixing this.

Particularly this commit looks promising:
https://github.com/square/okhttp/commit/155a516b54ed60ec796cf5b9f2d8705012c5ceae

It's not included in a released version yet though.

 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 
 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: 

[jira] [Commented] (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 commented on CB-2293:
---

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.


 File Transfer of picture fails on every 

[jira] [Commented] (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 commented on CB-2293:
--

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:\/\/staginghc.heroku.com\/api\/photo_uploads\/create\/test?version=2api_key=WP01100056181source=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: E/FileTransfer(22007):  at 

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

2013-08-10 Thread Jason Milkins (JIRA)

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

Jason Milkins commented on CB-2293:
---

Hi Martin Thurau, I tried adding the `Connection: close` header, but the 
problem still persists (when testing on a Samsung Galaxy S3, every other fails, 
on Nexus7 Tablet, every upload fails.)

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-07-23 Thread Martin Thurau (JIRA)

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

Martin Thurau commented on CB-2293:
---

Just to provide some additional information since I just stumbled about this 
bug. I'm using an Samsung Galaxy Nexus with Stock 4.2.2 and Cordova 2.9. I had 
the exact same error as the original reporter (1st upload: success, 2nd: error, 
3rd: success, 4th: error and so on). 

I was successfully able to work around the problem by passing the `Connection: 
close` header with the upload. So until this issue can by solved correct I 
would recommend setting this header as a default. 

I'm not an Cordova developer but I would suspect that there is some connection 
reuse issue either in cordova or in the underlying HTTP library. I would assume 
that the HTTP connection is reused for further request and when the exception 
is triggered this connection is closed to assure a clean state. This would 
explain why the issue only happens on each second request.

 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 
 

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

2013-07-04 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

Thanks for this Jason. Likely this won't get looked at until after 3.0 (in a 
couple of weeks). I'm sure it'll get picked up soon after though.

 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 
 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] [Commented] (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 commented on CB-2293:
---

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 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: 
 

[jira] [Commented] (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=13696303#comment-13696303
 ] 

Jason Milkins commented on CB-2293:
---

Side note, just in case it wasn't clear, http://posttestserver.com/ has nothing 
to do with me or my clients.

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-06-29 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

Re-opened. 

Jason - can you spell out what device  OS you're seeing this on?

Can you also verify whether it's an EOFException you're seeing in your logs.

Would it also be possible to let us know what server you're uploading to that 
will reproduce this? 

To debug this, I'd need to be able to write an app with a giant button that 
performs a FileTransfer of a small file to your server. There definitely was a 
bug fixed in 2.8, so it could be that this issue has multiple things going on.

 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: 

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

2013-06-29 Thread Jason Milkins (JIRA)

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

Jason Milkins commented on CB-2293:
---

Certainly, this is an app running on Andrioid, (a Samsung Galaxy 3) the server 
is a Rails 3.2 server, with a PUT request (same happens when done as a POST 
btw.)

What I'll do is set up a standalone app that does an image capture and post / 
put to the server. Hopefully I can get this done within the next 24-36 hour or 
less.

I'll also setup a dedicated service to receive it, and provide the request 
details needed.

What I've done so far is try doing uploads via an existing Cordova app, and as 
a separate test curl, and a http request extension for Chrome called Postman, 
to check that uploading works outside the Cordova app.

These tests were repeated for 2.5(with a patch to allow PUT), and 2.8 both 
behave the same. All non Cordova tests pass, and the Cordova tests fail, as per 
the subject line, fault description of this ticket. No noticeable change with 
2.8.

Anyway, I'll get that test environment isolated and post here when it's ready.

Thanks for your help

 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 
 

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

2013-06-29 Thread Jason Milkins (JIRA)

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

Jason Milkins commented on CB-2293:
---

Quick additional note, (I'd already made a note of this originally.) the server 
never sees the failing posts

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-06-29 Thread Joe Bowser (JIRA)

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

Joe Bowser commented on CB-2293:


Can someone send me a demo project for this so we don't have to re-invent the 
wheel? We have a Samsung Galaxy S3 in the office that we can use to test this.  
That being said, I think this happens on any device based on what I see here.  

Also, is the device using WiFi or Mobile Data? I don't think I've ever seen 
that asked, but I might be wrong.  It may be that the latency on HSPA may suck 
and you can't immediately upload one file after another without a brief wait 
period or something, which wouldn't be present on an emulator unless you 
specifically set up the emulator to simulate mobile data.



 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: 

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

2013-06-29 Thread Ben Dalton (JIRA)

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

Ben Dalton commented on CB-2293:


I think I seem to be struggling with the same issue (on a Nexus 4, Android 4.2, 
Cordova 2.6.0). Multiple uploads to my server work as long as I disable any 
downloads in between, otherwise they fail some or all of the time. I managed to 
find a temporary work around by passing the 'Connection:close' header in my 
download requests. 

like this:
{code:JavaScript}
fileTransfer.download( source, target, successCallback, errorCallback , false 
,{ headers: { Connection:close } } );
{code}

 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-06-28 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

The fix was in-fact included in 2.8.0. Are you still seeing the error as well?

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-06-28 Thread Jason Milkins (JIRA)

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

Jason Milkins commented on CB-2293:
---

Please re-open, this isn't fixed.

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-06-28 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon commented on CB-2293:
--

I am actually starting a fresh app with 2.9 so I won't be able to test it quite 
yet.

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-06-10 Thread Aleksandras Kotovas (JIRA)

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

Aleksandras Kotovas commented on CB-2293:
-

Was this fix included in version 2.8.0?

 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 
 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] [Commented] (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 commented on CB-2293:
---

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 
 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): 

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

2013-04-29 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon commented on CB-2293:
--

Sweet thanks guys! Any idea when 2.8 will be released?

 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 
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-04-29 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

We're on roughly a 1 month release cycle. 2.7 is slated for end of the week, so 
2.8 should be first week of June.

 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 
 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] [Commented] (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 commented on CB-2293:
--

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)
 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: 

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

2013-04-04 Thread Ian Clelland (JIRA)

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

Ian Clelland commented on CB-2293:
--

OkHttp *does* solve this problem, but only for a more limited set of requests.

OkHttp can only automatically restart requests which have no body, or whose 
body is represented by a {{RetryableOutputStream}} (which internally buffers 
the entire body in a byte array)

The FileTransfer upload request doesn't generate a {{RetryableOutputStream}}, 
because we are using {{fixedLengthStreamingMode}}, specifically to avoid having 
to buffer the file in memory -- files could be arbitrarily large. But file 
streams can also be restarted trivially, so there is no technical reason to 
exclude them.

I think I will probably end up making {{RetryableOutputStream}} an abstract 
class or an interface, and providing a new file-backed retryable output stream 
that can be restarted if the connection is closed.

 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: 
 

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

2013-04-04 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon commented on CB-2293:
--

Thats awesome Ian! Do you think you could post an RC with the 
RetryableOutputStream when you get it working?

 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)
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-04-03 Thread Ian Clelland (JIRA)

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

Ian Clelland commented on CB-2293:
--

Okay, I've done some analysis on this, and this is what I'm seeing --

. The first request succeeds normally; the client requests that the connection 
remain open with Connection: Keep-Alive (explicit, but its the HTTP default 
anyway).
. Five seconds later, if there are no other requests, the server closes its end 
of the connection. That close isn't ACK'ed by the client, so it will still 
attempt to send data.
. The next request is sent on the same connection, and the server immediately 
sends RSTs to indicate that it will not accept it (as far as it is concerned, 
the connection should be closed)
. Rather than reopen the connection to retry the request, Android's HTTP Client 
rethrows the EOFException, and the second request simply fails. At this point, 
the client accepts that the connection is closed.
. A third request will open a new connection and succeed like the first.

Android's behaviour in this case is buggy; it shouldn't be up to the 
application code to explicitly retry the request.

(In fact, it looks like this was considered a bug 
(https://code.google.com/p/android/issues/detail?id=41576) and just fixed 
recently -- but that's not a solution for anyone with an existing device)

This particular issue is not (yet) fixed in OkHttp, but I'm going to look at 
patching it there.

(We could also just wrap the FileTransfer request in a block that retries it 
once on failure, but I'd rather not do that. There may be other reasons that a 
request failed, and it may not be appropriate to retry a PUT/POST request if 
the request may have been received and processed)

 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 
 

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

2013-03-25 Thread Jason Milkins (JIRA)

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

Jason Milkins commented on CB-2293:
---

+1 for 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: Andrew Grieve
 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: 
 {code:3,source:file:///storage/sdcard0/Android/data/com.hockeycommunity.hc_app/cache/resize.jpg?1358804880392,target:http://xxx.xxx./api/photo_uploads/create?version=2api_key=xxxsource=androidapp-2.2.1,http_status:null}
 01-21 

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

2013-03-25 Thread Jason Milkins (JIRA)

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

Jason Milkins commented on CB-2293:
---

@AndrewGrieve, I've found that the server isn't even registering the request 
when I get the client side error.

 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: Andrew Grieve
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-03-08 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon commented on CB-2293:
--

Just wondering if this has been fixed in any recent versions of cordova.

 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: Andrew Grieve
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-02-08 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

Okay, after a bit of a marathon of trying random things, I've figure out that 
the problem goes away if I do any of the following:
1. Don't read the server response (we can actually read all but the last byte 
of it without it breaking...)
2. Turn off keep-alive
3. Turn off request streaming (don't call setFixedLengthStreamingMode nor 
setChunkedStreamingMode)

WTF Android!

Not sure what the way forward here is yet... Add an option to disable 
keep-alive maybe? Switch to HttpClient? Add an option to not read the response 
(seems dumb).

 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: Andrew Grieve
 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: 

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

2013-02-07 Thread Andrew Grieve (JIRA)

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

Andrew Grieve commented on CB-2293:
---

Okay, got ahold of a GS3 4.1.1 and it also didn't repro.

I was using the mobilespec, which uploads to jitsu.com. 


In order to debug further, I'm going to need better repro steps. e.g. a sample 
app I can run on my GS3 that shows the problem.

 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: Andrew Grieve
 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] [Commented] (CB-2293) File Transfer of picture fails on every other picture

2013-02-07 Thread Amrit Kahlon (JIRA)

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

Amrit Kahlon commented on CB-2293:
--

Our investors policy would not allow me to share my code, I will build it using 
a jar.

 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: Andrew Grieve
 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: