Issue also reported on Github-Cocoapods
So I was testing to working on Jest on my project (was running RN0.59.10), everything was fine with Enzyme installed and running fine. When I merge them to my current project (runs on RN0.61), solved some merge conflicts, then I face issue during pod install
. What possibly has gone wrong in between?
Project has no issue in setting up again and again in RN0.59, the issue raise only when RN0.61 came in with podfile. One thing to point out, prior integrating both the branch, my project on RN0.61 works fine with pod install
.
Below are the list of methods I've tried to overcome with issue, with no luck i'm still stuck.
node_modules
+ yarn.lock
+ Pods
+ Podfile.lock
+ Yarn install and pod install againLog from pod install --verbose
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
[!] Unable to find a specification for `Firebase/Core (~> 6.9.0)`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Part of my Podfile (which's giving me issue):
# Required by RNFirebase
pod 'Firebase/Core', '~> 6.9.0'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
What happen when I remove 4 lines above? (This is so wrong, I've doubt something goes wrong with my local)
[!] Unable to find a specification for `boost-for-react-native (= 1.63.0)` depended upon by `React-cxxreact`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Pod version: 1.8.4
React-Native-info:
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
Memory: 65.95 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.10.0 - /usr/local/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.12.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-24 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom_64
Android NDK: 19.2.5345600
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.0 => 0.61.0
npmGlobalPackages:
react-native-cli: 2.0.1
I actually removed Podfile.lock during the installation. As I revert back to the last successful state (where podfile.lock and yarn.lock is sitting in my directory), pod install is successful!
I've decided to dig further on the issue, here's the outcome for a few case scenarios.
Remove podfile.lock, shows the following:
[!] Unable to find a specification for `Firebase/Core (~> 6.9.0)`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Remove yarn.lock, shows the following:
[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
In snapshot (Podfile.lock):
FBSDKCoreKit (= 5.7.0, ~> 5.0, ~> 5.5)
In Podfile:
react-native-fbsdk (from `../node_modules/react-native-fbsdk`) was resolved to 1.1.1, which depends on
react-native-fbsdk/Core (= 1.1.1) was resolved to 1.1.1, which depends on
FBSDKCoreKit (= 5.8)
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* changed the constraints of dependency `FBSDKCoreKit` inside your development pod `react-native-fbsdk`.
You should run `pod update FBSDKCoreKit` to apply changes you've made.
Remove both yarn.lock + podfile.lock, shows the following:
[!] Unable to find a specification for `Firebase/Core (~> 6.9.0)`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Append source 'https://cdn.cocoapods.org/'
to Podfile (before target 'projectName' do)
Finally the root cause has been identified and solution found! Reason being, I have a privateRepo within my podfile which overwritten the default source of getting podspecs from Cocoapods. Mistake example as below
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
source 'https://github.com/privateRepo/Specs.git'
target 'project' do
# Comment the next line if you don't want to use dynamic frameworks
# use_frameworks!
.....
....
...
..
.
end
Hence the a simple solution of pointing back to Cocoapods' CDN will solve the issue.
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
source 'https://github.com/privateRepo/Specs.git'
# Pointing back the source to cocoapod's CDN for retrieving specs.
# Was overwritten by privateRepo/Specs.git on earlier lines
source 'https://cdn.cocoapods.org/'
target 'project' do
# Comment the next line if you don't want to use dynamic frameworks
# use_frameworks!
.....
....
...
..
.
end