Hello there, I have an issue while performing snap...
# squarelibraries
d
Hello there, I have an issue while performing snapshots with Paparazzi in composables that display a Lottie animation. The goal is to render screenshots of the same composable with various combinations of UI models. I’m not able to undestand why I’m randomly getting lottie animations properly rendered, while in other cases they appear as blank… I tried to hack into the library to change frame count and fps but it didn’t have effect. Could someone please give me some hints? thanks!! K
s
are you already forcing lottie to not run on a background thread? https://cashapp.github.io/paparazzi/#lottie
d
Yes I already set the executor
s
that's weird, setting an executor is all we are doing in our paparazzi tests
c
Perhaps these two issues might be related to your case: 1. https://github.com/cashapp/paparazzi/issues/678 2. https://github.com/cashapp/paparazzi/issues/901
d
I'll give it a try thanks!
j
That is weird, I assume you're on the latest version (1.3.5)? If you do wind up filing an issue, I'd love a repro to figure out why some Lottie animations and others don't. Also, are you using
snapshot
or
gif
?
d
Hi! I'm using
snapshot
. Yes I'm using v1.3.5. I can open an issue. I'm not 100% sure that is reproducible every time. Do you think that it may be related to the Lottie files themselves? I see warnings about merge paths in the console, but they get printed also when the rendering succeeds. At runtime animations work, but during the test I have random results. Maybe Lottie files produced in a certain way can introduce a slight delay in rendering?
j
Sorry, I don't have enough insights to say one way or another. It sounds like some additional investigation might be necessary before deciding whether to open an issue or not.
Maybe try amending the lottie files a little to see if any changes?
d
I checked the animations with a Lottie file viewer and even the files without warnings get rendered as blank. I don’t think there is a correlation between the warnings and the render error. Moreover, they get rendered correctly at runtime so it may be that the render doesn’t happen at the first or second composition (?)
a
@Damiano Giusti do you find any solution for that? I have similar problem at my code - I compare multiple animation file and figure out, then problem occurred consistently when json file contains in assets graphic files which are based.
d
@Arkadiusz Wochniak no I didn’t find a solution yet.
problem occurred consistently when json file contains in assets graphic files which are based
interesting, so if the json files contains images then we are likely to reproduce the issue… I opened this issue but I had no answer yet: https://github.com/cashapp/paparazzi/issues/1756
a
all right, I will subscribe this issue
👍 1