Skip to content

Failed block media uploads do not provide option to retry #20184

Open

Description

@dcalhoun

Expected behavior

When the media attached to a block fails to upload, tapping the block should provide the option to "retry" the upload within an Action Sheet.

This ability was originally added in #10935 and #15363. The regression may have been introduced in f3f9fc7. This feature works as expected on WordPress for Android.

Actual behavior

The only option provided is "Stop Upload."

Screenshot
RPReplay_Final1677071441.MP4

IMG_6B4618E7E599-1

Steps to reproduce the behavior

  1. Add an Image or File block.
  2. Begin uploading media to the block.
  3. Disable the device's internet connection.
  4. Once the upload fails, re-enable the device's internet connection.
  5. Tap the block with the failed media.

Note
As referenced in a comment, deleting and reinstalling the app resolved the issue. Consistent reproduction steps are unknown.

Tested on iPhone SE, iOS 16.3, WPiOS [version]

Activity

  1. dcalhoun commented on Feb 22, 2023

    @dcalhoun
    MemberAuthor

    Deleting and reinstalling the WordPress app resolved this issue. It appears as though the app, block, or file experienced some form of caching that resulted in the "Retry upload" button not displaying as expected. I do not know how to reproduce this caching issue at this time.

  2. dangermattic commented on Mar 5, 2026

    @dangermattic
    Collaborator

    Thanks for reporting! 👍

  3. added
    [Status] Close CandidateTriage suggests this can be closed; see the latest comment for why and what's left.
    [Status] Needs TestingNeeds to be confirmed on a device or simulator.
    on Oct 31, 2026
  4. jkmassel commented on Oct 31, 2026

    @jkmassel
    Contributor

    This could be closed as can't-reproduce. The Retry action is in the code: gutenbergDidRequestMediaUploadActionDialog adds it when the upload has failed and can be retried. The original problem went away after reinstalling the app and was never reproduced consistently.

    To verify: on a current build, make a block media upload fail (for example, go offline mid-upload), tap the block, and check that Retry is offered.


    Generated by Claude Code

  5. added
    Simulator TestableCheckable on a simulator. Steps are in the issue body or the comment headed 'Simulator test plan'.
    on Oct 31, 2026
  6. jkmassel commented on Oct 31, 2026

    @jkmassel
    Contributor

    Simulator test plan. Sign in using docs/simulator-sign-in.md. Build from current trunk.

    Setup: WordPress.com token. You need a way to make an upload fail, such as Network Link Conditioner set to 100% loss on the host Mac, or stopping the host's network mid-upload.

    1. In the block editor, add an Image block and pick a large photo.
    2. Cut the network while it uploads, so the upload fails.
    3. Tap the failed block.

    Pass: the action sheet offers Retry, and the upload succeeds after you restore the network and tap Retry. Note which editor the build used, legacy or GutenbergKit.


    Generated by Claude Code

  7. jkmassel commented on Oct 31, 2026

    @jkmassel
    Contributor

    Repro run (2026-10-30, trunk e64c851, iPhone 18 Pro simulator / iOS 27.0, Jetpack Debug)

    Result: Not reproduced ❌: Retry was offered. Recommend closing. The report never had consistent steps and no fix was identified, so this doesn't show the original cause was fixed.

    Steps (exact, minimal):

    1. On a local self-hosted wp-env site, create a post in the block editor. This was the legacy editor.
    2. Stop the site's web server, to make the upload fail.
    3. Add an Image block and choose a photo. The block shows "Failed to insert media. Tap for more info."
    4. Start the web server again, then tap the block.
    5. Tap Retry.

    Expected / actual: As expected. The "Media Options" sheet offered Stop upload and Retry. After Retry the image finished uploading, and the attachment count on the server went from 0 to 1.

    Differences from the plan: the server was down before the upload started, so this was not a failure partway through an upload. We used a self-hosted site rather than a WordPress.com token. GutenbergKit wasn't tested. The File block and a relaunch between failure and retry weren't tested either. Retry is still hidden when the local file is missing (Media.canRetry), which we also didn't test.

    Evidence: failed block, the sheet with Retry, and the block after Retry:

    Image block showing Failed to insert media Media Options sheet with Stop upload and Retry Image block after a successful retry


    Generated by Claude Code

  8. removed
    Simulator TestableCheckable on a simulator. Steps are in the issue body or the comment headed 'Simulator test plan'.
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GutenbergEditing and display of Gutenberg blocks.[Status] Close CandidateTriage suggests this can be closed; see the latest comment for why and what's left.[Status] Needs TestingNeeds to be confirmed on a device or simulator.[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions