question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What about remaining upload failed images.?

See original GitHub issue

Be sure to check Asking for help page on the Wiki before opening a new issue! Delete this text when you create a new issue.

What did you expect?

For eg. if i upload 5 images then image upload is started but in case of some network issue or whatever image uploading task is fail and out 5 2 image is not upload then what about remaining image and how can i know out of 5 which image is not upload.

What happened instead?

currently happen those issue if in any situation some images is remain for upload then it can not restart upload of remaining images.

if i suddenly stop internet connectivity during image uploading then i am getting below log cat output which i mention below:

Steps to reproduce (if applicable):

Library initialization code:

// the code you wrote in your Application subclass here
 @Override
    protected void onResume() {
        // TODO Auto-generated method stub
        super.onResume();
        final IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction(UploadService.BROADCAST_ACTION);
        registerReceiver(uploadReceiver, intentFilter);

    }

    @Override
    protected void onPause() {
        super.onPause();
        unregisterReceiver(uploadReceiver);
    }


    private final BroadcastReceiver uploadReceiver = new AbstractUploadServiceReceiver() {

        @Override
        public void onProgress(int progress) {
            Log.e("AndroidUploadService", "DEEP The progress is: " + progress);
        }

        @Override
        public void onError(Exception exception) {
            Log.e("BAPU", "JITENDRA");
            Log.e("DEEP AndroidUpload", exception.getLocalizedMessage(), exception);
        }

        @Override
        public void onCompleted(int serverResponseCode, String serverResponseMessage, String serverResponseBody) {
            Log.e("AndroidUploadService", "DEEP Upload completed: " + serverResponseCode + ", " + serverResponseMessage);
        }

    };


### Request code:
```java
// the code you wrote to create the upload request

Where have you added the request code?

  • Activity
  • Service
  • Other class (add additional info about it)

LogCat output (please set log level to DEBUG first)

// your LogCat output here

AndroidUpload: recvfrom failed: ECONNRESET (Connection reset by peer)
                                                                  java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
                                                                      at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:552)
                                                                      at libcore.io.IoBridge.recvfrom(IoBridge.java:516)
                                                                      at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
                                                                      at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
                                                                      at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
                                                                      at java.io.InputStream.read(InputStream.java:163)
                                                                      at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)
                                                                      at java.io.BufferedInputStream.read(BufferedInputStream.java:227)
                                                                      at libcore.io.Streams.readAsciiLine(Streams.java:201)
                                                                      at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
                                                                      at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)
                                                                      at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274)
                                                                      at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486)
                                                                      at com.alexbbb.uploadservice.UploadService.handleFileUpload(UploadService.java:160)
                                                                      at com.alexbbb.uploadservice.UploadService.onHandleIntent(UploadService.java:121)
                                                                      at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                                                                      at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                      at android.os.Looper.loop(Looper.java:137)
                                                                      at android.os.HandlerThread.run(HandlerThread.java:60)
                                                                   Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
                                                                      at libcore.io.Posix.recvfromBytes(Native Method)
                                                                      at libcore.io.Posix.recvfrom(Posix.java:131)
                                                                      at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
                                                                      at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
                                                                      at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488) 
                                                                      at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46) 
                                                                      at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240) 
                                                                      at java.io.InputStream.read(InputStream.java:163) 
                                                                      at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142) 
                                                                      at java.io.BufferedInputStream.read(BufferedInputStream.java:227) 
                                                                      at libcore.io.Streams.readAsciiLine(Streams.java:201) 
                                                                      at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560) 
                                                                      at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813) 
                                                                      at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274) 
                                                                      at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486) 
                                                                      at com.alexbbb.uploadservice.UploadService.handleFileUpload(UploadService.java:160) 
                                                                      at com.alexbbb.uploadservice.UploadService.onHandleIntent(UploadService.java:121) 
                                                                      at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) 
                                                                      at android.os.Handler.dispatchMessage(Handler.java:99) 
                                                                      at android.os.Looper.loop(Looper.java:137) 
                                                                      at android.os.HandlerThread.run(HandlerThread.java:60) 

 
### Additional info
i am glad to use your library. i can use all functionality in you library but this issue just i can face so please give us solution ASAP.

 Thank you  so much in advance 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gotevcommented, Jul 22, 2017

Supporting resumable upload protocols is the next step of the library. Multipart is a well supported but old protocol, which does not suit modern needs and does not perform well on poor and dodgy networks. I only have to find the time to make the necessary implementations, because some architectural changes needs to be made to support them properly. One of those is request serialization.

0reactions
gotevcommented, Jul 24, 2017

Wonderful! You can fork the main repo and add your modifications, so it will be available for other users too as a temporary solution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Your image upload has failed. What do you do? - Digett
Your image upload has failed. What do you do? · 1. Test image dimensions · 2. Try renaming the image file · 3....
Read more >
What if the image upload failed? - VanceAI
There are cases when image upload fails. If you encounter an upload failure, please check whether the image format is correct. VanceAI supports...
Read more >
How to Fix Post-Processing of Image Failed Error in WordPress
This error usually occurs when you are uploading an image file to WordPress using the built-in media uploader. In this article, we will...
Read more >
Photo upload in Onedrive - where can I find failed uploads?
Opened the app and tried to find the file/image to re-try the upload, but could not find it. It seems there is no...
Read more >
How to Fix an HTTP Error When Uploading Images to ...
WordPress shows you a very vague “HTTP error” when your image fails to upload. It's because there can be several possible causes for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found