Skip to content

Build error in FirebaseCoreDiagnostics >= 7.2.0 #7098

@mikehardy

Description

@mikehardy

Step 0: Are you in the right place?

  • For issues or feature requests related to the code in this repository
    file a Github issue.
    • If this is a feature request please use the Feature Request template.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general (non-iOS) Firebase discussion, use the firebase-talk
    google group.
  • For backend issues, console issues, and other non-SDK help that does not fall under one
    of the above categories, reach out to
    Firebase Support.
  • Once you've read this section and determined that your issue is appropriate for
    this repository, please delete this section.

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.2
  • Firebase SDK version: 7.1.0, 7.2.0
  • Installation method: CocoaPods
  • Firebase Component: FirebaseCoreDiagnostics dependents (Auth, InAppMessaging, RemoteConfig etc)

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

I think there may be two issues, related. Both have the same ultimate build error

  1. Pod dependency issues:

When 7.1.0 was originally released, everything built fine. Now with 7.2.0 out, 7.1.0 no longer builds correctly.

I believe some of the podspecs allow a few of the transitive dependencies to slip the bonds of the requested version (7.1.0) and move to 7.2.0. Specifically, these pods will go to 7.2.0 on a fresh install of 7.1.0 Firebase/* pods - here's a snippet from where I was pinning them in my test app Podfile to see what Podfile.lock would look like - each would go to 7.2.0 (or 7.2.0-beta for FirebaseMLCommon) despite a request for the related 7.1.0 Pods (e.g. 'Firebase/InstanceID', $FirebaseSDKVersion with 7.1.0 would get me `FirebaseInstanceID of 7.2.0. In fact, this seems to happen even if I try 7.0.0 now because it is still semver compatible with 7.2.0 according to the version constraints.

  #pod 'FirebaseABTesting', $FirebaseSDKVersion
  #pod 'FirebaseCoreDiagnostics', $FirebaseSDKVersion
  #pod 'FirebaseInstallations', $FirebaseSDKVersion
  #pod 'FirebaseInstanceID', $FirebaseSDKVersion
  #pod 'FirebaseMLCommon', "#{$FirebaseSDKVersion}-beta"
  1. Build error in FirebaseCoreDiagnostics >= 7.2.0

❌  /Users/mike/work/Invertase/react-native-firebase/tests/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m:20:9: 'GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h' file not found

#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h"
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Normally I would trust the internal versioning to be okay, but in this case the rest of the internal 7.2.0 changes are fine except FirebaseCoreDiagnostics. That one has a build error as above.

When I try to use 7.2.0 completely - which I was testing after fixing a firestore compile issue this morning - it still fails.

I maintain a fully scripted react-native-firebase demonstrator where you can see how we construct a clean project and add our dependencies, then investigate the resulting Podfile - it fails to compile now with 7.x.x

https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh

You'll need node + yarn installed to run it, plus a 'GoogleServices-plist.json' and 'google-services.json' to your favorite example project (they're unused unless you run the demo and even then the demo doesn't actually do anything other than prove it builds and runs, if you're curious)

I'm not sure what the root cause of the error is but I reproduce it in FlutterFire (where I'm trying to get firebase-ios-sdk >=7 supported - firebase/flutterfire#4249), my work app, and react-native-firebase which I maintain and normally know what I'm doing, except when a hit a build error and feel lost ;-). Our test app no longer works unless I use 7.1.0 and in our app Podfile pin FirebaseCoreDiagnostics to 7.1.0

Help?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions