Flutterfire: [cloud_firestore] unable to build iOS app; error with pod BoringSSL-GRPC

Created on 2 Jun 2020  ·  14Comments  ·  Source: FirebaseExtended/flutterfire

Describe the bug
Unable to build the iOS app of a new/fresh flutter project with cloud_firestore dependency. Works fine on android.
Some included header files for the pod BoringSSL-GRPC are missing.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new flutter project flutter create example
  2. Add latest version of cloud_firestore (^0.13.6) to pubspec.yaml
  3. Run flutter run
  4. Failed to build iOS app

Expected behavior
Building iOS app works fine.

Additional context
I also have a flutter project I created some months back and in that project upgrading to the latest version of cloud_firestore is no problem. Only for new projects I create I have that issue.
As far as I can tell adding the GoogleService-Info.plist file changes nothing. I already tried creating a new flutter project, registering my iOS app on firebase and adding the GoogleService-Info.plist file. This resulted in the same error.
Output of flutter run:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...                                                  

Xcode build done.                                           41,3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Volumes/IVLIVS_DEV/_DEV/tinyapps/example/ios/Pods/BoringSSL-GRPC/src/crypto/asn1/a_octet.c:57:10: fatal error: 'openssl/asn1.h' file not found
    #include <openssl/asn1.h>
             ^~~~~~~~~~~~~~~~
    1 error generated.
    /Volumes/IVLIVS_DEV/_DEV/tinyapps/example/ios/Pods/BoringSSL-GRPC/src/crypto/asn1/a_print.c:57:10: fatal error: 'openssl/asn1.h' file not found
    #include <openssl/asn1.h>
             ^~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

Flutter doctor
Run flutter doctor and paste the output below:

Doctor summary (to see all details, run flutter doctor -v):
Unable to find any JVMs matching version "1.8".
Unable to find any JVMs matching version "1.8".
[✓] Flutter (Channel dev, 1.19.0-2.0.pre, on Mac OS X 10.15.5 19F101, locale de-DE)
⣟Unable to find any JVMs matching version "1.8".

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] Connected device (3 available)

! Doctor found issues in 1 category.
crowd ios cloud_firestore bug

All 14 comments

Here is the verbose output of both flutter doctor and flutter run:

flutter doctor -v.txt
flutter run -v.txt

Hi @IVLIVS-III

Created a new project, using cloud_firestore: ^0.13.5 and execute pod install and it runs fine.

Screenshot 2020-06-03 at 3 34 12 PM

Thank you

I can confirm that installing the pods is not my problem, works fine for me as well. After installing the pods the app fails to build for iOS.

I created a new project with cloud_firestore: 0.13.5 and the issue persists.
The steps I took:

  1. flutter create
  2. add cloud_firestore: 0.13.5 to pubspec.yaml
  3. pod install in ios directory
  4. configure signing in Xcode
  5. flutter run
