I’m using POS UI’s PrintPreview component to render a pdf, and every time it downloads the same pdf twice with a small gap of seconds between repetitions.
I have make sure React is not performing double renders that trigger the component twice and I’m sure on our side we are not triggering the component more than once.
To reproduce, just put a PrintPreview component with a src pointing to a pdf file in an external server.
Is this a known, but undocumented issue on Shopify libraries?
HI Pablorc,
I’ve investigated internally and I wasn’t able to find any other reports of this happening - so I’m thinking this could be something related to your environment or app configuration.
Hey Liam,
Thank you for your response. I double-checked it and everything seems right. I even created a new extension from scratch with no state that just contains a PrintPreview component and the same behavior happens (my backend endpoint receives 6 requests to download the pdf, and it gets downloaded in the device’s memory twice).
I’m using a Samsung Galaxy with Androind 14 in my tests, but I get reports from users from something similar happening on different devices.
Hi Liam,
Are you only experiencing this on Android devices, or does this occur on iOS as well?
Victor
Hi Victor,
On iOS our client reports that numbers change, the backend receives 4 requests instead of 6 and the component shows the PDF without triggering downloads (or at least those do not appear on the notification bar).
Let me know if you need anything else.