wordpress-mobile / wordpress-mobile/GutenbergKit
Revisit ACTION_OPEN_DOCUMENT workaround when Chromium fixes ERR_UPLOAD_FILE_CHANGED
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29
- Forks
- 6
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Context
PR #415 switched the Android WebView file chooser from ACTION_GET_CONTENT to ACTION_OPEN_DOCUMENT to work around a Chromium bug where proxy URIs returned by the Android 13+ Photo Picker report inconsistent last_modified metadata, triggering ERR_UPLOAD_FILE_CHANGED validation failures.
Chromium bug: https://issues.chromium.org/issues/40123366
Details
- On Android 13+,
ACTION_GET_CONTENTfor image/video MIME types is intercepted by the system Photo Picker, which returnscontent://media/picker/...proxy URIs. - These proxy URIs report different
last_modifiedvalues between queries, which Chromium's WebView treats as the file having changed mid-upload. - The error only occurs in Android WebView, not in Chrome browser directly.
ACTION_OPEN_DOCUMENTbypasses the Photo Picker and routes to DocumentsUI, which returns stablecontent://com.android.providers.media.documents/...URIs that don't trigger the bug.
Why track this
ACTION_OPEN_DOCUMENT works but presents a different file picker UI (DocumentsUI instead of the Photo Picker). If/when the Chromium bug is resolved, we should evaluate switching back to ACTION_GET_CONTENT to give users the more modern Photo Picker experience.
References
- Workaround PR: #415
- Original cache-based workaround: #224
- Related
tus-js-clientdiscussion: https://github.com/tus/tus-js-client/issues/255#issuecomment-828386273
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 reviewing workaround PR #415 and the Chromium issue 40123366, then compare the current ACTION_OPEN_DOCUMENT flow with the former ACTION_GET_CONTENT behavior. Once Chromium fixes ERR_UPLOAD_FILE_CHANGED, evaluate the Android 13+ picker behavior and document whether switching back provides stable uploads and the intended Photo Picker experience.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100