react-native-skottie icon indicating copy to clipboard operation
react-native-skottie copied to clipboard

Error while using dotLottie files.

Open ISnowFoxI opened this issue 1 year ago • 5 comments

When you try to use dotLottie files with rn-skottie it throws the below error. Android logcat seemed to give the same information as well.

...

import {Skottie} from 'react-native-skottie';
import {cameraPermission, micPermission} from '../../../assets/animations';

    ...
    
    <Skottie
          style={styles.animationStyle}
          source={micPermission}
          autoPlay
          loop
          resizeMode="contain"
    />
    
    ...

Here are some example files: dotLottieFiles.zip

Sidenote: When I download files from lottie files, they download as a zip, so I have to manually convert the file extention to .lottie. Don't think it has anything to do with it.

dotLottie

ISnowFoxI avatar May 06 '24 09:05 ISnowFoxI

Hi,

I've started using rn-skottie and noticed significant performance improvements. Thanks for the great work! However, this issue is preventing me from publishing my app on Android. Is there any progress on this issue? I need to decide whether to plan the release with rn-skottie or postpone its use.

Thanks in advance for your response.

sabaturgay avatar May 17 '24 12:05 sabaturgay

@sabaturgay for now, you should postpone it, Margelo team is hard at work migrating all libraries to new arch and stuff. So they are very busy at the moment.

ISnowFoxI avatar May 17 '24 12:05 ISnowFoxI

Sure, Thanks for the quick response.

sabaturgay avatar May 17 '24 13:05 sabaturgay

I am also getting an error when dealing with dotLottie files (After Effects source). Exception in HostFunction: animations/data.json not present in dotLottie file

thecynicalpaul avatar Jun 03 '24 06:06 thecynicalpaul

Update to potentially help with investigation of this: I've tried two differnt workflows for exporting .lottie files from After Effects, and one of them works on rn-skottie.

(1) This doesn't work and throws Exception in HostFunction: animations/data.json not present in dotLottie file: AE -> AE Lottie Extension to upload to lottifiles -> export project as an unoptimized dotLottie

(2) This works without throwing errors AE -> AE Lottie Extension to upload to lottifiles -> export project as an unoptimized json -> upload json to https://lottiefiles.com/tools/lottie-to-dotlottie -> download optimized dotLottie

Note: files produced by either of these workflows work with react-native-lottie. Note 2: Interestingly, the rasterized segments with shadows don't show up in the working dotLottie files. (They work in JSON files, and do show up in react-native-lottie or lottiefiles web when using the optimized dotLottie)

thecynicalpaul avatar Jun 03 '24 21:06 thecynicalpaul