cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amrit Kahlon (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-2293) File Transfer of picture fails on every other picture
Date Thu, 22 Aug 2013 21:49:51 GMT

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

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

I can confirm the problem still exists in Cordova 2.9


08-22 14:42:54.619: D/FileTransfer(22007): fileKey: photo
08-22 14:42:54.619: D/FileTransfer(22007): fileName: 1377207773325.jpg
08-22 14:42:54.619: D/FileTransfer(22007): mimeType: image/jpeg
08-22 14:42:54.619: D/FileTransfer(22007): params: {}
08-22 14:42:54.619: D/FileTransfer(22007): trustEveryone: false
08-22 14:42:54.619: D/FileTransfer(22007): chunkedMode: true
08-22 14:42:54.619: D/FileTransfer(22007): headers: null
08-22 14:42:54.619: D/FileTransfer(22007): objectId: 2
08-22 14:42:54.619: D/FileTransfer(22007): httpMethod: POST
08-22 14:42:54.639: D/dalvikvm(22007): GC_EXPLICIT freed 31262K, 95% free 4093K/70964K, paused
3ms+11ms, total 33ms
08-22 14:42:54.639: D/FileTransfer(22007): Content Length: 211809
08-22 14:42:54.649: W/CursorWrapperInner(22007): Cursor finalized without prior close()
08-22 14:42:54.779: W/FileTransfer(22007): Error getting HTTP status code from connection.
08-22 14:42:54.779: W/FileTransfer(22007): java.io.EOFException
08-22 14:42:54.779: W/FileTransfer(22007): 	at com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
08-22 14:42:54.779: W/FileTransfer(22007): 	at com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
08-22 14:42:54.779: W/FileTransfer(22007): 	at com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
08-22 14:42:54.779: W/FileTransfer(22007): 	at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
08-22 14:42:54.779: W/FileTransfer(22007): 	at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
08-22 14:42:54.779: W/FileTransfer(22007): 	at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
08-22 14:42:54.779: W/FileTransfer(22007): 	at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
08-22 14:42:54.779: W/FileTransfer(22007): 	at org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:594)
08-22 14:42:54.779: W/FileTransfer(22007): 	at org.apache.cordova.FileTransfer.access$700(FileTransfer.java:69)
08-22 14:42:54.779: W/FileTransfer(22007): 	at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:494)
08-22 14:42:54.779: W/FileTransfer(22007): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-22 14:42:54.779: W/FileTransfer(22007): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-22 14:42:54.779: W/FileTransfer(22007): 	at java.lang.Thread.run(Thread.java:856)
08-22 14:42:54.789: E/FileTransfer(22007): {"target":"http:\/\/xxxxxxxxxx\/api\/photo_uploads\/create\/test?version=2&api_key=xxxxxx&source=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 libcore.io.Posix.sendtoBytes(Native Method)
08-22 14:42:54.789: E/FileTransfer(22007): 	at libcore.io.Posix.sendto(Posix.java:151)
08-22 14:42:54.789: E/FileTransfer(22007): 	at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
08-22 14:42:54.789: E/FileTransfer(22007): 	at libcore.io.IoBridge.sendto(IoBridge.java:473)
08-22 14:42:54.789: E/FileTransfer(22007): 	... 10 more
08-22 14:42:54.789: E/FileTransfer(22007): Failed after uploading 65649 of 211809 bytes.

                
      was (Author: amritk):
    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=2&api_key=WP01100056181&source=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 libcore.io.Posix.sendtoBytes(Native Method)
08-22 14:42:54.789: E/FileTransfer(22007): 	at libcore.io.Posix.sendto(Posix.java:151)
08-22 14:42:54.789: E/FileTransfer(22007): 	at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
08-22 14:42:54.789: E/FileTransfer(22007): 	at libcore.io.IoBridge.sendto(IoBridge.java:473)
08-22 14:42:54.789: E/FileTransfer(22007): 	... 10 more
08-22 14:42:54.789: E/FileTransfer(22007): Failed after uploading 65649 of 211809 bytes.

                  
> 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=2&api_key=xxxxxxxxx&source=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.xxxx/api/photo_uploads/create?version=2&api_key=xxxxxxx&source=androidapp-2.2.1","http_status":null}
> 01-21 13:48:02.575: I/Web Console(8894): error: {"code":3,"source":"file:///storage/sdcard0/Android/data/com.hockeycommunity.hc_app/cache/resize.jpg?1358804880392","target":"http://xxx.xxx.xxx/api/photo_uploads/create?version=2&api_key=xxxxxxx&source=androidapp-2.2.1","http_status":null}
at file:///android_asset/www/interfaces/int.upload_picture.js:28
> Then the next picture will upload fine, and the next one will get the same error code.
Every other picture upload works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message