Flutter BoringSSL-GRPC unable to install
Asked Answered
V

18

14

I am trying to install the package: cloud_firestore and am getting an error when running the pod install when installing the dependency BoringSSL-GRPC.
Is it possible for me to install the dependency another way and reference it/is there another issue that I am missing. Thank you in advance to anyone who can help!

    Downloading dependencies

    -> Installing BoringSSL-GRPC (0.0.3)
     > Git download
     > Git download
         $ /usr/bin/git clone https://github.com/google/boringssl.git /var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp --template=

    [!] Error installing BoringSSL-GRPC
    [!] /usr/bin/git clone https://github.com/google/boringssl.git /var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp --template=

    Cloning into '/var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp'...
    error: RPC failed; curl 18 transfer closed with outstanding read data remaining
    fatal: the remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:142:in `rescue in execute_command'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:139:in `execute_command'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/base.rb:154:in `block in executable'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/git.rb:79:in `block in clone'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:173:in `block in ui_sub_action'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:172:in `ui_sub_action'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/git.rb:77:in `clone'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/git.rb:45:in `download!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/base.rb:82:in `block in download'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:157:in `block in ui_action'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:156:in `ui_action'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/base.rb:80:in `download'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:108:in `download_source'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:75:in `download_request'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:171:in `download'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:154:in `block in uncached_pod'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:181:in `in_tmpdir'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:153:in `uncached_pod'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:42:in `download'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:557:in `install_source_of_pod'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:508:in `block (2 levels) in install_pod_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:86:in `titled_section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:507:in `block in install_pod_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:490:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:490:in `install_pod_sources'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:249:in `block in download_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:248:in `download_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:157:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods:
↳
         Cloning into '/var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp'...
         error: RPC failed; curl 18 transfer closed with outstanding read data remaining
         fatal: the remote end hung up unexpectedly
         fatal: early EOF
         fatal: index-pack failed

Error running pod install
Error launching application on iPhone 11.

Error

Viscera answered 5/5, 2020 at 0:29 Comment(5)
On Stack Overflow, please do not show pictures of text. Copy the text into the question itself and format it so it's easy to read, copy, and search.Miff
Cocoapods failed in the git clone step. I am not sure what's the root cause on your system, but I would suggest you run the pod install command with --verbose flag, see what exactly the command is, and try to run it outside of Cocoapods to debug.Giblet
I've tried following command on terminal, but also failed to install. git config --global http.postBuffer 1048576000 git config --global http.lowSpeedLimit 0 git config --global http.lowSpeedTime 999999 Could you find any solution?Furmenty
I could fix this issue by Muhamad Jalal's answer.Furmenty
is this the first time you ran the app or it was running before and then it broke?Emileemilee
H
6

I tried all many ways and none of them work. Then, I reboot my machine. And it works. Don't understand the reason !

Huggins answered 10/6, 2021 at 17:27 Comment(1)
From my side, I found the internet connection affected the installation process. After, I changed from a WIFI connection to an ethernet connection the installation process was completed.Cinerary
M
4

I got a slightly different error. I also got gunzip: (stdin): unexpected end of file but I saw a few hundred lines of base64 data above it.

I'm on OSX and it turns out that I have gnu coreutils installed which has a base64 version wasn't compatible to what was downloaded. I solved it by:

brew uninstall coreutils

Note: I opened a bounty on this question to no avail, and then I found this answer.

Methaemoglobin answered 26/6, 2022 at 16:18 Comment(1)
This was a lifesaver! I had to go a step further and remove my modified PATH pointing to /usr/local/opt/coreutils/libexec/gnubin and uninstall the x86_64 brew coreutils installation.Transhumance
F
3

Change all firebase dependencies I use to this versions solve my problem

 firebase_messaging: ^10.0.2
 firebase_auth: ^1.4.1
 cloud_firestore: ^2.2.1
 firebase_storage: ^8.1.3
 firebase_core: ^1.3.0
Fredericafrederich answered 19/6, 2021 at 9:2 Comment(4)
Installing Boringssl 0.0.7 was worked with old versions until 2021.4, but suddenly I couldn't install it again anymore from last month. I've tried with all other answers, but couldn't fix this issue in my case. Today I found your answer and fixed my issue. Thanks a lot.Furmenty
@Furmenty Happy to know, Keep it up Bro.Fredericafrederich
I tried these same version numbers but this had no effect, still facing this issue. Even if it would have solved the issue, this is now one year old and I want to use more recent versionsMethaemoglobin
which Flutter version do you use?Fredericafrederich
O
2

I had a very similar problem. Leaving solution here for anyone who it might help.

This is hard to believe. I root caused this issue to a wired ethernet adapter I was using. wifi and two other wired ethernet adapters worked.

Note that ethernet adapter seemed to work fine otherwise. The git clone worked fine from the command line, the issue only surfaced when ruby Process.spawn executed it!

Oversupply answered 10/3, 2021 at 20:16 Comment(0)
A
2

I turned off Wi-Fi and connected the internet with my iPhone(personal hotspot), the problem is solved.

Adi answered 1/5, 2024 at 11:42 Comment(0)
G
1

Here is what I did to solve the issue:

  1. flutter clean
  2. removed pod lock file
  3. removed pubspec.lock
  4. flutter pub get
  5. pod install
