utils.downloadPage() not working at all

  • Goal: To download the page as a PDF

  • Steps: This was working perfectly before, and recently stopped working.

  • Details: If I try to use this function and download a screenshot of the page, nothing happens at all, I get no error logs (in the debugging console) but if I look at the browser console, its losing its mind! The same error appears over and over again.
    It's improtant to note that this is an app that has many modules and chart components within containers.

However, when I look at the console, I am just getting countless errors that continue to appear ():

Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag.
at frame_ant.js:2:10132
at frame_ant.js:2:12679
at frame_ant.js:2:12683

at frame_ant.js:2:12687

Hello!

Does the same issue occur in other browsers? The error you are seeing seems like it is a cross-origin issue so there might be some sort of Retool backend mystery going on that we are unaware of.

Pinging some Retool minds for input: @Darren @Tess @AbbeyHernandez

It isn't downloading on any browser now unfortunately.

Hi @Alexandra_Matthews, very sorry to hear you're running into this issue. To help me diagnose the root cause would you mind sharing a JSON export with hard coded query results or a simple repro?

This can be done by clicking the download button in the debug console!

Hi Abbey,

I actually found a deeper cause of this.

If you try to exclude a module, in the exclude components, the download doesn't work at all.

For example, the example app downloads the PDF successfully.

However if I add a module, and try to exclude this, then the download will successfully trigger, but nothing happens. The example with the navigation1 fails when I pass in the component name 'navigation1'.

So essentially you cannot exclude modules within the componentsToExclude list.

Example Embedded.json (92.4 KB)