Skip to content

🔥chrono file not found, firestore , gRPC-C++ #1984

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

Closed
14 of 34 tasks
CyrusZei opened this issue Mar 17, 2019 · 10 comments
Closed
14 of 34 tasks

🔥chrono file not found, firestore , gRPC-C++ #1984

CyrusZei opened this issue Mar 17, 2019 · 10 comments
Labels
plugin: firestore Firebase Cloud Firestore

Comments

@CyrusZei
Copy link
Contributor

CyrusZei commented Mar 17, 2019

Issue

I have looked at the two other issues that have been posted here but with no luck and that is why I am posting this issue.

as soon as I add
pod 'Firebase/Firestore', '~> 5.15.0'
to my PodFile I get the "chrono file not found" I did read that is has with Time.h.
I am using firestore in my app and I need that.

It has to do with the gRPC-C++ that is beeing added.
Have been trying to figure this out for 3 days now with no luck.

If I remove the firestore from my podfile it builds and everything works just fine.
Is there a version that I can downgrade to where firestore is not depending on the gRPC-C++ time.h thing ?


Project Files

iOS

ios/Podfile:

Screenshot 2019-03-17 at 23 35 29

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>

#import "RNFirebaseNotifications.h"
#import "RNFirebaseMessaging.h"
#import <Firebase.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FIRApp configure];
  [RNFirebaseNotifications configure];
  
  // Setup Notifications
  if ([UNUserNotificationCenter class] != nil) {
    // iOS 10 or later
    // For iOS 10 display notification (sent via APNS)
    [UNUserNotificationCenter currentNotificationCenter].delegate = self;
    UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert |
    UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
    [FIRMessaging messaging].delegate = self;
    [[UNUserNotificationCenter currentNotificationCenter]
     requestAuthorizationWithOptions:authOptions
     completionHandler:^(BOOL granted, NSError * _Nullable error) {
       if (error) { NSLog(@"%@", error); }
     }];
  } else {
    // iOS 10 notifications aren't available; fall back to iOS 8-9 notifications.
    UIUserNotificationType allNotificationTypes =
    (UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
    UIUserNotificationSettings *settings =
    [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
    [application registerUserNotificationSettings:settings];
  }
  [application registerForRemoteNotifications];
  
  NSURL *jsCodeLocation;
  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"RoastLive"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];
  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  
  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];
  return YES;
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
  [[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
  [[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}

- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
  [[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
}

@end

Android

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->

Environment

  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • If known, the version of the platform are you experiencing the issue on:
    • `iOS 12.0
  • Operating System:
    • MacOS, version: macOs Mojava v10.14.3
    • Windows, version: N/A
    • Other, please specify: N/A
  • Build Tools:
    • xCode v 10.1 (10B61)
  • React Native version:
    • 0.58
  • React Native Firebase library version:
    • 5.15.0
  • Firebase module(s) you're using that has the issue:
    • N/A
    • Authentication
    • Analytics
    • Cloud Firestore
    • Cloud Messaging (FCM)
    • Crashlytics
    • Dynamic Links
    • Functions Callable
    • In App Messaging
    • Indexing
    • Invites
    • Instance ID
    • ML Kit
    • Notifications
    • Performance Monitoring
    • Realtime Database
    • Remote Config
    • Storage
  • Are you using TypeScript?
    • No
    • Yes, version: N/A
  • Are you using Expo, e.g. ExpoKit?
    • No
    • Yes, I've not ejected
    • Yes, but I have ejected to ExpoKit
    • Yes, but I have ejected to vanilla React Native
    • Expo version: N/A

-----EXTRA INFO

the build error I get
Screenshot 2019-03-18 at 19 59 38

Framework search paths

Screenshot 2019-03-18 at 20 01 20

Header search paths

Screenshot 2019-03-18 at 20 01 57

Library search paths

Screenshot 2019-03-18 at 20 02 26

Link binary with libraries
Screenshot 2019-03-18 at 20 02 55

Think react-native-firebase is great? Please consider supporting the project with any of the below:

@CyrusZei
Copy link
Contributor Author

for anybody that come here

try this fix

firebase/firebase-ios-sdk#1916 (comment)

it worked for me

@scanifydevo
Copy link

@CyrusZei I have faced the same issue.
which header search path did you remove?

@Salakar Salakar added the plugin: firestore Firebase Cloud Firestore label Apr 11, 2019
@CyrusZei
Copy link
Contributor Author

I made a PR to the repo so if anybody else is stuck follow the guide I made

https://github.com/syanbo/react-native-agora/blob/master/docs/v2/ios.md

@stale
Copy link

stale bot commented May 12, 2019

Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the Type: Stale Issue has become stale - automatically added by Stale bot label May 12, 2019
@otusweb
Copy link

otusweb commented May 22, 2019

i'm running into this issue too, though i don't have the search path issue. So I can't remove the recursive search path in the pod directory. I had to use the old build engine on one machine.
Switching back to the new build engine did not repro the issue...

@stale stale bot removed the Type: Stale Issue has become stale - automatically added by Stale bot label May 22, 2019
@mikehardy
Copy link
Collaborator

The original poster resolved the issue, so this should not receive further unrelated posts, please open a new issue following the template if there are more problems

@eggybot
Copy link

eggybot commented Jul 3, 2019

Still got this issue, detail of the problem explained here

Take note I already tried the suggestion solution from @wilhuff via @CyrusZei

@riordanpawley
Copy link

@eggybot Any luck on your end? I've been struggling with this issue too.

@eggybot
Copy link

eggybot commented Jul 10, 2019

@riordanpawley no luck and still getting this issue.

@riordanpawley
Copy link

@eggybot
I've got my app building at the moment but I tried to reclone from the successful build's commit and run but the process to get it working was almost as convoluted as the first time lol. So yeah, I'll try and explain how I got it working but I couldn't figure it out on the second run through either.
In the end these dependencies build and run but i seem to have to comment out different sections of the podfile and pod install and delete node_modules and reinstall in some kind of order and I also have to add that react-native.config.js file to my node_modules/react-native-firebase. I think react-native run-ios is what I used both times for the first successful build but I don't know if that's important. Feel free to ask if you have questions but I probably won't know the answers haha

TLDR: Working but not certain why. I think the important parts are make sure you use react-native-firebase 5.4.3 and add the react-native.config.js file to your react-native-firebase node modules folder.

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'dogg' do
  # Pods for dogg
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  pod 'Stripe', '~> 14.0.0'

  # Pods for dogg
  pod 'Firebase/Auth', '~> 6.3.0'
  pod 'Firebase/Core', '~> 6.3.0'
  pod 'Firebase/Firestore', '~> 6.3.0'
  pod 'Firebase/Database', '~> 6.3.0'
  pod 'Firebase/Functions', '~> 6.3.0'
  pod 'Firebase/Messaging', '~> 6.3.0'

#  post_install do |installer|
#    # react-native-firebase need some adjustements  with use_frameworks!
#    rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
#    rnfirebase.build_configurations.each do |config|
#      # react-native-firebase HEADER_SEARCH_PATHS are not good
#      # This is to avoid the error
#      # 'Firebase.h' file not found with <angled> include; use "quotes" instead
#      config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) ${PODS_ROOT}/Headers/Public/**'
#      # injecting `s.static_framework = true`
#      # (should be in RNFirebase.podspec but since it's not, the code below is doing the same behavior)
#      config.build_settings['MACH_O_TYPE'] = 'staticlib'
#    end
#  end

  pre_install do |installer|
    # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
    # to avoid
    # [!] The 'Pods-ADM' target has transitive dependencies that include statically linked binaries: (FirebaseCore, FirebaseInstanceID, FirebaseDynamicLinks, and FirebaseMessaging)
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
  end

  use_native_modules!
end
"dependencies": {
    "@ptomasroos/react-native-multi-slider": "^1.0.0",
    "@react-native-community/slider": "^2.0.0-rc.1",
    "formik": "^1.5.7",
    "lodash": "^4.17.11",
    "moment": "^2.24.0",
    "prop-types": "^15.7.2",
    "react": "16.8.6",
    "react-instantsearch-native": "^5.7.0",
    "react-native": "0.60.0",
    "react-native-firebase": "5.4.3", // IMPORTANT
    "react-native-formik": "^1.7.6",
    "react-native-gifted-chat": "^0.9.6",
    "react-native-google-places": "^3.1.1",
    "react-native-google-signin": "^2.0.0",
    "react-native-maps": "https://github.com/react-native-community/react-native-maps.git", // necessary for a fix that isn't in the release yet
    "react-native-modal-datetime-picker": "^7.5.0",
    "react-native-paper": "^2.16.0",
    "react-native-prompt-android": "^0.3.5",
    "react-native-router-flux": "^4.0.6",
    "react-native-vector-icons": "^6.5.0",
    "react-redux": "^7.1.0",
    "react-redux-firebase": "^3.0.0-alpha.12",
    "recompose": "^0.30.0",
    "redux": "^4.0.1",
    "redux-firestore": "^0.8.0",
    "redux-thunk": "^2.3.0",
    "reselect": "^4.0.0",
    "tipsi-stripe": "^7.5.0",
    "yup": "^0.27.0"
  },

react-native.config.js

const path = require('path');

module.exports = {
  dependency: {
    platforms: {
      ios: { podspecPath: path.join(__dirname, 'ios', 'RNFirebase.podspec') },
      android: {
        packageImportPath: 'import io.invertase.firebase.RNFirebasePackage;',
        packageInstance: 'new RNFirebasePackage()',
      },
    },
  },
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: firestore Firebase Cloud Firestore
Projects
None yet
Development

No branches or pull requests

7 participants