Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lottie-react-native] Lottie crash on Android #8011

Closed
maxgfr opened this issue Apr 25, 2020 · 17 comments
Closed

[lottie-react-native] Lottie crash on Android #8011

maxgfr opened this issue Apr 25, 2020 · 17 comments
Labels
Android Lottie needs more info To be used when awaiting reporter response

Comments

@maxgfr
Copy link

maxgfr commented Apr 25, 2020

馃悰 Bug Report

Environment

  Expo CLI 3.18.6 environment info:
    System:
      OS: macOS 10.15.4
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 10.19.0 - ~/.nvm/versions/node/v10.19.0/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.4 - ~/.nvm/versions/node/v10.19.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6241897
      Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
    npmGlobalPackages:

      expo-cli: 3.18.6

Steps to Reproduce

This bug is not present on iOS. So, you have to run an Android Virtual Device (AVD) on Android 10. Here is a screenshot of my device : https://prnt.sc/s5rhpl

Then, you can try to run an application which uses lottie-react-native library.

Don't forget to add this to your code :

<LottieView
          ref={animation => {
            this.animation = animation;
          }}
          style={{
            width: 400,
            height: 400,
          }}
          source={require('./assets/anim.json')}
        />

Expected Behavior

The application is not crashing...

Actual Behavior

Expo application is crashing with no error message, it can't run the code.

Reproducible Demo

I created a repo that you can clone and run here : https://github.com/maxgfr/expo-lottie

@maxgfr maxgfr changed the title Lottie crash on Android [lottie-react-native] Lottie crash on Android Apr 25, 2020
@mashuk999
Copy link

The issue is common for importing Lottie v3 files. Try to downgrade to v2 that will resolve the issue.

@byCedric
Copy link
Member

Hi @maxgfr! Thanks for the issue report. And thanks to @mashuk999, for the quick reply 馃槃 Unfortunately, we can't upgrade (yet) to lottie v3. That's why you have to export your assets for older lottie versions. Does this work for you?

Hope it helps!

@byCedric byCedric added Lottie Android needs more info To be used when awaiting reporter response and removed Needs triage labels Apr 27, 2020
@maxgfr
Copy link
Author

maxgfr commented Apr 30, 2020

Indeed, after exporting in V2 files, the android application doesn't crash.

Nevertheless, it could be interesting to understand why lottie v3 is crashing on android only... Like this, we could fix the bug :p

Thanks for your message @byCedric and @mashuk999 !

@prajwolrg
Copy link

prajwolrg commented Jul 26, 2020

Indeed, after exporting in V2 files, the android application doesn't crash.

Nevertheless, it could be interesting to understand why lottie v3 is crashing on android only... Like this, we could fix the bug :p

Thanks for your message @byCedric and @mashuk999 !

Is there any way to export V3 files to V2 files when .JSON files has been downloaded from lottiefiles.com

@Cookizza
Copy link

I am wondering the same about converting animations - I have json files already and am wondering how to convert them

@MorenoMdz
Copy link
Contributor

Indeed, after exporting in V2 files, the android application doesn't crash.
Nevertheless, it could be interesting to understand why lottie v3 is crashing on android only... Like this, we could fix the bug :p
Thanks for your message @byCedric and @mashuk999 !

Is there any way to export V3 files to V2 files when .JSON files has been downloaded from lottiefiles.com

Hey there, any updates if this is possible?

@MorenoMdz
Copy link
Contributor

Can we reopen this issue? @maxgfr

@VictorioMolina
Copy link
Contributor

Same problem here.

@FrankEmiro
Copy link

exactly same issue here too, downloaded from lottiefiles.com, some idea how to convert them?

@bogda23
Copy link

bogda23 commented Nov 9, 2020

Same problem here. Lottie still crashes

@Svarto
Copy link

Svarto commented Nov 13, 2020

same here

1 similar comment
@mathlimma
Copy link

same here

@Cookizza
Copy link

Cookizza commented Dec 7, 2020

I know I have posted a workaround above, but in an ejected app it's possible to update lottie-ios and lottie-react-native to their latest versions via NPM and build the app, fixing this problem..

Is there a reason expo can't bump up their managed workflow versions?

@MorenoMdz
Copy link
Contributor

From what I understand they want/need to do it in a different way?

@MorenoMdz
Copy link
Contributor

I know I have posted a workaround above, but in an ejected app it's possible to update lottie-ios and lottie-react-native to their latest versions via NPM and build the app, fixing this problem..

Is there a reason expo can't bump up their managed workflow versions?

What workaround are you talking about? Right now I am having to use gif in my android app...

@natalyayyad
Copy link

same here...

@brentvatne
Copy link
Member

we don't plan on bumping the lottie dependency until SDK 41 at the earliest, and so you have to use a version of lottie animations that are compatible with your installed lottie version. sorry about the hassle!

@expo expo locked and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Lottie needs more info To be used when awaiting reporter response
Projects
None yet
Development

No branches or pull requests