wordpress-mobile / wordpress-mobile/WordPress-iOS

Unable to upload large videos

Open
#15,032 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

[Pri] Medium [Type] Bug Media
Dominant language
Swift
Stars
3.9k
Forks
1.2k
Avg merge
23h 51m
Merged PRs (30d)
58

Description

Expected behavior

Uploading a very large video (e.g. larger than 500mb) to the Media Library (either from the Media Library itself or via the block editor's Video block) should work without error.

Actual behavior

Sometimes the video fails to upload.

Steps to reproduce the behavior

You'll need a large video for this (over 500mb) for either scenario below.

Scenario 1
  1. Open the WPiOS app and create a new post using the block editor
  2. Add a video block
  3. Choose the large video and wait for it to upload
  4. Observe the image upload fails (it's hard to say if this will happen every time)
  5. Go to the app activity log (Profile icon > Help & Support > Activity Logs > Current) and scroll to the bottom to see the latest logs
  6. Observe an error in the logs similar to:
2020-09-06 20:00:20:394 🔵 Tracked: media_service_upload_failed <error_code: -1001, error_description: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=

The request timed out., NSErrorFailingURLStringKey=https://public-api.wordpress.com/rest/v1.1/sites/xxxxxxxxxx/media/new?locale=en, NSErrorFailingURLKey=https://public-api.wordpress.com/rest/v1.1/sites/xxxxxxxxxx/media/new?locale=en, _kCFStreamErrorDomainKey=4}, error_domain: NSURLErrorDomain>
Scenario 2
  1. Open the WPiOS app and navigate to the Media Library
  2. Add the large video and wait for it to upload
  3. Observe the image upload fails
  4. Go to the app activity log (Profile icon > Help & Support > Activity Logs > Current) and scroll to the bottom to see the latest logs
  5. Observe the same error as before
Reported by user on an iPhone 11 Pro Max, iOS 13.6.1, WPiOS 15.5 (15.5.0.3)
Additional info

(internal reference: p4a5px-2D2-p2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the upload from the WPiOS block editor Video block and Media Library with a video over 500 MB, then inspect the Current Activity Logs for media_service_upload_failed and the NSURLErrorDomain timeout. Compare the app behavior with the WordPress.com web uploader and the related Gutenberg Mobile issue; done means large videos upload successfully from both app entry points without timeout errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.