Firebase-ios-sdk: Firebase Firestore could not build modules while archiving app

Created on 12 May 2018  Â·  18Comments  Â·  Source: firebase/firebase-ios-sdk

[REQUIRED] Step 2: Environment

  • Xcode version: 9.3
  • Firebase SDK version: 5.0
  • Firebase Component: Firestore
  • Component version: 0.12.0

[REQUIRED] Step 3: Describe the problem

I'm unable to finish archiving a project with Firebase 5.0. There are several closed issues for 4.10 with the same symptoms.

When archiving my project, I get the following errors:

RxLibrary-umbrella.h:23:9: Include of non-modular header inside framework module 'RxLibrary
GRPCCall.h:36:9: Could not build module 'RxLibrary'
ProtoRPC.h:20:9: Could not build module 'GRPCClient'
Firestore.pbrpc.h:21:9: Could not build module 'ProtoRPC'

Steps to reproduce:

My pod has the following:
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'FirebaseUI/Facebook'

Pods output:

Using FBSDKCoreKit (4.33.0)
Using FBSDKLoginKit (4.33.0)
Using Firebase (5.0.0)
Using FirebaseAnalytics (5.0.0)
Using FirebaseAuth (5.0.0)
Using FirebaseCore (5.0.0)
Using FirebaseFirestore (0.12.0)
Using FirebaseInstanceID (3.0.0)
Using FirebaseStorage (3.0.0)
Using FirebaseUI (5.0.0)

Relevant Code:

Create project and archive it. Use SDK 5.0.

firestore

Most helpful comment

This is https://github.com/grpc/grpc/issues/7406. Also discussed at https://github.com/firebase/firebase-ios-sdk/issues/898#issuecomment-374971715.

The workaround is to comment #import "transformations/GRXMappingWriter.h" line from gRPC_RxLibrary-umbrella.h.

More discussion at GoogleCloudPlatform/ios-docs-samples#30 and https://github.com/GoogleCloudPlatform/ios-docs-samples/blob/master/speech/Swift/Speech-gRPC-Streaming/BUILDFIXES

All 18 comments

I went ahead and updated my pod file to the following:

pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '5.0.0' pod 'FirebaseUI/Facebook'

I'm still getting the four errors.

Thanks,

This is https://github.com/grpc/grpc/issues/7406. Also discussed at https://github.com/firebase/firebase-ios-sdk/issues/898#issuecomment-374971715.

The workaround is to comment #import "transformations/GRXMappingWriter.h" line from gRPC_RxLibrary-umbrella.h.

More discussion at GoogleCloudPlatform/ios-docs-samples#30 and https://github.com/GoogleCloudPlatform/ios-docs-samples/blob/master/speech/Swift/Speech-gRPC-Streaming/BUILDFIXES

Thanks for the workaround. I got everything to work with it.

On Sat, May 12, 2018 at 8:06 AM Paul Beusterien notifications@github.com
wrote:

This is grpc/grpc#7406 https://github.com/grpc/grpc/issues/7406. Also
discussed at #898 (comment)
https://github.com/firebase/firebase-ios-sdk/issues/898#issuecomment-374971715
.

The workaround is to comment #import "transformations/GRXMappingWriter.h"
line from gRPC_RxLibrary-umbrella.h.

More discussion at GoogleCloudPlatform/ios-docs-samples#30
https://github.com/GoogleCloudPlatform/ios-docs-samples/issues/30 and
https://github.com/GoogleCloudPlatform/ios-docs-samples/blob/master/speech/Swift/Speech-gRPC-Streaming/BUILDFIXES

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-ios-sdk/issues/1266#issuecomment-388561282,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANI89V6eLtbIfTAAtG6EvifT1tykTb4Nks5txvpigaJpZM4T8R4u
.

The workaround paulb777 specified works great on local projects.
However, I'm building using Travis CI. There, it constantly crashes since local changes are not checked in.

Locally the errors are fixed indeed, but Travis builds still fail.

Thanks in advance!

@Julianvantveld you can work around this by checking in your Pods folder to git and not running pod install in CI.

@morganchen12 Thanks for your comment. However, when using multiple extensive libraries this is something I'd rather avoid doing.

I've submitted a Firebase Bug Report and got a response within 24 hours stating they are aware of the problem and working on it. A time estimate though wasn't given.

Fingers crossed they fix it soon.

NOTE: Firebase updates of 16th May (5.0.1) do not fix this issue.

Since this is a gRPC issue, the fix will be rolled out in a release of gRPC. It won't be tied to the Firebase release cycle.

How comes its been so many days and this still hasn't been fixed? Does anyone know if a fix is being worked on for the Pods? I can fix this in a local copy fine, but as @Julianvantveld said this is a huge issue for CI.

Add the following step to your CICD process after the pod install to automate the commenting workaround:

sed -i '' s@'#import "transformations\/GRXMappingWriter\.h"'@'\/\/#import "transformations\/GRXMappingWriter\.h'@g Pods/Target\ Support\ Files/gRPC-RxLibrary/gRPC-RxLibrary-umbrella.h

Used this a year or so ago to fix a gRPC build. Guess it has not yet been permanently fixed.

The other CI/CD friendly solution is to add

post_install do |installer|
    installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
        configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
    end
end

to your Podfile. Of course it's just a workaround until Firebase starts using the newest version of gRPC, because the issue has apparently been fixed there: https://github.com/grpc/grpc/pull/15531

To get the fix now you need something like this in your Podfile

pod 'gRPC', :git => 'https://github.com/grpc/grpc.git', :branch => 'master'
pod 'gRPC-Core', :git => 'https://github.com/grpc/grpc.git', :branch => 'master'
pod 'gRPC-ProtoRPC', :git => 'https://github.com/grpc/grpc.git', :branch => 'master'
pod 'gRPC-RxLibrary', :git => 'https://github.com/grpc/grpc.git', :branch => 'master'

Note that I don't recommend this for anything more than playing around.

Hey, thanks for all the info, since I'm on a production build whats the best option?

  1. Fallback the pod to the latest stable ex: 5.0.0?
  2. Point gRPC to git master?

I know the difference, but I'm not aware of critical bug fixes from 5.2 to 5.0 or the kind of problems I may run if I have to point these gRPC to the git master. any suggestions?

Thanks

@Rovel I recommend the workaround at https://github.com/firebase/firebase-ios-sdk/issues/1266#issuecomment-388561282, since it focused and non-intrusive. Its downside is that it needs to be redone after any pod install/update.

Note that the grpc fix is now available at the v1.13.0-pre1 tag, so you no longer have to target master to pull it in. I still wouldn't recommend this for production use but it's definitely coming.

Thanks for the workaround paulb777 (commented on May 12, 2018)

When will this be properly integrated into the framework?

As noted above: the fix is coming from gRPC in the 1.13.0 release. They're now on the third prerelease (v1.13.0-pre3).

gRPC 1.13.0 has now released and I confirmed that my test case successfully archives.

Was this page helpful?
0 / 5 - 0 ratings