wordpress-mobile / wordpress-mobile/GutenbergKit

Revisit ACTION_OPEN_DOCUMENT workaround when Chromium fixes ERR_UPLOAD_FILE_CHANGED

Open
#447 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Android Gutenberg Webviews
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_CONTENT for image/video MIME types is intercepted by the system Photo Picker, which returns content://media/picker/... proxy URIs.
  • These proxy URIs report different last_modified values 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_DOCUMENT bypasses the Photo Picker and routes to DocumentsUI, which returns stable content://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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.