wordpress-mobile / wordpress-mobile/WordPress-iOS
Unable to upload large videos
Nobody has claimed this yet.
- 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
- Open the WPiOS app and create a new post using the block editor
- Add a video block
- Choose the large video and wait for it to upload
- Observe the image upload fails (it's hard to say if this will happen every time)
- Go to the app activity log (Profile icon > Help & Support > Activity Logs > Current) and scroll to the bottom to see the latest logs
- 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
- Open the WPiOS app and navigate to the Media Library
- Add the large video and wait for it to upload
- Observe the image upload fails
- Go to the app activity log (Profile icon > Help & Support > Activity Logs > Current) and scroll to the bottom to see the latest logs
- 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
- A user who tried uploading a 1.05 gb video could upload the same video using mobile Safari via Gutenberg web (https://wordpress.com/block-editor/) but not from the app (note: WordPress.com recommends videos smaller than 1 GB)
- Cutting the large video in two and uploading each part separately sometimes worked for the user
- The videos in question are .MOV
- Possibly related: https://github.com/wordpress-mobile/gutenberg-mobile/issues/1152
(internal reference: p4a5px-2D2-p2
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 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