Summary:
I started an upload of an image and put my phone in the pocket. Next time I open it I have a notification that it failed. In the list on the main view of the app I pressed the retry icon in the lower right corner of the image. The image starts the upload again and it seems to succeed. When I later look at my contributions I noticed that the image actually did succeed the first time and it then uploaded the same image again:
In the app it looks like only the second one has been uploaded.
Steps to reproduce:
I don't know how to reproduce.
Device and Android version:
What make and model device (e.g., Samsung J7) did you encounter this on?
Samsung Galaxy S7 Edge
What Android version (e.g., Android 4.0 Ice Cream Sandwich or Android 6.0 Marshmallow) are you running?
Android version 8.0.0
Samsung Experience version 9.0
Is it the stock version from the manufacturer or a custom ROM ?
The stock version.
Commons app version:
2.11.0~93b948d20
Would you like to work on the issue?
No.
Thanks for figuring out this bug @Ainali. This must have been one of those cases when the image does get uploaded but one of the other steps fail.
Any newcomer willing to take this? :-)
Tip: To make an upload fail, switch Android to airplane mode just after the upload starts.
Hi, can I work on this??
It is yours @FernandaCG :) This can be a relatively complicated task, so please communicate with us about the steps you have done so that we can share ideas.
Hi @neslihanturan, I have been debugging the app, and I think that in the method retryUpload in ContributionViewHolder we could validate if the file already exists, but idk which attribute of the contribution could I use. Can you give me some feedback?
Hi guys, can I work in this issue?
@FernandaCG Are you still working on this?
About this
I have been debugging the app, and I think that in the method retryUpload in ContributionViewHolder we could validate if the file already exists
You can check that using the title, the titles are supposed to be uniques, in fact, there is an existing method that lets you know if the file exists or not.
Hi! @gouri-panda you can take the issue :D
Thanks @FernandaCG
Any newcomer willing to take this? :-)
Tip: To make an upload fail, switch Android to airplane mode just after the upload starts.
@nicolas-raoul I can't reproduce this issue. I tried several times but it doesn't reproduce. Can you help me?
I am having a similar issue. However, I didn't have an uploading error message and it looks like only one copy of my image uploads commons.wikimedia.org the app showing two.
Summary:
After uploading photos, I see duplicate images in the app's "contributions" screen.
Steps to reproduce:
I see duplicate images on the app but the website shows that the photo uploaded correctly (no duplicates).
System logs:
Logs exported from the app: https://privatebin.net/?6ccdcedda9153900#7YwYwPohymf1LZ6iBuUf8jBQBbj9hDzUjiZcwGvejr4i
Device and Android version:
API level: 29
Android version: 10
Device manufacturer: Google
Device model: Pixel 2
Device: walleye
Network type: wifi
App version name: 2.12.3~dc08a5e88
User name: Mds08011
Commons app version:
App version name: 2.12.3~dc08a5e88
I am currently using the Beta version but this issue occurred on the regular/stable version as well.
Screen-shots:
Duplicate photo in app:

Duplicate photo in app:

"Uplaods" on website showing only single images:
Would you like to work on the issue?
No. I don't have the technical knowledge to address this.
@Ainali Do you mean all failed uploads show correctly after you retry them? Have many times did you perform the steps? Thanks :-)
I think this issue is similar to what I have reproduced. The upload failed, an attempt to upload again failed even after the progress was complete. I restarted the app and noticed the image was uploaded yet it also showed the failed upload. I experienced this on 2 occasions...

Can I take this one on, please?
@michaelnares As a first step, can you try to reproduce this issue and list down the steps here.
@michaelnares As a first step, can you try to reproduce this issue and list down the steps here.
@maskaravivek I get https://stackoverflow.com/questions/38618885/error-rpc-failed-curl-transfer-closed-with-outstanding-read-data-remaining. I have success after git clone https://github.com/commons-app/apps-android-commons.git --depth 1
and cd apps-android-commons/, but the same error after git fetch --unshallow. Is there any issue with working on the repository without doing git fetch --unshallow, please?
Has anyone been able to reproduce this issue on the latest commits?
@ashishkumar468 I am having so many failed upload with recent versions, but retry always works perfectly. I guess this can be closed if nobody manages to reproduce with the latest version.
Hi @nicolas-raoul Should we create a new issue for that, as this issue is related to retries?
There is already an issue about the failures. My comment above was only saying that retry works :-)
@nicolas-raoul Ohh, okay, so we can close this issue right?
I think it is OK to close it, yes.
For reference, the issue regarding failed uploads is #3247 .