lottie-react-native / lottie-react-native

Lottie wrapper for React Native.
https://airbnb.io/lottie/#/react-native
Apache License 2.0
16.72k stars 1.77k forks source link

iOS pod installation fails on Mackbook Pro M1 #1180

Closed FaridMicrocis closed 8 months ago

FaridMicrocis commented 8 months ago

Description

When I run pod install, I get the below error:

[!] Error installing lottie-ios
[!] /usr/bin/git clone https://github.com/airbnb/lottie-ios.git /var/folders/nl/31c7y4xx28gbp00lhl8x7s5r0000gn/T/d20240211-18863-w6icl4 --template= --single-branch --depth 1 --branch 4.4.0

Cloning into '/var/folders/nl/31c7y4xx28gbp00lhl8x7s5r0000gn/T/d20240211-18863-w6icl4'...
error: RPC failed; curl 18 HTTP/2 stream 5 was reset
error: 6428 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

Note: I am able to install pod for any other library

Steps to Reproduce

  1. yarn add lottie-react-native
  2. cd ios && pod install

Expected behavior: pod installation should pass successfully

Actual behavior: pod installation fails

React Native Environment

react-native@0.71.3

Lottie Version

lottie-react-native@6.6.0

Version: x.x.x

TheRogue76 commented 8 months ago

Hi @FaridMicrocis From the logs you have given, this seems like a network error:

Cloning into '/var/folders/nl/31c7y4xx28gbp00lhl8x7s5r0000gn/T/d20240211-18863-w6icl4'...
error: RPC failed; curl 18 HTTP/2 stream 5 was reset
error: 6428 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet

Looking at the published Lottie-ios package, everything seems fine there. Please try with a different network config, and if it is still failing, please provide a reproducible

FaridMicrocis commented 8 months ago

@TheRogue76 thanks for your quick response. As I mentioned in the Note, this happens only for lottie-react-native. I have tested different libraries and the installation completes without any issue.

TheRogue76 commented 8 months ago

@TheRogue76 thanks for your quick response. As I mentioned in the Note, this happens only for lottie-react-native. I have tested different libraries and the installation completes without any issue.

Very well. Please provide a reproducible repository so I can do further investigation.

NoamKu95 commented 8 months ago

I get the following error when trying to pod install:

