react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

'chrono file not found'

Open salmatarzi opened this issue 8 years ago • 49 comments

Issue

Whenever I try to run the app in iOS it fails and gives me this error:

screenshot 2018-10-17 at 16 57 46

Environment

  1. Application Target Platform:

iOS

  1. Development Operating System:

macOS Mojave 10.14

  1. Build Tools:

Xcode v10.0 iOS 12.0

  1. React Native version:

0.57.1

  1. React Native Firebase Version:

5.0.0

  1. Firebase Module:

N/A

  1. Are you using typescript?

Yes

salmatarzi avatar Oct 17 '18 15:10 salmatarzi

Reverting back to 4.3.8 worked

EskelCz avatar Oct 19 '18 15:10 EskelCz

Did Anyone get this working? reverting back to 4.3.8 doesnt work.

rishavcn avatar Oct 20 '18 07:10 rishavcn

@rishavcn you need to run Clean build folder after package install

EskelCz avatar Oct 20 '18 12:10 EskelCz

I just fixed it. Changing file->workspace settings->build system to legacy build system

On Sat, 20 Oct 2018, 16:04 David Spohr, [email protected] wrote:

@rishavcn https://github.com/rishavcn you need to run Clean build folder after package install

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/invertase/react-native-firebase/issues/1610#issuecomment-431574383, or mute the thread https://github.com/notifications/unsubscribe-auth/AoMPNK5ToQjw1KtKVqD4QFBJfUX_HMteks5umxFPgaJpZM4XkJVl .

rishavcn avatar Oct 20 '18 12:10 rishavcn

I was using Xcode 9.0.1, did not receive this error. But when building in App Center, I did even tough I've selected to build with Xcode 9.0.1.

Xcode 9.0.1 does not have the 'Legacy build system' setting. I've upgraded Xcode to version 10, and I got the 'chrono' file not found error. Changed the build system to Legacy, error gone.

mcoevert avatar Oct 20 '18 16:10 mcoevert

Changing the build system to legacy build system worked for me as well, however, I'm not too sure if this should be a permanent solution.

salmatarzi avatar Oct 24 '18 13:10 salmatarzi

I had the same issue. I deleted the whole project, cloned it from github => yarn and pod install. That worked for me.

experionarjun avatar Oct 28 '18 13:10 experionarjun

all of a sudden happening here too, "react-native-firebase": "^5.0.0",

legacy build system is temporary, but not a long term solution.

nederev avatar Oct 29 '18 12:10 nederev

Having the same issue as @mcoevert. I'm able to build locally using legacy build system, but when using AppCenter build fails on this issue. @mcoevert - did you find a solution?

danielmhanover avatar Oct 29 '18 19:10 danielmhanover

@danielmhanover no, I figured it would work but just tested and the build still fails in AppCenter on the same error, even though note: Using legacy build system is being used. I'm able to develop, but not able to release.

mcoevert avatar Oct 30 '18 16:10 mcoevert

I was able to fix by removing some dependencies I wasn't using, namely Firestore, DynamicLinks, and CloudConfig.

danielmhanover avatar Oct 30 '18 16:10 danielmhanover

Removing some dependencies as @danielmhanover suggested worked for me! Oddly, I was able to put the dependencies back and now it still works... Have no idea why.

kylekaplan avatar Oct 30 '18 22:10 kylekaplan

Removing the Firestore, DynamicLinks and CloudConfig modules from Podfile did allow for build to complete. Putting dependencies back afterwards and running pod install again, then running another build, restored the build issues.

conrado avatar Nov 05 '18 15:11 conrado

I have the same issue. Oddly enough was able to solve this by running multiple cleanups as suggested above. However now that I need to build the app for release I have ran into the same problem again. I cleaned the pods, npm, build etc. Re-ran every install script and its still giving the same error.

Legacy build system solves the issue for me as well. Many thanks! Any update on how to avoid this?

Max101 avatar Nov 06 '18 09:11 Max101

Seems to me that Firebase Firestore is causing this issue.

Almost everyone takes out Firestore here and I took out firestore and it worked fine. Please fix this issue as I am using firestore for my project.

seaver-choy avatar Nov 06 '18 18:11 seaver-choy

The seems to be caused by the combination of gRPC-C++ and xcode 10. For me, as a workaround I have downgraded to Firestore (and everything else) to 5.7.0 because it doesn't depend on gRPC-C++. Was a workaround I found on https://github.com/firebase/firebase-ios-sdk/issues/1916 I'm only getting started with using this, so I don't know if it'll suit your use case... other people have suggested other solutions, none have worked for me

conrado avatar Nov 06 '18 19:11 conrado

downgrading to 5.7.0 appears to work - but I am nervous that its not really compatible with RNFirebase 5

brenwell avatar Nov 08 '18 12:11 brenwell

I had similar issues (9 build errors in total) while using pod 'Firebase/Core', '~> 5.12.0' and pod 'Firebase/Firestore', '~> 5.12.0'. It didn't matter which build system I was using the errors still persisted. All of them were gone after I removed Firestore from the Podfile, ran pod install build again (which succeeded), added Firestore back to the Podfile, ran pod install again and build again.

I have absolutely no idea what the issue is and why removing and re-adding Firestore seems to solve it. All I know is that it is working now and it looks like the issues are caused by Firestore.

Additional details:

"react": "16.6.3",
"react-native": "0.57.5",
"react-native-firebase": "^5.1.0",
"react-router-native": "^4.3.0",

rodrigoehlers avatar Nov 17 '18 22:11 rodrigoehlers

Thanks @rodrigoehler, this worked for me too:

  1. remove Pods folder and Podfile.lock
  2. remove Firebase pods except Firebase/Core from your Podfile, in my case there were:

pod 'Firebase/Auth', '~> 5.9.0' pod 'Firebase/Firestore', '~> 5.9.0'

  1. run pod install
  2. clean build folder
  3. build
  4. add Firebase pods back
  5. run pod install
  6. build

aayremlou avatar Nov 20 '18 00:11 aayremlou

Getting an identical build error. I tried disabling header maps on the project target, but to no avail. My build error includes:

'chrono' file not found (time.h)

... (1-4 are just RNFirebase including files which lead to 5) ...

5. In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/wchar.h:91:

6. In file included from /ios/Pods/Headers/Public/gRPC-C++/grpcpp/support/time.h:22:10

wchar.h:91 is #include <time.h>. From what you guys have said, I guess this conflicts with the gRPC-C++ time.h definition.

I also tried turning off header maps for firebase core, and then for the entire pods project, but that didn't work either.

Using the legacy build system surprisingly does work, which sucks because I know it's not a real solution to the problem.

noahtallen avatar Nov 20 '18 06:11 noahtallen