Gemina answered 25/11, 2021 at 5:52 Comment(0)
A
0

This method has worked for me.

Restart your terminal/code editor by killing and closing it then relaunch.

cd your-project-dir

cd ios

run

pod install

This will download all the dependencies. It might take some bit of time so ensure to wait.

NB: Ensure to have stable internet.
Allowed answered 21/8, 2020 at 20:29 Comment(1)
i tried this but instead i ran pod update, all libraries are up to date yet it still gives the same errorDianthe
T
0

I solved it by simply by doing:

  1. Remove all the pods and add BoringSSL-GRPC:

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'XXXXX' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  pod 'BoringSSL-GRPC'
end
  1. Execute (bash) pod install --repo-update
  2. Remove the pod 'BoringSSL-GRPC' and add again the other libraries

Podfile

...
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Storage'
  pod 'Firebase/Functions'
  pod 'Firebase/RemoteConfig'
  pod 'FirebaseFirestoreSwift', '~> 7.9-beta'
...
Tenaculum answered 31/3, 2021 at 19:42 Comment(2)
This is also not working on my side. Step No2 ( pod install --repo-update ) has the same issue.Furmenty
having the same issue, already step 2 (only installing boring ssl without anything else) is triggering this error for meMethaemoglobin
C
0

Download the latest version of flutter since most of the packages has switched to flutter3. Try deleting Podfile.lock, Pods directory, .symlinks directory and runner.xcworkspace file. Next run cd ios and then from the ios path run pod install --repo-update. If that doesn't work, try invalidating cache and restarting IDE. If that fails too try flutter pub cache clean. Please note that it will delete all your pub cache so you may have to run pub get on all projects.

Climactic answered 30/5, 2022 at 21:0 Comment(3)
thanks for providing an answer (actually the only one since I opened the bounty), but this also doesn't work for me. I tried also the pub cache clean and then pub get, but I still run into the same error: "base64: invalid input -- gunzip: (stdin): unexpected end of file"Methaemoglobin
Add the cloud firestore version as any in pubspec.yaml. delete pubspec.lock run pub get. Delete podfile.lock and then run pod install --repo-update and try once pleaseClimactic
I tried with the any version, still the same error. I didn't have the podfile.lock file though. Probably because pod install never worked.Methaemoglobin
C
0

Solution

  • Using VPN solved the issue and downloaded pods with no issue.
  • Does anyone possess insights into the specific root cause of this matter?

Tried Approces

I have tried all the solutions, but none of them worked for me, including...

  • Clean Up
  • Deleting the Pod.lock file
  • Updating brew and CocoaPods, followed by a clean installation
  • Updating buffer size
  • Configuring git config --global http.version HTTP/1.1
Carousal answered 9/12, 2023 at 18:44 Comment(0)
L
0

I encountered same issue despite trying numerous solutions. Surprisingly, the resolution came unexpectedly after I changed my WiFi network's name. This action, although seemingly unrelated, resolved the problem.

Lanitalank answered 16/12, 2023 at 4:43 Comment(0)
E
0

Quiting VPN solved this issue 😂 I don't know the reason.

Eyetooth answered 18/1, 2024 at 12:45 Comment(0)
G
0

in your podfile paste this line of code in your target 'Runner' do :

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'
note!: tag => '8.15.0' should be updated to the latest version).

it should look like this to avoid any interruption with your podfile setup

target 'Runner' do

  use_frameworks!

  use_modular_headers!
  
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.20.0'

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  target 'RunnerTests' do
    inherit! :search_paths

  end

end
Geibel answered 15/2, 2024 at 3:23 Comment(0)
S
0

For me it was due to incompatibility as I installed node_modules with a prior version of node which caused the issue when installing pods, especially with BoringSSL-GRPC and gRPC-Core pods. I upgraded my node version to v20 LTS and reinstalled node_modules and then reinstalled pods with pod install --repo-update and everything went smooth.

Scoggins answered 26/3, 2024 at 12:35 Comment(0)
C
0

This is a network issue try to change the network I was on wifi then I switched to my mobile hotspot then it get downloaded.

Cassidy answered 30/5, 2024 at 20:24 Comment(0)
E
0

Check your internet speed. If it's below 25 Mbps, switch to mobile data and try again.

Ephemeron answered 29/6, 2024 at 12:41 Comment(0)
W
0

I had the same issue. My solution was to switch to a faster internet and it worked well. After switching to a stable internet, I followed the following steps:

  1. flutter clean and flutter pub get

    $ flutter clean && flutter pub get

  2. cd/go to the ios folder

    $ cd ios

  3. Remove Pods foder, install cocoapods and install pod

    $ rm -rf Pods && gem install cocoapods && pod install

Successful pod update example screenshot.

Warplane answered 20/7, 2024 at 10:17 Comment(0)
P
0

Generate a New SSH Key (if you haven't already) by running ssh-keygen -t rsa -b 4096 -C "[email protected]" Now run This cat ~/.ssh/id_rsa.pub and copy your access key click here

and add the new key. Test SSH Connection: ssh -T [email protected] Sometimes, clearing the Git cache can resolve issues:

Clear Git Cache:

git gc --prune=now git remote prune origin Try Installing Pods Again: Now try pod install and it will work

Pallaten answered 23/7, 2024 at 11:36 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.