WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

Offline post uploading loop when device came back online

Open reginabally opened this issue 3 years ago • 2 comments

It was reported in 5276070-zd-woothemes that multiple copies of media files and posts were uploaded to the site when the device went from offline to online.

Expected behavior

It was expected that the media files and posts edited offline will only be uploaded once.

Actual behavior

The app uploaded multiple copies of the media files and went into a loop uploading posts to the site.

Steps to reproduce the behavior

  1. Turn on Airplane mode on the device. Make sure the device has no internet access.
  2. Go to the WPiOS app and create a new post.
  3. Add a gallery block and choose a few photos from the device
  4. Observe that the app shows errors uploading the photos. This is expected since the device is offline.
  5. Close the editor to go back to the post listing. (Not sure if this step is needed but I did this when I was doing testing)
  6. Turn off the Airplane mode and connect the device to the internet.
  7. Go back to the WPiOS app, and notice the app started uploading the offline content.
  8. Multiple notifications in the app showing the upload was successful.
  9. Notice duplicate copies of media files uploaded in My Site > Media, and multiple copies of the same post were uploaded in My Site > Posts.

Screen recording and screenshots

Screen recording: https://d.pr/v/NmUc2Q/h8ngkHqecn

IMG_5003462E3EC8-1

IMG_0DAB97083128-1

Tested on iPhone 11, iOS 15.5, WPiOS 20.0.1

reginabally avatar Jun 16 '22 06:06 reginabally

Just want to mention that the user had a different experience in offline upload:

I followed your steps, put pictures and text into a test post offline, then connected my tablet to wifi. The app immediately started uploading pictures and stayed in that mode for than 15 minutes. without showing any of the pictures as fully loaded. During that time, it added 3-4 copies of each picture to my media library and never uploaded the test post. I finally closed the app to stop the uploading.

reginabally avatar Jun 16 '22 06:06 reginabally

URL of the site is: https://kjtboulder.me/

Awaiting a screen recording from the customer ⌛

joashrajin avatar Jun 17 '22 09:06 joashrajin