Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Firestore could not build modules while archiving app #1266

Closed
jtressle opened this issue May 12, 2018 · 18 comments
Closed

Firebase Firestore could not build modules while archiving app #1266

jtressle opened this issue May 12, 2018 · 18 comments

Comments

@jtressle
Copy link

[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.

@jtressle
Copy link
Author

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,

@paulb777
Copy link
Member

This is grpc/grpc#7406. Also discussed at #898 (comment).

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

@jtressle
Copy link
Author

jtressle commented May 12, 2018 via email

@Julianvantveld
Copy link

Julianvantveld commented May 14, 2018

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!

@morganchen12
Copy link
Contributor

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

@Julianvantveld
Copy link

@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.

@morganchen12
Copy link
Contributor

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.

@nadimalam
Copy link

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.

@mmcc007
Copy link

mmcc007 commented Jun 1, 2018

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.

@siejkowski
Copy link

siejkowski commented Jun 1, 2018

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: grpc/grpc#15531

@wilhuff
Copy link
Contributor

wilhuff commented Jun 1, 2018

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.

@Rovel
Copy link

Rovel commented Jun 15, 2018

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

@paulb777
Copy link
Member

@Rovel I recommend the workaround at #1266 (comment), since it focused and non-intrusive. Its downside is that it needs to be redone after any pod install/update.

@wilhuff
Copy link
Contributor

wilhuff commented Jun 15, 2018

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.

hoantran added a commit to hoantran/lah that referenced this issue Jun 19, 2018
… use enum's rawValue, not hashValue

* To fix archive issue with third party library Firebase/Firestore, locally modified by commented out the GRXMappingWriter.h import in file Pods/Target Support Files/gRPC-RxLibrary/gRPC-RxLibrary-umbrella.h . Be sure to delete this file and pod update/install this Firebase/Firestore import again when the third party library is fixed. Refer to this link for furthere info: firebase/firebase-ios-sdk#1266

* Updated pod to:
  - Bolts (1.9.0)
  - BoringSSL (10.0.5)
  - Crashlytics (3.10.2)
  - FBSDKCoreKit (4.33.0)
  - FBSDKLoginKit (4.33.0)
  - FBSDKShareKit (4.33.0)
  - Fabric (1.7.7)
  - FacebookCore (0.3.1)
  - FacebookLogin (0.3.1)
  - FacebookShare (0.3.1)
  - Firebase (5.2.0)
  - FirebaseAnalytics (5.0.1)
  - FirebaseAuth (5.0.1)
  - FirebaseCore (5.0.3)
  - FirebaseFirestore (0.12.3)
  - FirebaseInstanceID (3.1.0)
  - GTMSessionFetcher (1.1.15)
  - GoogleToolboxForMac (2.1.4)
  - Protobuf (3.6.0)
  - gRPC (1.12.0)
  - gRPC-Core (1.12.0)
  - gRPC-ProtoRPC (1.12.0)
  - gRPC-RxLibrary (1.12.0)
  - leveldb-library (1.20)
  - nanopb (0.3.8)
@hoantran
Copy link

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

@yusuftor
Copy link

When will this be properly integrated into the framework?

@wilhuff
Copy link
Contributor

wilhuff commented Jun 28, 2018

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).

@paulb777
Copy link
Member

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

@firebase firebase locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests