Closed mks11 closed 4 years ago
There are so many ways for things to wrong, I typically request people clone this repo and run the script for their versions (https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh for you) and see what things should look like. The problem is in the difference between what you have and what runs based on that script
Thanks Mike. I ran the make-demo-v6.sh .
After that I cd ios && pod install
. Everything seems fine.
Next, I add yarn add @react-native-firebase/firestore
runpod install
again.
And I get the similar errors as posted above.
In the template you indicate you are using 5.4.3. Why do you run the v6 script? Either way, firestore is already added https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh#L100 https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh#L62
Sorry, I let e.g. 5.4.3
stay in the template. The package.json have it correct
"@react-native-firebase/app": "^6.3.4", "@react-native-firebase/auth": "^6.3.4", "@react-native-firebase/firestore": "^6.3.4", "react": "16.9.0",
In my project firestore wasn't installed. Following the documentation that says yarn add @react-native-firebase/firestore
I am getting the errors after pod install
.
I also tried to remove firestore yarn remove @react-native-firebase/firestore
, and add it again.
My example adds firestore, and works fine. I can't reproduce.
I am having the same error even through the script. I am assuming it's coming at the same point when pod install is run for firestore. Please let me know if there is a better way to describe my problem.
Perhaps cocoapods 1.9 requires a higher ruby? I'm using ruby 2.7.0 (specifically 'ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]' managed by rvm)
I can't think of anything else though, although after running my script firestore should already be there, yarn adding it again doesn't seem right? But also shouldn't actually harm, and pod install should work. Definitely use the react-native-clean-project module at least once to see if it blows out something corrupt in cached state
Thanks! the following from this link https://github.com/CocoaPods/CocoaPods/issues/9260 worked -
rm -rf ~/.cocoapods/repos/trunk/
Cool, thanks for helping debug !
I believe react-native-clean-project is the canonical solution for purging local state to achieve clean reproducible react-native builds, so I just opened an enhancement there to add this functionality as it's a new one for me https://github.com/pmadruga/react-native-clean-project/issues/42
Thanks Mike. react-native-clean-project however didn't help me in this particular case. Maybe because I didn't want to delete the ios folder. I wonder if it removes the trunk (or it is necessary at all to remove it). Removing the trunk part was mentioned here https://github.com/CocoaPods/CocoaPods/issues/9260
@mks11 you linked that twice but I see nothing relevant there in the 2773 link? But no, react-native-clean-project would not have worked in this case it needs an enhancement before it can work which is the item I linked - good working finding the cause
@mikehardy Oh apologies! made the correction. This is the link https://github.com/CocoaPods/CocoaPods/issues/9260
Thanks that helps! I cross-linked it with the react-native-clean-project enhancement request to provide it with support
When I tried to upgrade my react-native package from v0.61 to v0.63. I encounter JSONParse error
below command is what i use to solve the issue
`gem list --local | grep cocoapods
sudo gem uninstall (each item from above command)
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
rm -rf ~/.cocoapods/repos/trunk/
pod cache clean --all
pod install`
credit from https://stackoverflow.com/a/60849495/7702345
Issue
Describe your issue here
Pod install seems to work fine until I install the firestore package and run pod install afterwards. ( details below are from a bare-bone project that gives this error, I am getting the same error in the main project)
yarn add @react-native-firebase/firestore
While running
cd ios && pod install
I get this error
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Project Files
Javascript
Click To Expand
#### `package.json`: { "name": "FirestorInstall", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-native-firebase/app": "^6.3.4", "@react-native-firebase/auth": "^6.3.4", "@react-native-firebase/firestore": "^6.3.4", "react": "16.9.0", "react-native": "0.61.5" }, "devDependencies": { "@babel/core": "^7.8.7", "@babel/runtime": "^7.8.7", "@react-native-community/eslint-config": "^0.0.7", "babel-jest": "^25.1.0", "eslint": "^6.8.0", "jest": "^25.1.0", "metro-react-native-babel-preset": "^0.58.0", "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native" } } ```json # N/A ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```
iOS
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: platform :ios, '9.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' target 'FirestorInstall' do # Pods for FirestorInstall pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../node_modules/react-native/' pod 'React-Core', :path => '../node_modules/react-native/' pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' 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-Core/RCTWebSocket', :path => '../node_modules/react-native/' 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 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" 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' target 'FirestorInstallTests' do inherit! :search_paths # Pods for testing end use_native_modules! end target 'FirestorInstall-tvOS' do # Pods for FirestorInstall-tvOS target 'FirestorInstall-tvOSTests' do inherit! :search_paths # Pods for testing end end ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```
Android
Click To Expand
#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // N/A ``` #### `android/app/build.gradle`: ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `MainApplication.java`: ```java // N/A ``` #### `AndroidManifest.xml`: ```xml ```
Environment
Click To Expand
**`react-native info` output:** ``` System: OS: macOS Mojave 10.14.6 CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz Memory: 190.48 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 13.9.0 - ~/.nvm/versions/node/v13.9.0/bin/node Yarn: 1.16.0 - ~/.yarn/bin/yarn npm: 6.13.7 - ~/.nvm/versions/node/v13.9.0/bin/npm SDKs: iOS SDK: Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3 Android SDK: API Levels: 23, 26, 28 Build Tools: 23.0.1, 23.0.2, 26.0.2, 27.0.3, 28.0.0, 28.0.3 System Images: android-23 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5977832 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5 ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [x ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - 6.3.4 - **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `Y/N` & `VERSION` N
Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.