Reputation: 61
I'm trying to install FirebaseFirestore via CocoaPods in my iOS project, but I'm encountering an error.
cd ios
pod install
But I get the following error:
Analyzing dependencies
Pre-downloading: FirebaseFirestore
from https://github.com/invertase/firestore-ios-sdk-frameworks.git
, tag 8.9.0
[!] Error installing FirebaseFirestore [!] Failed to download 'FirebaseFirestore': [!] /usr/local/bin/git clone https://github.com/invertase/firestore-ios-sdk-frameworks.git /var/folders/z1/04dt8mk50cd6bfbcmkl7ms880000gn/T/d20231214-7337-182dc50 --template= --single-branch --depth 1 --branch 8.9.0
Cloning in «/var/folders/z1/04dt8mk50cd6bfbcmkl7ms880000gn/T/d20231214-7337-182dc50»... error: RPC failed; curl 18 HTTP/2 stream 5 was reset error: 4613 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: abrupt end of file fatal: fetch-pack: invalid index-pack output
How can I fix it, can you please help me
Upvotes: 6
Views: 5557
Reputation: 1831
I encountered the same issue, at first I thought it was the Firestore SDK size issue in iOS which should be resolved with https://github.com/invertase/firestore-ios-sdk-frameworks.git
.
Turns out it was caused by some DNS issue? After I used the Cloudflare 1.1.1.1 DNS then it solved the issue for me.
Upvotes: 2
Reputation: 15
Retry the Installation: Run the pod install command again. Sometimes, network issues can be temporary, and a retry might succeed.
Use HTTPS Instead of SSH: In your Podfile, change the source URL from SSH to HTTPS. Modify the line for the Firebase pod in your Podfile to look like this: pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.9.0'
Update CocoaPods: Make sure you have the latest version of CocoaPods installed.
You can update it using: sudo gem install cocoapods
Clear CocoaPods Cache: Clear the CocoaPods cache and try installing again: pod cache clean --all After that pod install
GitHub Rate Limit: GitHub has rate limits for unauthenticated requests. If you are hitting these limits, consider authenticating with GitHub using a personal access token. You can create one in your GitHub account settings and use it in your Podfile: pod 'FirebaseFirestore', :git => 'https://@github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.9.0'
After trying these steps, attempt to run pod install again and see if the issue persists. If the problem continues, there might be an issue with the GitHub repository itself, and you may need to check the repository status or contact the repository maintainers for assistance.
Upvotes: -4