You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Marco Borsoi (JIRA)" <ji...@apache.org> on 2013/09/11 22:52:51 UTC

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

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

Marco Borsoi commented on CB-2293:
----------------------------------

Hello. Just want to know if someone is working on this.

Here there are three differents tries using a Galaxy S3 Android 4.1.1

1. FAILS
09-11 10:39:21.844: W/FileTransfer(4301): Error getting HTTP status code from connection.
09-11 10:39:21.844: W/FileTransfer(4301): java.io.EOFException
09-11 10:39:21.844: W/FileTransfer(4301): 	at libcore.io.Streams.readAsciiLine(Streams.java:203)
09-11 10:39:21.844: W/FileTransfer(4301): 	at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
09-11 10:39:21.844: W/FileTransfer(4301): 	at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
09-11 10:39:21.844: W/FileTransfer(4301): 	at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
09-11 10:39:21.844: W/FileTransfer(4301): 	at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
09-11 10:39:21.844: W/FileTransfer(4301): 	at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:484)
09-11 10:39:21.844: W/FileTransfer(4301): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
09-11 10:39:21.844: W/FileTransfer(4301): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
09-11 10:39:21.844: W/FileTransfer(4301): 	at java.lang.Thread.run(Thread.java:856)
09-11 10:39:21.884: E/FileTransfer(4301): {"target":"http:\/\/myserver:8080\/mobile_test\/ajaxdispatch","source":"file:\/\/\/storage\/sdcard0\/MYAPP_MEDIAS\/1378910330664.jpg","http_status":0,"code":3}
09-11 10:39:21.884: E/FileTransfer(4301): java.io.EOFException
09-11 10:39:21.884: E/FileTransfer(4301): 	at libcore.io.Streams.readAsciiLine(Streams.java:203)
09-11 10:39:21.884: E/FileTransfer(4301): 	at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
09-11 10:39:21.884: E/FileTransfer(4301): 	at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
09-11 10:39:21.884: E/FileTransfer(4301): 	at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
09-11 10:39:21.884: E/FileTransfer(4301): 	at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
09-11 10:39:21.884: E/FileTransfer(4301): 	at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:484)
09-11 10:39:21.884: E/FileTransfer(4301): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
09-11 10:39:21.884: E/FileTransfer(4301): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
09-11 10:39:21.884: E/FileTransfer(4301): 	at java.lang.Thread.run(Thread.java:856)
09-11 10:39:21.884: E/FileTransfer(4301): Failed after uploading 12137 of 12137 bytes.

