utils.serializePage() not returning anything

Hey @Darren, @neilbalthaser, @David_Paez,

The serializePage function works perfectly in a multi-page Retool web app. You can use the following code to generate a PDF:

const base64 = await utils.serializePage({ format: 'pdf' });
console.log(base64)
return base64

This correctly uses format: 'pdf' to generate the base64-encoded PDF.



However, this doesn't work in Retool Mobile apps. When I try the same function there, I get an error in the browser console saying that serializePage is unsupported in Retool Mobile apps.


I also tried using downloadPage, but that doesn't work either in the mobile environment.

Just wanted to bring this to your attention — let me know if there's a workaround or update on supporting this in Mobile.

Thank You.

3 Likes

Hi all, checking in on this thread to see if we can get to the bottom of this serializePage issue. I am also not able to reproduce this on my end (it works for me), but that isn't a surprise as I'm on similar hardware and chrome settings as other Retool members.

I think it would be worth testing this in an incognito window. If it works in incognito I would guess that there is some browser extension causing problems.

1 Like

I can confirm that it does not work properly on my end either.
I noticed that it works ok when I'm in a small app but when I'm using large multipage app utils.serializePage returns undefined

I was trying on mobile but I now understand this is available on mobile.

Hi @neilbalthaser,

Yes you are correct, unfortunately this method is not available on mobile.

If you could share some details about your use case I can share this with our engineering team to see if there are other options to accomplish your goals.

Are you using the mobile app or a mobile browser for a web app? How often are you needing to export the still frame of the app and where are you looking to send those files(PDFs?) that you are capturing from the app? The more details the better for us to understand and support!