Skip to content

Library uploads still hang if the page screenshot never settles #533

Open

Description

@rahulwalunje

Problem

beaverbuilder/packages#178 (published as @beaverbuilder/cloud-ui 0.8.74) and #531 fixed the hang when html2canvas fails: screenshotUrl() now rejects, and every caller uploads without a screenshot.

screenshotUrl() still has no timeout. If html2canvas stalls without ever resolving or rejecting, for example when a proxied image request through index.php?fl_asst_image_proxy= never answers, these paths still spin forever:

  • Add to library (exportPost in cloud-ui uploader/hooks/library.js)
  • Importing an XML file into a library (importPosts, same file)
  • Update library item (src/apps/libraries/ui/library-item/form/config/post.js)

Found by the merge-check sanity pass on #531.

Suggested fix

In packages/cloud-ui/src/uploader/utils/screenshot.js, race the html2canvas promise against a timeout that rejects and removes the hidden iframe. The existing caller fallbacks then upload without a screenshot. Pick the timeout from real render times: a 1500x7932 page rendered in about 2s locally, so something like 30s leaves headroom.

Needs a cloud-ui release and a version bump here, like #531.

How to reproduce

Make a proxied image request hang (for example, a page image whose proxy request never returns), then add that page to a library: the spinner never stops.

Activity

  1. self-assigned this
    on Nov 19, 2026
  2. added
    status: has pull request
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

status: has pull request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions