-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[iOS] Error building Firebase, gRPC-C++ fatal error: 'chrono' file not found #1916
Comments
Hi again, I just updated to Firebase 5.7.0 and the same app builds and runs perfectly. It seems this version doesn't use gRPC-C++
|
Your problem here relates to the Xcode header map. The specific problem is that gRPC-C++ includes a file named time.h and there's a system header with the same name. gRPC-C++ disables the header map for itself, but that's apparently not enough. Disable the setting "Use header maps" in your project to proceed. |
I've been trying to get this working by disabling the header map and using 5.9.0 (i.e. not downgrading). Our build is succeeding locally always, but failing about 50% of the time on Buddybuild. I'm wondering if anyone has successfully got this working via disabling the header map? |
Nope, I've been trying for two days for all Firebase / RNFirebase version combos without success. |
Our builds are also failing on CircleCI somewhat randomly. Have tried tweaking the header map settings in our own project but to no avail. But, the errors I'm seeing are originating in RNFirebase so I guess this should be tracked there (see issue referenced above) |
I also tried messing with headers with no success. I just solved the build error deintegrating pods and installing Firebase 5.9.0 again. It still wasn’t working until I switched to Legacy Build System in Xcode. Don’t like it that much but that’ll do for now. |
This doesn't affect the build, still broken |
Any developments on this one? |
Could someone share a project (ideally minimal) that's in this state? The steps to reproduce above are nontrivial. We don't formally support react native, don't test with it, and don't have a ton of experience with it. While I'd like to help I just don't have the kind of time it would take to reproduce this from the instructions above. |
@wilhuff The instructions for getting this starter project going, with MacOS High Sierra and XCode 10.1 seem to reproduce it: https://github.com/invertase/react-native-firebase-starter |
On macOS 10.13.6, with CocoaPods 1.5.3 I can't reproduce with:
I know this isn't a figment of your imagination, so there's got to be something else about your configuration that triggers this. Any ideas? |
Latest react-native-firebase-starter seems to succeed when building the workspace in Xcode, but not when running macOS 10.14, Xcode 10.1 and CocoaPods 1.5.3. |
That's what I'm doing. I also built directly in Xcode but that made no difference as far as I can see. |
I've been getting this exact same error too. Super frustrating. I had turned the legacy build system on to "fix" it, but on a hunch, I started importing RNFirebase via pods rather than via the link step. Then I turned on the new build system, cleaned the build folder, and it all works now. Maybe something about compiling the project through Pods rather than through a manual import fixes it. To make the switch, add I'm going try to build for production on CI and see if it works there as well. Update: the archive step works on CI |
I've been able to resolve this issue by setting the build system to
Will try out @noahtallen solution next, since we have to make the switch to the |
How do you handle the reference to React in Pod deps after that? What does your Podfile look like? |
@FullstackJack Here's my current pod file. I'm not 100% on what/why of the subspecs, since I use a ton of stuff from react-native that seems as if it should use a subspec that I haven't specified. My guess is that some of the react-native stuff has been manually linked at some point, perhaps at setup. This project is more than a year old and has been through a few react-native updates :P
|
@noahtallen Yeah, the sub specs for RN is what I find most annoying about listing React in the podfile because there could be 30 or so. Thanks for posting this. Your post install section looks like black magic voodoo. How did you decide to "remove" React pod from project and other bits? |
That section isn’t really due to rhyme or reason, just to the fact that I’ve had to fix so many things with the build when upgrading different things.. and that’s basically how it has materialized over several months of that. I’m 100% sure that could be cleaned up. My guess is that react is manually linked and needs removed before pod link? I forget what it actually fixed at the time. I might spend some time messing around with that later now that you mention it. The google maps solution is specific to some build error we had with react-native-maps. Suffice to say that it does work now :p |
I've been fighting this issue for a few weeks. Would suggest: delete your customized HEADER_SEARCH_PATHS at the project level. |
@noahtallen What does your xcworkspace project looks like? When I list React under Podfile, the Xcode project builds successfully but the Metro bundler complains about a duplicate module for
|
Our current hypothesis is that project-level misconfiguration of HEADER_SEARCH_PATHS or related settings, possibly generated by CocoaPods, is the cause of this issue. We've been unable to reproduce this. Closing this issue for now, but if someone is still experiencing this problem, please share a tarball of your project (i.e. after running |
As @wilhuff mentioned, this should be an issue with misconfiguration of HEADER_SEARCH_PATHS or related settings by CocoaPods. Removing |
any fix for this ? I can give you project that has this error if you want to have a look at it? |
See my reply in detail here: #2260 (comment). In short, your project is misconfigured such that HEADER_SEARCH_PATHS is somehow picking up files that are under the Pods directory. Scrutinize all recursive entries carefully. |
@wilhuff THANK YOU SO MUCH!!!!!! THANK YOU!!!! |
I’m glad you’re fixed up. I don’t twitter so don’t let randoms claim your money :-). |
I will share private repo with you with my email and then you can email me. You deserve this money <3 |
invitation sent |
@peteralen Thanks a lot man! Been on this for a day and this solved for me! |
I believe following commit introduces an issue fro cocoapods users (of whoom there will be many now that react-native uses cocoapods) b85153d#diff-1b2b06e7c58d8929c91f917ce51a7454R28 The gist of it, that it introduces back this issue firebase/firebase-ios-sdk#1916 It is due to some header include in gRPC-C++ library that recursive header search will try to include, but won't find, hence causing build error. cc @MoOx as he authored original PR, I am not sure if removing this will cause any issues, so wanted to discuss it with you.
I believe following commit introduces an issue for cocoapods users (of whoom there will be many now that react-native uses cocoapods) b85153d#diff-1b2b06e7c58d8929c91f917ce51a7454R28 The gist of it, that it introduces back this issue firebase/firebase-ios-sdk#1916 It is due to some header include in gRPC-C++ library that recursive header search will try to include, but won't find, hence causing build error. cc @MoOx as he authored original PR, I am not sure if removing this will cause any issues, so wanted to discuss it with you.
this solved my issue: expo SDK 34, react-native-firebase 5.5.6 |
Describe the problem
Compilation fails when try to build react-native app based in Firebase (using react-native-firebase), the error says it can't find 'chrono' file:
PD: I've already opened an issue at gRPC project...
Steps to reproduce:
Just create a react native app, and follow the instructions to install react-native-firebase, then run
react-native run-ios
.Cocoapods:
Report:
The text was updated successfully, but these errors were encountered: