wordpress-mobile / WordPress-iOS

WordPress for iOS - Official repository
http://ios.wordpress.org/
GNU General Public License v2.0
3.66k stars 1.11k forks source link

Problem Viewing and Adding Images When Images Imported From Apple Photos #13509

Open pmciano opened 4 years ago

pmciano commented 4 years ago

A user is having trouble viewing and adding images in the WordPress app when those images are imported from Apple Photos. The problem persists whether the WordPress app is removed/reinstalled, when the images are small in size, and over different network connections.

They are using these steps to add an image after importing it to their iOS device:

Open app > Blog Posts > +(new post) > Add title > Add media / photo > choose photo from album > click insert

They state the following then occurs:

Sometimes it’ll have the refresh symbol inside the icon. Once it showed the image upload progress bar but stopped and went straight to what you see here. Tried a few times both via wifi & data.

no_image

The user states that this only started happening after a recent update of the WordPress app.

We were not able to replicate this issue.

We found the following in the provided app log:

2020-02-06 14:33:17:337 Unable to download image for attachment with url = //. Details: Optional("Could not connect to the server.")

2020-02-06 14:33:50:305 Unable to download image for attachment with url = placeholder://. Details: Optional("unsupported URL")
2020-02-06 14:33:50:307 Creating media

2020-02-06 14:33:50:488 🔵 Tracked: media_service_upload_failed <error_code: 0, error_description: Error Domain=MediaServiceErrorDomain Code=0 "Media doesn't have an associated file to upload." UserInfo={NSLocalizedDescription=Media doesn't have an associated file to upload.}, error_domain: MediaServiceErrorDomain>

The full copy of the latest log, as well as a video demonstration of the issue is available in the associated ticket.

This issue occurred on an iPhone SE running iOS 13.3 and version 14.1 of the WordPress app.

2695726-zen

designsimply commented 4 years ago

I tested with the following steps and was unable to reproduce the problem:

  1. Sign in to iCloud using the same email address on your Mac and your iPhone.
  2. On the iPhone, go to Settings > Your Name > iCloud > Photos, turn iCloud Photos on, and check the option to "Optimize iPhone Storage".
  3. On the Mac, go to System Preferences > Internet Accounts > iCloud > Photos > Options… and check the iCloud Photos option.
  4. Drag any image edited locally on the Mac from Finder into the Apple Photos custom album.
  5. In the app, go to Profile (Me icon) > App Settings, tap "Clear Device Media Cache," and use the slider option for "Max Image Upload Size" to set it to anything other than Original.
  6. Tap the + icon in the bottom menu to start a new post.
  7. Tap the + icon at bottom left and select the Image block.
  8. Tap "Add Image".
  9. Tap "Choose from device".
  10. Select any image that was edited using the Mac and now appears in a custom album made using Apple Photos.
  11. Publish or save the post.
  12. Go to Media in the app to see if the image appears there as expected.
  13. View the post to check to see if the image looks correct.

Result: images uploaded normally in my case. (1m35s) Tested with WPiOS 14.2.0.2 TestFlight beta on iPhone 6S iOS 13.3.1.

Notes: my images were editing using Lightroom and saved from that app as file format JPEG with the sRGB color space, the image sizes were 3.5MB and 1MB respectively, I tried with both the "Optimize iPhone Storage" and "Download and Keep Originals" options checked in the iPhone's iCloud settings.

antonis commented 4 years ago

A user reported this again. He noted that he does not use iCloud Photos and that this used to work. Probably the problem occurs only with manual sync of Albums in the device after a recent change in iOS APIs we incorporated.

stale[bot] commented 3 years ago

This issue has been marked as stale because:

Please comment with an update if you believe this issue is still valid or if it can be closed. This issue will also be reviewed for validity and priority during regularly scheduled triage sessions.