2. SUCCESS
09-11 15:12:06.267: D/FileTransfer(15419): upload file:///storage/sdcard0/MYAPP_MEDIAS/1378926708422.jpg to http://myserver:8080/test/ajaxdispatch
09-11 15:12:06.267: D/FileTransfer(15419): fileKey: file
09-11 15:12:06.267: D/FileTransfer(15419): fileName: 1378926708422.jpg
09-11 15:12:06.267: D/FileTransfer(15419): mimeType: image/jpeg
09-11 15:12:06.277: D/FileTransfer(15419): params: {}
09-11 15:12:06.277: D/FileTransfer(15419): trustEveryone: true
09-11 15:12:06.277: D/FileTransfer(15419): chunkedMode: true
09-11 15:12:06.277: D/FileTransfer(15419): headers: null
09-11 15:12:06.277: D/FileTransfer(15419): objectId: 3
09-11 15:12:06.277: D/FileTransfer(15419): httpMethod: POST
09-11 15:12:06.327: D/FileTransfer(15419): Content Length: 2024908
09-11 15:12:06.457: D/FileTransfer(15419): Uploaded 115287 of 2024908 bytes
09-11 15:12:06.567: D/FileTransfer(15419): Uploaded 229975 of 2024908 bytes
09-11 15:12:06.648: D/FileTransfer(15419): Uploaded 344663 of 2024908 bytes
09-11 15:12:06.738: D/FileTransfer(15419): Uploaded 459351 of 2024908 bytes
09-11 15:12:06.878: D/FileTransfer(15419): Uploaded 574039 of 2024908 bytes
09-11 15:12:06.968: D/FileTransfer(15419): Uploaded 688727 of 2024908 bytes
09-11 15:12:07.078: D/FileTransfer(15419): Uploaded 803415 of 2024908 bytes
09-11 15:12:07.218: D/FileTransfer(15419): Uploaded 918103 of 2024908 bytes
09-11 15:12:07.378: D/FileTransfer(15419): Uploaded 1032791 of 2024908 bytes
09-11 15:12:07.508: D/FileTransfer(15419): Uploaded 1147479 of 2024908 bytes
09-11 15:12:07.629: D/FileTransfer(15419): Uploaded 1262167 of 2024908 bytes
09-11 15:12:07.739: D/FileTransfer(15419): Uploaded 1376855 of 2024908 bytes
09-11 15:12:07.869: D/FileTransfer(15419): Uploaded 1491543 of 2024908 bytes
09-11 15:12:08.029: D/FileTransfer(15419): Uploaded 1606231 of 2024908 bytes
09-11 15:12:08.249: D/FileTransfer(15419): Uploaded 1720919 of 2024908 bytes
09-11 15:12:08.399: D/FileTransfer(15419): Uploaded 1835607 of 2024908 bytes
09-11 15:12:08.479: D/FileTransfer(15419): Uploaded 1950295 of 2024908 bytes
09-11 15:12:08.550: D/FileTransfer(15419): Sent 2024908 of 2024908
09-11 15:12:08.800: D/FileTransfer(15419): response code: 200
09-11 15:12:08.810: D/FileTransfer(15419): response headers: {null=[HTTP/1.1 200 OK], Content-Length=[0], Content-Type=[text/html;charset=utf-8], Date=[Wed, 11 Sep 2013 19:12:09 GMT], Server=[Apache-Coyote/1.1], X-Android-Received-Millis=[1378926728807], X-Android-Sent-Millis=[1378926726381]}
09-11 15:12:08.810: D/FileTransfer(15419): got response from server

