Skip to content

can't download in sandbox iframe #3315

Backlog

Description

@tegirvaru

Describe the bug

in the live preview pane, it is not saving my download anymore. i can't get the warning to show up in the console every time. it does show up if i close and open phoenix again. i clicked the 'chromestatus" link and it sounds like a new thing. is there a setting that i can enable to allow the sandbox to download. it worked up until yesterday, but then not today. i haven't changed anything and it has always worked before. if i do the same thing on my own localhost server in my own browser, it works fine.

Reproduction

i click the "save" button in my app in live preview. nothing happens. no error. the save function is just creating the giving it a blob and .click() to download. no file picker, just direct download.

Expected behavior

it should save the file on my local drive download folder.

OS, Browser and Phoenix versions

windows 11 laptop
Release 5.5 build 5.5.11-23832
Phoenix Pro Build: d786c9f
build timestamp: 2026-10-27T11:04:30.905Z

logs or debug stack trace if any

about:srcdoc:1 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
indexedDB.js:22 Database connected
indexedDB.js:25 Persistent storage: granted
script.js:632 [Violation] Permissions policy violation: focus-without-user-activation is not allowed in this document.
panelUpdate @ script.js:632
indexedDB.js:124 storage and cache successfully wiped
(index):1 Download is disallowed. The frame initiating or instantiating the download is sandboxed, but the flag ‘allow-downloads’ is not set. See https://www.chromestatus.com/feature/5706745674465280 for more details.

Additional context

No response

Activity

  1. added
    bug
    on Nov 29, 2026
  2. devvaannsh commented on Nov 29, 2026

    @devvaannsh
    Member

    Hey @tegirvaru, thanks for reporting! So here's the thing: Live Preview runs your page inside a sandboxed iframe that doesn't allow downloads, so the browser blocks it. We do this on purpose to keep things safe for users.

    For now, click the Popout Live Preview button at the top of the Live Preview pane to open your page in the browser, and the download should work there.

    image

    Hope this helps! 🚀

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions