wordpress-mobile / wordpress-mobile/WordPress-Android

Editor hangs while selecting a video from the media library, if library is not well populated yet

Open
#12,481 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] ANR
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

Expected behavior

Selecting a video from the WP media library should be fast and the editor staty interactive, even if the WP media library picker still hasn't fetched all video thumbnails yet.

Actual behavior

Editor hangs while selecting a video from the WP media library if the picker is still trying to fetch the thumbnails

Steps to reproduce the behavior
  1. Uninstall the app, or clear all app data/caches. Install any app version beyond or including v14.2 if you uninstalled.
  2. Start a new block post and add a video block
  3. Tap on "ADD VIDEO" to select a video for the block
  4. Choose "WordPress Media Library" from the bottom sheet popup
  5. Quickly tap on the first video to select it, and then the "checkmark" button on the top-right to commit the selection. The goal here is to do this fast enough so the thumbnails haven't populated yet. Works best on slower connections.
  6. 😢 Notice that the editor is unresponsive and you can't tap around to focus other elements like the title or the toolbar
  7. Wait long enough and the editor populates the block and becomes responsive again 🎉
  8. Delete the block and re-add a video block and go to choose from the media library again
  9. Wait till all the videos in the picker have their thumbnail shown
  10. Select a video and commit the selection
  11. Notice how the editor is immediately becoming responsive and the video block has a non-empty state 🎉

The following 2 GIFs show the error and the "good second attempt" cases:

unpopulated picker populated picker
hanging-after-selected-video no-hanging-after-selected-video-picker-well-populated
Tested on [device], Android [version], WPAndroid [version]

Tested on:

  1. Pixel 2 XL, Android 10, WPAndroid v14.2-rc-1 and at least up to v15.3-rc-2. Issue doesn't happen on app versions lower to 14.2-rc-1
  2. Galaxy S7Edge, Android 8, WPAndroid 15.3-rc-2. Picker never manages to fetch all thumbnails and editor always experiences the hang

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 issue using the listed WordPress Media Library steps, first selecting before thumbnails populate and then after they finish. Trace the Android video block and media-library picker flow from that interaction. Done means the editor remains responsive and the video block is populated when selection is committed during thumbnail loading.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
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.