[Lottie React Native] Using install_modules_dependencies Auto-linking React Native modules for target fitnessTracker: BVLinearGradient, RNCAsyncStorage, RNCMaskedView, RNGestureHandler, RNKeychain, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-netinfo, and react-native-safe-area-context Framework build type is static library [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json [Codegen] generating an empty RCTThirdPartyFabricComponentsProvider Analyzing dependencies [Codegen] Found FBReactNativeSpec [Codegen] Found rncore [Lottie React Native] Using install_modules_dependencies Downloading dependencies Installing lottie-ios (4.4.0) Installing lottie-react-native (6.6.0) [!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod lottie-react-native depends upon glog, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

TheRogue76 commented 8 months ago

Hi @NoamKu95, Please fill out the issue template or provide a reproducible here so I can take a look. Without those, there is very little I can do.

batilio commented 8 months ago

glog

I'm facing the same issue here!

Steps to Reproduce

  1. yarn add lottie-react-native
  2. cd ios && pod install

Anyone could help us?

TheRogue76 commented 8 months ago

I am closing the issue. Please provide a proper reproducible when opening issues. It is getting tiresome trying to debug things without any context or info to go on. Software development isn't magic. And this project is community-driven, we are all doing this in whatever free time we can find. I have resisted adding a bot for moderating issue openings, but at the rate things have gone for the past couple of weeks I feel like that is the only way we will be able to get anything worthwhile done.

batilio commented 8 months ago

I get the following error when trying to pod install:

[Lottie React Native] Using install_modules_dependencies Auto-linking React Native modules for target fitnessTracker: BVLinearGradient, RNCAsyncStorage, RNCMaskedView, RNGestureHandler, RNKeychain, RNReanimated, RNSVG, RNScreens, lottie-react-native, react-native-netinfo, and react-native-safe-area-context Framework build type is static library [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json [Codegen] generating an empty RCTThirdPartyFabricComponentsProvider Analyzing dependencies [Codegen] Found FBReactNativeSpec [Codegen] Found rncore [Lottie React Native] Using install_modules_dependencies Downloading dependencies Installing lottie-ios (4.4.0) Installing lottie-react-native (6.6.0) [!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod lottie-react-native depends upon glog, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

I figure out the solution.

In my case the problem was the Xcode version, I had installed the 14.2 and after upgrade it to 15.2 the pod install command worked beautiful!

Good luck for your case!

fgagneten commented 8 months ago

For those who have that kind of issue, the only way to make it works is to add again lottie-ios: 4.4.1 in your package.json until lottie-react-native releases a new version using lottie-ios >= 4.4.1 (right now lottie-react-native is using lottie-ios: 4.4.0).

Lottie ios has the following issue that they fixed on version 4.4.1: https://github.com/airbnb/lottie-ios/issues/1830

TheRogue76 commented 8 months ago

airbnb/lottie-ios#1830

This issue is from December 2022, And the release they are talking about is 4.0.1, not 4.4.1. The git LFS stuff has not been relevant for a while, since we don't have any files on either side that are that large. The CI is also checking this, hence me asking for a reproducible or at least some info to be able to debug things. Also if you want to update Lottie iOS manually, please always patch the package's podspec. LRN will look for its declared dependency, and chances of things becoming too messy are high.

waseemmaya commented 7 months ago

did anyone find the solution for it?

momentiris commented 7 months ago

I had this problem just now (also only lottie) Actually "fixed" it by switching from my home wifi to mobile hotspot connection.

🤷

hoangdv198 commented 6 months ago

I had this problem just now (also only lottie) Actually "fixed" it by switching from my home wifi to mobile hotspot connection.

🤷

lmao that actually fixes it

Josh-Savvy commented 6 months ago

Hi guys. So, I was also getting errors running pod install. This same error:

[!] /usr/bin/git clone https://github.com/airbnb/lottie-ios.git /var/folders/nl/31c7y4xx28gbp00lhl8x7s5r0000gn/T/d20240211-18863-w6icl4 --template= --single-branch --depth 1 --branch 4.4.0

Cloning into '/var/folders/nl/31c7y4xx28gbp00lhl8x7s5r0000gn/T/d20240211-18863-w6icl4'...
error: RPC failed; curl 18 HTTP/2 stream 5 was reset
error: 6428 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

Here's what worked for me: I had to downgrade to lottie-react-native@5.1.3.

yarn add lottie-react-native@5.1.3
cd ios && pod install.

It worked and I stopped seeing the errors.

Device - Mac Monterey 12 My XCode version: 13.4.

asad-mehmood-vendian commented 5 months ago

try this command before running pod install or pod update

git config --global url."git@github.com:airbnb/lottie-ios.git".insteadOf https://github.com/airbnb/lottie-ios.git

AND

git config --global http.postBuffer 1048576000 # Set buffer to 1GB

abhilashbhosle commented 5 months ago

downgrading the version to npm i lottie-react-native@6.3.1 worked for me.

tnurdin commented 5 months ago

In package.json

Removing ^ sign helped me.

"lottie-react-native": "^6.7.2",  ==>> "lottie-react-native": "6.7.2",
vinodsantharam commented 4 months ago

I had this problem just now (also only lottie) Actually "fixed" it by switching from my home wifi to mobile hotspot connection.

🤷

Same experience. I used a better internet connection and it worked!

AhmadBerroV commented 3 months ago

I had this problem just now (also only lottie) Actually "fixed" it by switching from my home wifi to mobile hotspot connection.

🤷

This works perfectly man, you are a savior 👍

StreetGUY32 commented 1 month ago

Hi guys. So, I was also getting errors running pod install. This same error:

[!] /usr/bin/git clone https://github.com/airbnb/lottie-ios.git /var/folders/nl/31c7y4xx28gbp00lhl8x7s5r0000gn/T/d20240211-18863-w6icl4 --template= --single-branch --depth 1 --branch 4.4.0

Cloning into '/var/folders/nl/31c7y4xx28gbp00lhl8x7s5r0000gn/T/d20240211-18863-w6icl4'...
error: RPC failed; curl 18 HTTP/2 stream 5 was reset
error: 6428 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

Here's what worked for me: I had to downgrade to lottie-react-native@5.1.3.

yarn add lottie-react-native@5.1.3
cd ios && pod install.

It worked and I stopped seeing the errors.

Device - Mac Monterey 12 My XCode version: 13.4.

It works thanks mate!