utils.serializePage() not returning anything

I'm trying to download a retool mobile screen as a PDF and see there is a util to do that, but when I run it nothing happens. I then tried the serializePage function to see if that would return the rendered pdf data but when I run it I get nothing returned in results and if I log to console I get {}.

I created a simple test page to make sure it wasn't to do with the components in the page I was trying to download, this test page only has a text field and a button which triggers running the JS.

I've read the docs and the forum and can't find any reason this returns nothing. Anyone any ideas?

Thanks, Colin

2 Likes

Hi @ccaskey, this is definitely a bug. The value of your variable serializedPage should be the current Retool page as a Base64-encoded PDF string.

I was able to reproduce this issue on my end. We created the internal bug report and will update you here when is fixed.

Thank you for surfacing this!

Update: We don't support utils.serializePage() on Mobile.

This is also happening to me on a normal web App.

Hi @David_Paez, could you share a screenshot of your code?
I'm not able to reproduce this issue on web apps:

Is there anything else you need?

This is great, thank you!

Is this happening in Cloud or are you using a specific Self-hosted version?

Hey @ccaskey, I checked internally and this is not a bug. We currently don't support serializePage on Mobile. I noticed this is not clear in our documentation so I made an internal feature request to include this specification. Similarly, I created a feature request to support this functions on Mobile.

I'll update you here with any news on this feature. :slightly_smiling_face:

I'm sorry for the confusion.

Great, thanks Paulo.

1 Like

You are welcome!

This is using the cloud version.

That's odd! It should be working smoothly on Cloud:

What browser and version are we on?

I'm using the latest release of Chrome, and s still not working. Console log shows undefined and no results are returned.

Edit:

I'm also testing with including the container selected to download but also not working:

Hi @David_Paez, we haven't been able to reproduce this issue.

Could you try disabling all Chrome extensions and plugins?
Could you also check if we have any Preloaded JS?