3. FAILS
09-11 15:16:51.427: W/CursorWrapperInner(15904): Cursor finalized without prior close()
09-11 15:16:51.427: W/CursorWrapperInner(15904): Cursor finalized without prior close()
09-11 15:16:51.437: D/webcore(15904):  CORE loadUrl: called
09-11 15:16:51.437: D/webkit(15904): Firewall not null
09-11 15:16:51.437: D/webkit(15904): euler: isUrlBlocked = false
09-11 15:16:51.517: D/WebKit(15904): ERROR: 
09-11 15:16:51.517: D/WebKit(15904): WebKit does not yet implement getComputedStyle for 'border-radius'.
09-11 15:16:51.517: D/WebKit(15904): external/webkit/Source/WebCore/css/CSSComputedStyleDeclaration.cpp(935) : void WebCore::logUnimplementedPropertyID(int)
09-11 15:16:56.793: D/webview(15904): blockWebkitViewMessage= false
09-11 15:17:04.571: D/FileTransfer(15904): upload file:///storage/sdcard0/JMAP_MEDIAS/1378927011187.jpg to http://192.168.0.230:8080/test/ajaxdispatch
09-11 15:17:04.571: D/FileTransfer(15904): fileKey: file
09-11 15:17:04.571: D/FileTransfer(15904): fileName: 1378927011187.jpg
09-11 15:17:04.571: D/FileTransfer(15904): mimeType: image/jpeg
09-11 15:17:04.571: D/FileTransfer(15904): params: {"MED_TYPE":"IMAGE","action":"savedocument","LAYER_ID":7,"ELEMENT_ID":1378927016829,"MED_ID":26,"FILE_TYPE":"jpg","MED_TIMESTAMP":1378927011187}
09-11 15:17:04.571: D/FileTransfer(15904): trustEveryone: true
09-11 15:17:04.571: D/FileTransfer(15904): chunkedMode: true
09-11 15:17:04.581: D/FileTransfer(15904): headers: null
09-11 15:17:04.581: D/FileTransfer(15904): objectId: 2
09-11 15:17:04.581: D/FileTransfer(15904): httpMethod: POST
09-11 15:17:04.641: D/FileTransfer(15904): Content Length: 2213229
09-11 15:17:04.781: D/FileTransfer(15904): Uploaded 115287 of 2213229 bytes
09-11 15:17:04.902: W/FileTransfer(15904): Error getting HTTP status code from connection.
09-11 15:17:04.902: W/FileTransfer(15904): java.io.EOFException
09-11 15:17:04.902: W/FileTransfer(15904): 	at libcore.io.Streams.readAsciiLine(Streams.java:203)
09-11 15:17:04.902: W/FileTransfer(15904): 	at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
09-11 15:17:04.902: W/FileTransfer(15904): 	at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
09-11 15:17:04.902: W/FileTransfer(15904): 	at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
09-11 15:17:04.902: W/FileTransfer(15904): 	at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
09-11 15:17:04.902: W/FileTransfer(15904): 	at org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:626)
09-11 15:17:04.902: W/FileTransfer(15904): 	at org.apache.cordova.FileTransfer.access$600(FileTransfer.java:67)
09-11 15:17:04.902: W/FileTransfer(15904): 	at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:523)
09-11 15:17:04.902: W/FileTransfer(15904): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
09-11 15:17:04.902: W/FileTransfer(15904): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
09-11 15:17:04.902: W/FileTransfer(15904): 	at java.lang.Thread.run(Thread.java:856)
09-11 15:17:04.932: E/FileTransfer(15904): {"target":"http:\/\/myserver:8080\/test\/ajaxdispatch","source":"file:\/\/\/storage\/sdcard0\/MYAPP_MEDIAS\/1378927011187.jpg","http_status":0,"code":3}
09-11 15:17:04.932: E/FileTransfer(15904): java.net.SocketException: sendto failed: EPIPE (Broken pipe)
09-11 15:17:04.932: E/FileTransfer(15904): 	at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:506)
09-11 15:17:04.932: E/FileTransfer(15904): 	at libcore.io.IoBridge.sendto(IoBridge.java:475)
09-11 15:17:04.932: E/FileTransfer(15904): 	at java.net.PlainSocketImpl.write(PlainSocketImpl.java:508)
09-11 15:17:04.932: E/FileTransfer(15904): 	at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
09-11 15:17:04.932: E/FileTransfer(15904): 	at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:270)
09-11 15:17:04.932: E/FileTransfer(15904): 	at libcore.net.http.FixedLengthOutputStream.write(FixedLengthOutputStream.java:41)
09-11 15:17:04.932: E/FileTransfer(15904): 	at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:454)
09-11 15:17:04.932: E/FileTransfer(15904): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
09-11 15:17:04.932: E/FileTransfer(15904): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
09-11 15:17:04.932: E/FileTransfer(15904): 	at java.lang.Thread.run(Thread.java:856)
09-11 15:17:04.932: E/FileTransfer(15904): Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
09-11 15:17:04.932: E/FileTransfer(15904): 	at libcore.io.Posix.sendtoBytes(Native Method)
09-11 15:17:04.932: E/FileTransfer(15904): 	at libcore.io.Posix.sendto(Posix.java:146)
09-11 15:17:04.932: E/FileTransfer(15904): 	at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
09-11 15:17:04.932: E/FileTransfer(15904): 	at libcore.io.IoBridge.sendto(IoBridge.java:473)
09-11 15:17:04.932: E/FileTransfer(15904): 	... 8 more
09-11 15:17:04.932: E/FileTransfer(15904): Failed after uploading 180823 of 2213229 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