Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5635

File Transfer of picture fails on every Second picture

    XMLWordPrintableJSON

Details

    Description

      Dear all,

      Can you please help me out for this situation, what my problem is am using cordova 2.9 js and jar file and i have a scenario where user can upload or share image to his friends, so first time am uploading image to server successfully but when i goes for second time it not uploaded,PFB my error msg from android logcart..

      12-12 11:08:48.270: W/FileTransfer(8686): Error getting HTTP status code from connection.
      12-12 11:08:48.270: W/FileTransfer(8686): java.io.EOFException
      12-12 11:08:48.270: W/FileTransfer(8686): at com.squareup.okhttp.internal.Util.readAsciiLine(Util.java:314)
      12-12 11:08:48.270: W/FileTransfer(8686): at com.squareup.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java:301)
      12-12 11:08:48.270: W/FileTransfer(8686): at com.squareup.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:130)
      12-12 11:08:48.270: W/FileTransfer(8686): at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:630)
      12-12 11:08:48.270: W/FileTransfer(8686): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:385)
      12-12 11:08:48.270: W/FileTransfer(8686): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:334)
      12-12 11:08:48.270: W/FileTransfer(8686): at com.squareup.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:534)
      12-12 11:08:48.270: W/FileTransfer(8686): at org.apache.cordova.FileTransfer.createFileTransferError(FileTransfer.java:594)
      12-12 11:08:48.270: W/FileTransfer(8686): at org.apache.cordova.FileTransfer.access$700(FileTransfer.java:69)
      12-12 11:08:48.270: W/FileTransfer(8686): at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:494)
      12-12 11:08:48.270: W/FileTransfer(8686): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
      12-12 11:08:48.270: W/FileTransfer(8686): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
      12-12 11:08:48.270: W/FileTransfer(8686): at java.lang.Thread.run(Thread.java:856)
      12-12 11:08:48.310: E/FileTransfer(8686):

      {"target":"http:\/\/202.123.66.98:80\/motalk-webservice\/uploadImage?user_id=91&chat=1","source":"file:\/\/\/mnt\/sdcard\/Android\/data\/com.moxian.main\/cache\/1386826725610.jpg","http_status":0,"code":3}

      12-12 11:08:48.310: E/FileTransfer(8686): java.net.SocketException: sendto failed: EPIPE (Broken pipe)
      12-12 11:08:48.310: E/FileTransfer(8686): at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:496)
      12-12 11:08:48.310: E/FileTransfer(8686): at libcore.io.IoBridge.sendto(IoBridge.java:465)
      12-12 11:08:48.310: E/FileTransfer(8686): at java.net.PlainSocketImpl.write(PlainSocketImpl.java:507)
      12-12 11:08:48.310: E/FileTransfer(8686): at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
      12-12 11:08:48.310: E/FileTransfer(8686): at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269)
      12-12 11:08:48.310: E/FileTransfer(8686): at java.io.BufferedOutputStream.write(BufferedOutputStream.java:131)
      12-12 11:08:48.310: E/FileTransfer(8686): at com.squareup.okhttp.internal.http.HttpTransport$FixedLengthOutputStream.write(HttpTransport.java:228)
      12-12 11:08:48.310: E/FileTransfer(8686): at com.squareup.okhttp.internal.FaultRecoveringOutputStream.write(FaultRecoveringOutputStream.java:60)
      12-12 11:08:48.310: E/FileTransfer(8686): at org.apache.cordova.FileTransfer$1.run(FileTransfer.java:425)
      12-12 11:08:48.310: E/FileTransfer(8686): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
      12-12 11:08:48.310: E/FileTransfer(8686): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
      12-12 11:08:48.310: E/FileTransfer(8686): at java.lang.Thread.run(Thread.java:856)
      12-12 11:08:48.310: E/FileTransfer(8686): Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
      12-12 11:08:48.310: E/FileTransfer(8686): at libcore.io.Posix.sendtoBytes(Native Method)
      12-12 11:08:48.310: E/FileTransfer(8686): at libcore.io.Posix.sendto(Posix.java:146)
      12-12 11:08:48.310: E/FileTransfer(8686): at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
      12-12 11:08:48.310: E/FileTransfer(8686): at libcore.io.IoBridge.sendto(IoBridge.java:463)
      12-12 11:08:48.310: E/FileTransfer(8686): ... 10 more
      12-12 11:08:48.310: E/FileTransfer(8686): Failed after uploading 98548 of 169414 bytes.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              haffees shaik abdul haffeez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 48h
                  48h
                  Remaining:
                  Remaining Estimate - 48h
                  48h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified