Skip to content
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

[🐛] 🔥 Pod install fails on fresh install / upgrade of @react-native-firebase/app 10.3.0 #4710

Closed
2 of 10 tasks
haswalt opened this issue Dec 24, 2020 · 5 comments
Closed
2 of 10 tasks
Labels
help: needs-triage Issue needs additional investigation/triaging. impact: bug New bug report

Comments

@haswalt
Copy link

haswalt commented Dec 24, 2020

Issue

Installing the app package fails with CocoaPods not finding spec with react-native 0.63.3.

Install app

npm i @react-native-firebase/app

Install pods

cd ios/ && pod install

Podspec can't be found for Firebase/CoreOnly.

RNFBApp: Using user specified Firebase SDK version '7.3.0'
RNFBApp: Using overridden static_framework value of 'false'
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In snapshot (Podfile.lock):
    Firebase/CoreOnly (= 6.34.0)

  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 10.3.0, which depends on
      Firebase/CoreOnly (= 7.3.0)


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 `Firebase/CoreOnly` inside your development pod `RNFBApp`.
   You should run `pod update Firebase/CoreOnly` to apply changes you've made.

Aborting run

Project Files

Javascript

Click To Expand

package.json:

# N/A

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'REMX' do
  config = use_native_modules!
  use_react_native!(:path => config["reactNativePath"])

  # Permissions
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"

  target 'REMXTests' do
    inherit! :complete
    # Pods for testing
  end

  use_native_modules!

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'FCMNotificationServiceExtension' do
    pod 'Firebase/Messaging', '~> 6.34.0'
end

AppDelegate.m:

// 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:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
    OS: macOS 11.1
    CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
    Memory: 126.99 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v12.13.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 23, 26, 27, 28, 29
      Build Tools: 26.0.1, 26.0.3, 27.0.3, 28.0.2, 28.0.3, 29.0.2
      System Images: android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.3/12C33 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_275 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.3 => 0.63.3 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Foun
  • 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
  • react-native-firebase version you're using that has this issue:
    • 10.3.0
  • Firebase module(s) you're using that has the issue:
    • App
  • Are you using TypeScript?
    • N


@haswalt haswalt added help: needs-triage Issue needs additional investigation/triaging. impact: bug New bug report labels Dec 24, 2020
@mikehardy
Copy link
Collaborator

cd ios && rm Podfile.lock && pod install

Another option is cd ios && pod update

Both will fix the issue, this is a common cocoapods thing but since that's native iOS development and react-native is supposed to abstract most of that stuff, it takes a while to get used to pod commands and their various common error states

That really should fix it so I'm going to close but if it is still not working we can reopen

@haswalt
Copy link
Author

haswalt commented Dec 24, 2020

Neither of those things fix it.

rm -fr ~/.cocoapods
pod setup
cd ios/
rm Podfile.lock
rm -fr Pods
pod install --repo-update

I've tried various things around normal debuging of cocoapods and making things install clean but still the same issue.

@mikehardy can we reopen.

@haswalt
Copy link
Author

haswalt commented Dec 24, 2020

With cleaned Podfile.lock the error is:

[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 10.3.0, which depends on
      Firebase/CoreOnly (~> 7.3.0)

None of your spec sources contain a spec satisfying the dependency: `Firebase/CoreOnly (~> 7.3.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

@mikehardy
Copy link
Collaborator

rm -fr ~/.cocoapods
pod setup

These should not be needed in normal usage. If you have pod repo corruption then that will fix it but that is rare

cd ios/
rm Podfile.lock
rm -fr Pods
pod install --repo-update

These will fix all normal problems.

@mikehardy can we reopen.

No, this is project-specific, please note that there are multiple issues triaged today alone for people on react-native-firebase/@app v10.3.0 which indicates no one else is having this problem, which indicates the module is fine but your project has a problem.

You can try npx react-native-clean-project

You can try a clean repro with https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh

You can try the other directory (in Library) mentioned here but that is a last resort indicating serious local corruption pmadruga/react-native-clean-project#42

To be the most clear though: the module works, the pod exists, something is wrong with your local project or environment

@mklb
Copy link

mklb commented Dec 30, 2020

I needed to remove the trunk as well. No idea why ¯_(ツ)_/¯

cd ios/
rm Podfile.lock
rm -fr Pods
pod repo remove trunk 
pod install --repo-update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: needs-triage Issue needs additional investigation/triaging. impact: bug New bug report
Projects
None yet
Development

No branches or pull requests

3 participants