utils.downloadPage() stopped working as it used to

Hey community!
I left one of my apps unnoticed for like 2 weeks, and when i came back to implement a new feature I found out that utils.downloadPage() stopped seeing components inside containers and after running a script i receive blank pdf with the header only,
Is that a bug or some update by Retool?
The point is that i face it across all my apps, am I the one facing That?

Hey @stokoljasivan! I'm unable to reproduce the issue locally. Would you be able to send a JSON export of an app where this repros so we can see what might be causing the issue?

Thank you for the reply!
Unfortunately I can't share it that way, 'cause that's a company's account, but here the screenshot of the cleaned container and run script click handler which pretty much covers the problem

utils.downloadPage("Report " + moment().format("MMM Do YY"), {

scale: window.devicePixelRatio * 7,
fullscreen: true
});
and here is the pdf in the end


Most of the elements were captured in containers just for the UI, and it wasn't a problem for making a pdf report until now
@mckenna

Do you get the same output if you remove the scale/fullscreen options?

Yes, just the pdf quality is way lower
p.s btw, tables and other components outside of containers works fine, but everything inside containers is hidden for some reason
And I double-checked if any changes were made to the app, no changes at all took place since last time
@mckenna

I'm guessing that there are errors next to the components in the screenshot because you stripped the data, but just to confirm -- there are no errors in the UI when you download the page normally, right?

It doesn't look like there have been any updates to the download page logic in several months in Retool's end and I still can't reproduce on my end so I'm a bit stumped on why this might be happening for you all of a sudden :thinking:

Hey! @mckenna thank you for the reply
Still, there must be a reason for that, i created a separate app just for testing, created 2 tables, and merged their base64strings to show the bug, just for now i use utils.serializePage:
On case 1 everything works just fine 2 tables are displayed in pdf viewer


Here is case 2, all i did is i have put the first table into the container and asked utils to capture container1 and table 2 instead of table1 and table2

and the third case table1 is still in the container, but now I asked utils to capture table1 and table2 again as in the first case

Please try it yourself,
just create a table and put it in the container and do utils.serializePage or utils.downloadPage and test it
I highly appreciate your attention and support

@mckenna
Another example, of the same app in preview mode and it's pdf using utils made the same time


Hey @stokoljasivan! Could you share the JSON export of that app?

@mckenna here it is
test (1).json (134.0 KB)

Thanks @stokoljasivan! This is what I get when I click the download button for that app -- are you finding that the table inside of the container is not appearing?

Thank you for testing @mckenna, now it becomes interesting, that it is only the problem on my side
Yes, from my side the table inside the container is not appearing, what could be the reason for that?

Yeah this one is very strange! :sweat_smile:

I wonder if it reproduces on other browsers / computers for you?

I'm also able to reproduce this! In Chrome I get empty containers like stokoljasivan is reporting. In safari, I get fullscreen: false behaviour, even though I have fullscreen: true set.

Any idea if something changed on retools side? I've made no updates on my end

Weirdly, if I import the JSON @stokoljasivan provided, I can get it to download fine. But in another app I am working on, it isn't working. Same computer, same browser, just different apps (sorry - can't share the one that isn't working).

utilis.downloadPage() isn't the fanciest function, but to grab a quick output to show someone it is helpful. Is there a bug being tracked at all? Or is this still not reproducible?

+1 having this issue.

Using to export a PDF of an app with certain components excluded. It appears to be successfully exporting the correct data, however it is cutting parts of the screen off now. Rather than capture all the components it should, it just grabs the part of the screen visible to the user exporting.

No changes made at our side prior to the issue arrising, and I have tried removing full page and scaling options which made no difference. Tested in multiple browsers with different users and all display the same behaviour.

+1 having this issue also.
I had my app set up to download the page pdf and it has worked for months. Today I tried and it cuts off the page where is is only in the visible window.