wordpress-mobile / wordpress-mobile/WordPress-Android
Duplicate media on upload after retry
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 3.2k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 69
Description
Expected behavior
Retrying upload for a previously upload failed image should not result in duplicate images in the media library.
Actual behavior
If you upload more than one images at once and upload fails for an image, then on retrying to upload makes duplicate copies in the media library.
(Tested on a self-hosted site. Might also be reproducible on a simple WP site.)
Steps to reproduce the behavior
- Launch app
- Open a draft post in the Gutenberg Editor
- Select image block
- Select more than one images for upload
- Enable airplane mode, wait for ~1 min and then disable it while images are uploading so that images upload fails for at least one of the image (I also re-surfaced the app from background once)
- Click retry on the failed image
- Wait for the upload to complete
- Go to media library and notice duplicate copy of the failed image
Attempt 1: https://cloudup.com/izjkk0AITDc (Duplicate media on timestamp 1:14)
Attempt 2: https://cloudup.com/iydwecO-FxC (Duplicate media on timestamp 1:53)
Tested on [Pixel3 API 27], WPAndroid [16.2-rc-1]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the multi-image upload flow in the Gutenberg Editor using the listed airplane-mode interruption, then trace the retry path for the failed image and its media-library result. Done means retrying a failed upload no longer creates a duplicate image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100