Firebase-ios-sdk: Carthage Firebase 6.6 reports error Unable to find module header

Created on 13 Aug 2019  路  40Comments  路  Source: firebase/firebase-ios-sdk

[READ] Step 1: 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__ make sure the issue title starts with "FR:".

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 10.3
  • Firebase SDK version: 6.6
  • Firebase Component: Firebase
  • Component version: 6.6

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

carthage update --platform iOS
upgrades to 6.6, I had to revert to 6.5 by forcing the Cartfile to point to "== 6.5"

error occurs when building my project in Xcode:

/Users/user/Projects/Dem/Carthage/Build/iOS/Firebase.framework/Modules/module.modulemap:3:10: warning: skipping 'Firebase.h' because module declaration of 'Firebase' lacks the 'framework' qualifier
header "Firebase.h"
^
/Users/user/Projects/Dem/Carthage/Build/iOS/Firebase.framework/Modules/module.modulemap:1:1: note: use 'framework module' to declare module 'Firebase'
module Firebase {
^
/Users/user/Projects/Dem/Carthage/Build/iOS/Firebase.framework/Modules/module.modulemap:3:10: warning: skipping 'Firebase.h' because module declaration of 'Firebase' lacks the 'framework' qualifier
header "Firebase.h"
^
/Users/user/Projects/Dem/Carthage/Build/iOS/Firebase.framework/Modules/module.modulemap:1:1: note: use 'framework module' to declare module 'Firebase'
module Firebase {
^
/Users/user/Projects/Dem/Carthage/Build/iOS/Firebase.framework/Modules/module.modulemap:3:10: error: header 'Firebase.h' not found
header "Firebase.h"
^
:0: error: could not build Objective-C module 'Firebase'

Carthage

Most helpful comment

The problem is that Firebase module definition at Carthage/Build/iOS/Firebase.framework/Modules/module.modulemap is missing the framework specifier.

The simplest workaround is to edit the file to include it:

framework module Firebase {
  export *
  header "Firebase.h"
}

We'll look into posting a 6.6.1 version of FirebaseAnalyticsBinary with the fix.

All 40 comments

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@possen Thanks for the report. We'll take a look.

Another workaround would likely be to copy the 6.5.0 Firebase.framework to a 6.6.0 installation.

I have the same problem ((

When I manually download Firebase.framework version 6.5.0 and replace this file, the compilation stops with an error

ld: warning: Could not find auto-linked framework 'Firebase'
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GDTTransport", referenced from:
      objc-class-ref in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Similarly, if I replace all the files from Analytics-fe0669fafb68cf16.zip

Sorry about the trouble! I'll try to get a fix up early tomorrow for this.

Had this issue (all of sudden and unexpectedly), took some time to figure out what the probable cause might be.

I simply restricted Carthage to only using version 6.5.0

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 6.5.0

not sure if it work for all the libraries, but the ones I'm using worked find

I simply restricted Carthage to only using version 6.5.0

It's a good, though temporary, solution.
Well, we're waiting for an update from the project maintainers.

The problem is that Firebase module definition at Carthage/Build/iOS/Firebase.framework/Modules/module.modulemap is missing the framework specifier.

The simplest workaround is to edit the file to include it:

framework module Firebase {
  export *
  header "Firebase.h"
}

We'll look into posting a 6.6.1 version of FirebaseAnalyticsBinary with the fix.

Thanks @paulb777.

Its working fine now.

Its working fine now.

Anyone who reads this and thinks it should work as planned now. Nothing like that. This works if you make changes to module.modulemap, but version 6.6.1 is still not released.

@petrovi4 Yep, sorry it doesn't look like we'll get a 6.6.1 in. Instead we expect the module.modulemap fix to occur in this week's 6.7.0.

I have the same problem ((

When I manually download Firebase.framework version 6.5.0 and replace this file, the compilation stops with an error

ld: warning: Could not find auto-linked framework 'Firebase'
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GDTTransport", referenced from:
      objc-class-ref in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Similarly, if I replace all the files from Analytics-fe0669fafb68cf16.zip

How did you fix this issue? My CartFile has like this: binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" == 6.5.0 and after carthage update I still have this issue.

@kkendall33 If the 6.6.0 FirebaseCoreDiagnostics.framework is included, also include the 6.6.0 GoogleDataTransport.framework.

@kkendall33 If the 6.6.0 FirebaseCoreDiagnostics.framework is included, also include the 6.6.0 GoogleDataTransport.framework.

Could you help me find the right path for that? I'm assuming you mean include it with Carthage?

It's in the Analytics folder of the Carthage distribution.

do we have a working solution yet peeps? still running into the issue and my CI is freaking out :(

Sorry, we're transitioning to improved tooling that will make the Carthage generation and publishing more reliable in the long run. However, going through a few hiccups in getting it right. We expect to get Carthage 6.7.0 out in the next day or two.

Apologies for the delay - Firebase 6.7.0 is now available on Carthage and should include the updated modulemap. Please re-open this issue if you're still seeing the bug after updating to 6.7.0! Thanks for everyone's patience while we transition our tooling.

When using the _manual zip file_ to upgrade Firebase 6.5.0 to 6.7.0 the same errors occurs in Xcode, this was also the case with 6.6.0.

I'm guessing this is related to this?

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GDTTransport", referenced from:
      objc-class-ref in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
  "_GDTLog", referenced from:
      -[FIRCoreDiagnosticsLog transportBytes] in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
      _FIRPopulateProtoWithCommonInfoFromApp in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Still seeing this too. Updated using carhage 6.5.0 -> 6.7.0

@rowanmulder @ValCanBuild are you seeing the modulemap issue still, or just the Unidentified symbols issue?

The 6.7.0 zip (and Carthage distribution) include additional frameworks in the Analytics folder. Make sure that all of the additions get added to the project.

I had the same problem with undefined symbols GDTTransport and GDTLog.
I have solved the problem by adding the two new frameworks GoogleDataTransport.framework and GoogleDataTransportCCTSupport.framework in Carthage/Build/iOS directory to the project.

I also had an additional error:
error: Carthage/Build/iOS/FirebaseFirestore.framework/gRPCCertificates-Cpp.bundle: No such file or directory
The bundle has been moved from FirebaseFirestore.framework to gRPC-C++.framework.
(The documentation at https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md contains the old path.)

Thanks @mariancerny that helped. Adding GoogleDataTransport.framework was enough to fix it for me (I only use Firebase for auth)

@ryanwilson Sorry my bad, I was missing the new libraries when building the project. I've added the ones @mariancerny (thx!) mentioned for Google Data Transport.

Maybe we can make the documentation more clear for upgrades when libraries get renamed/deleted/added, eg. add it to the release notes or readme.md?

@rowanmulder the doc still talk about copying the gRPCCertificates-Cpp.bundle out of the FirebaseFirestore.framework but its moved to the gRPC-C++.framework as mentioned by @mariancerny we should update the documentation.

Thanks @hixfield. Fixed in #3700.

I had the same problem with undefined symbols GDTTransport and GDTLog.
I have solved the problem by adding the two new frameworks GoogleDataTransport.framework and GoogleDataTransportCCTSupport.framework in Carthage/Build/iOS directory to the project.

I also had an additional error:
error: Carthage/Build/iOS/FirebaseFirestore.framework/gRPCCertificates-Cpp.bundle: No such file or directory
The bundle has been moved from FirebaseFirestore.framework to gRPC-C++.framework.
(The documentation at https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md contains the old path.)

How to Add GoogleDataTransport.framework and GoogleDataTransportCCTSupport.framework ?

@RanjeetStiga Both GoogleDataTransport.framework and GoogleDataTransportCCTSupport.framework are in the Analytics folder.

This problem is still not fixed in latest release, 6.8.1.

https://github.com/firebase/firebase-ios-sdk/issues/3578#issuecomment-521043915

Using XCode 10.3

@RanjeetStiga Both GoogleDataTransport.framework and GoogleDataTransportCCTSupport.framework are in the Analytics folder.

Thanks it's work .

I have have the same problem

I manually download Firebase.framework version 6.1.0 and Crashlytics 3.14.0
Now when I replaced the framework files while updating from 6.1.0 -> 6.9.0

ld: warning: directory not found for option '-F/Users/MyUser/MyCompany/MyApp/Frameworks'
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GDTCORTransport", referenced from:
objc-class-ref in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
"_GDTCORLog", referenced from:
-[FIRCoreDiagnosticsLog transportBytes] in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
_FIRPopulateProtoWithCommonInfoFromApp in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

As suggested by @paulb777 I added the following two frameworks:
GoogleDataTransport.framework and GoogleDataTransportCCTSupport.framework

Now if I debug application on devices that already have my application, it does not stop on breakpoints.

For installing on new devices it gives error:

Could not locate installed application
_Install claimed to have succeeded, but application could not be found on device. bundleId = com.XXX.XXXXXXXX_

If i run it on simulator it gives error"
This app could not be installed at this time.
_Could not install at this time.
Failed to load Info.plist from bundle at path /Users/myUser/Library/Developer/CoreSimulator/Devices/B9775552-65FA-4C1E-8051-06922702A4BC/data/Library/Caches/com.apple.mobile.installd.staging/temp.eJW69a/extracted/Payload/MyApp.app/Frameworks/GoogleDataTransport.framework_

@shahabafridi85 Likely you have a mix of Firebase frameworks from different releases.

I'd recommend removing all of them and installing only from 6.9.0

I'm experiencing the same issue as @shahabafridi85. I downloaded the SDK and added it to the project manually. I deleted the previous files from my project and added what was newly downloaded, so there's no mix. Can't install on neither the simulator nor device. Seeing exact same errors. Any other suggestions?

@annca Yes I did resolved the issue.
Thanks @paulb777 for your suggestion. The issue was not because fo the mix of Firebase frameworks from different releases.

Before I was adding the frameworks by adding the plus (+) on the Embedded Framework section in the Target.
The issue was resolved by deleting the frameworks from old release and then adding the new release frameworks by dragging and dropping in the Project Navigator.

I hope it help you.

Ah got it. Confirming that this helped me resolve the issue as well. Thanks!!!

I have the same error,

ld: warning: Could not find auto-linked framework 'Firebase'
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_GDTCORTransport", referenced from:
      objc-class-ref in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
  "_GDTCORLog", referenced from:
      -[FIRCoreDiagnosticsLog transportBytes] in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
      _FIRPopulateProtoWithCommonInfoFromApp in FirebaseCoreDiagnostics(FIRCoreDiagnostics.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

And not able to solve by any suggested methods. It takes all day. Still it stucks.

The related part of my carthage file:

binary "https://building42.github.io/Specs/Carthage/iOS/Fabric.json"
binary "https://building42.github.io/Specs/Carthage/iOS/Crashlytics.json"

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"

@ahmeric It looks like the GoogleDataTransport.framework is missing or it's an old version.

As the original poster, I just wanted to confirm that I was able to upgrade to 6.9.0, by removing the "== 6.5" from the Cartfile. Thank you.

Thanks, @paulb777 it has solved my problem. But until today, it was working without adding this framework to the linked libraries.

I am still experiencing this issue. Any viable solution?

Was this page helpful?
0 / 5 - 0 ratings