ivlivs@IVLIVS-MBP tinyapps % flutter create example
Creating project example...
  example/.gitignore (created)
  example/.idea/libraries/Dart_SDK.xml (created)
  example/.idea/libraries/KotlinJavaRuntime.xml (created)
  example/.idea/modules.xml (created)
  example/.idea/runConfigurations/main_dart.xml (created)
  example/.idea/workspace.xml (created)
  example/.metadata (created)
  example/android/app/build.gradle (created)
  example/android/app/src/main/kotlin/com/example/example/MainActivity.kt (created)
  example/android/build.gradle (created)
  example/android/example_android.iml (created)
  example/android/.gitignore (created)
  example/android/app/src/debug/AndroidManifest.xml (created)
  example/android/app/src/main/AndroidManifest.xml (created)
  example/android/app/src/main/res/drawable/launch_background.xml (created)
  example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created)
  example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created)
  example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created)
  example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created)
  example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created)
  example/android/app/src/main/res/values/styles.xml (created)
  example/android/app/src/profile/AndroidManifest.xml (created)
  example/android/gradle/wrapper/gradle-wrapper.properties (created)
  example/android/gradle.properties (created)
  example/android/settings.gradle (created)
  example/ios/Runner/AppDelegate.swift (created)
  example/ios/Runner/Runner-Bridging-Header.h (created)
  example/ios/Runner.xcodeproj/project.pbxproj (created)
  example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
  example/ios/.gitignore (created)
  example/ios/Flutter/AppFrameworkInfo.plist (created)
  example/ios/Flutter/Debug.xcconfig (created)
  example/ios/Flutter/Release.xcconfig (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created)
  example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created)
  example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] (created)
  example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created)
  example/ios/Runner/Base.lproj/LaunchScreen.storyboard (created)
  example/ios/Runner/Base.lproj/Main.storyboard (created)
  example/ios/Runner/Info.plist (created)
  example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created)
  example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
  example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
  example/ios/Runner.xcworkspace/contents.xcworkspacedata (created)
  example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
  example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
  example/lib/main.dart (created)
  example/example.iml (created)
  example/pubspec.yaml (created)
  example/README.md (created)
  example/test/widget_test.dart (created)
  example/web/favicon.png (created)
  example/web/icons/Icon-192.png (created)
  example/web/icons/Icon-512.png (created)
  example/web/index.html (created)
  example/web/manifest.json (created)
Running "flutter pub get" in example...                             3,2s
Wrote 76 files.

All done!
Unable to find any JVMs matching version "1.8".
Unable to find any JVMs matching version "1.8".
Unable to find any JVMs matching version "1.8".
[✓] Flutter: is fully installed. (Channel dev, 1.19.0-2.0.pre, on Mac OS X 10.15.5 19F101, locale de-DE)
[✓] Android toolchain - develop for Android devices: is fully installed. (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS: is fully installed. (Xcode 11.5)
[✓] Chrome - develop for the web: is fully installed.
[!] Android Studio: is not available. (not installed)
[✓] Connected device: is fully installed. (3 available)

Run "flutter doctor" for information about installing additional components.

In order to run your application, type:

  $ cd example
  $ flutter run

Your application code is in example/lib/main.dart.

ivlivs@IVLIVS-MBP tinyapps % cd example 
ivlivs@IVLIVS-MBP example % flutter pub get
Running "flutter pub get" in example...                             3,2s

ivlivs@IVLIVS-MBP example % cd ios 
ivlivs@IVLIVS-MBP ios % pod install
Analyzing dependencies
Downloading dependencies
Installing BoringSSL-GRPC (0.0.7)
Installing Firebase (6.25.0)
Installing FirebaseAnalytics (6.5.1)
Installing FirebaseAuthInterop (1.1.0)
Installing FirebaseCore (6.7.1)
Installing FirebaseCoreDiagnostics (1.3.0)
Installing FirebaseCoreDiagnosticsInterop (1.2.0)
Installing FirebaseFirestore (1.14.0)
Installing FirebaseInstallations (1.2.0)
Installing Flutter (1.0.0)
Installing GoogleAppMeasurement (6.5.1)
Installing GoogleDataTransport (6.1.1)
Installing GoogleDataTransportCCTSupport (3.1.0)
Installing GoogleUtilities (6.6.0)
Installing PromisesObjC (1.2.8)
Installing abseil (0.20200225.0)
Installing cloud_firestore (0.0.1)
Installing cloud_firestore_web (0.1.0)
Installing firebase_core (0.0.1)
Installing firebase_core_web (0.1.0)
Installing gRPC-C++ (1.28.2)
Installing gRPC-Core (1.28.2)
Installing leveldb-library (1.22)
Installing nanopb (1.30905.0)
Generating Pods project
Integrating client project
Pod installation complete! There are 5 dependencies from the Podfile and 24 total pods installed.

[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
ivlivs@IVLIVS-MBP ios % cd ..                                                                                                                                          ivlivs@IVLIVS-MBP example % open ios/Runner.xcodeproj 
ivlivs@IVLIVS-MBP example % flutter run              
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...

Running pod install...                                             15,3s
Running Xcode build...                                                  

Xcode build done.                                           61,3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Volumes/IVLIVS_DEV/_DEV/tinyapps/example/ios/Pods/BoringSSL-GRPC/src/crypto/x509/a_digest.c:57:10: fatal error: 'openssl/x509.h' file not found
    #include <openssl/x509.h>
             ^~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
ivlivs@IVLIVS-MBP example % 

I am having the same issue. the app runs fine on Android emulator but could not run on iOS. Have you found a way out??

i have the same issue too. Can i change to any older versions ?

confirmed cloud_firestore 0.13.4+2 works like a charm

Am still struggling with this firestore issue. I can’t stop thinking of ways to solve it... can you explain more on how you worked it out?

Just try and error😂

「Shehu S Kangiwa notifications@github.com」在 2020年6月7日 週日,下午12:20 寫道:

Am still struggling with this firestore issue. I can’t stop thinking of
ways to solve it... can you explain more on how you worked it out?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FirebaseExtended/flutterfire/issues/2686#issuecomment-640154657,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABB3B52HDXCSC6D4CMBZM3TRVMISFANCNFSM4NQ2ED5Q
.

0.13.4+2 doesnt work. is there any work around for this ?
Edit: nevermind. to get it working i did flutter clean

Really? can you show me the pubspec.yaml ?

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.
www.avast.com
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, 10 Jun 2020 at 06:09, crushman1 notifications@github.com wrote:

0.13.4+2 doesnt work. is there any work around for this ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FirebaseExtended/flutterfire/issues/2686#issuecomment-641607822,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABB3B56BQTUXBDUF563XABLRV2XH7ANCNFSM4NQ2ED5Q
.

Really? can you show me the pubspec.yaml ? https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, 10 Jun 2020 at 06:09, crushman1 @.*> wrote: 0.13.4+2 doesnt work. is there any work around for this ? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#2686 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABB3B56BQTUXBDUF563XABLRV2XH7ANCNFSM4NQ2ED5Q .

Thanks for responding but it got fixed with flutter clean

Haha..
It means old version working.
「crushman1 notifications@github.com」在 2020年6月10日 週三,上午9:56 寫道:

Really? can you show me the pubspec.yaml ?
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free. www.avast.com
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
… <#m_-2890503705658157584_>
On Wed, 10 Jun 2020 at 06:09, crushman1 @.*> wrote: 0.13.4+2 doesnt
work. is there any work around for this ? — You are receiving this because
you commented. Reply to this email directly, view it on GitHub <#2686
(comment)
https://github.com/FirebaseExtended/flutterfire/issues/2686#issuecomment-641607822>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABB3B56BQTUXBDUF563XABLRV2XH7ANCNFSM4NQ2ED5Q
.

Thanks for responding but it got fixed with flutter clean


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/FirebaseExtended/flutterfire/issues/2686#issuecomment-641673073,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABB3B55LIEEES77YWXIHSGDRV3R4RANCNFSM4NQ2ED5Q
.

Hey all, as part of our on-going work for #2582, the project structure/setup for iOS & MacOS in our Firebase Firestore rework (#2913) has been improved which should help with this along with using the new pre-compiled Firestore binaries to improve build times.

The rework has now been merged into master. We'll look at publishing some prereleases in the next few days. Thank you

Still facing the same issue with all new firebase products

Xcode's output:

/Volumes/IVLIVS_DEV/_DEV/tinyapps/example/ios/Pods/BoringSSL-GRPC/src/crypto/x509/a_digest.c:57:10: fatal error: 'openssl/x509.h' file not found
#include
^~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

Was this page helpful?
0 / 5 - 0 ratings