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

🔥 Unable to find a specification for `RNFBApp` depended upon by `RNFBDynamicLinks`

Open matthias-pichler opened this issue 7 years ago • 22 comments

Issue

After upgrading both @react-native-firebase/app and @react-native-firebase/dynamic-links from 0.4.3 to 0.5.0 the command bundle exec pod install would exit with [!] Unable to find a specification for RNFBApp depended upon by RNFBDynamicLinks


Project Files

iOS

Click To Expand

ios/Podfile:

  • [ ] I'm not using Pods
  • [x] I'm using Pods and my Podfile looks like:
# 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'

# The target name is most likely the name of your project.
target 'MyApp' do

  # Pods for MyApp

  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-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-RCTCameraRoll', :path => '../node_modules/react-native/Libraries/CameraRoll'
  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-RCTPushNotification', :path => '../node_modules/react-native/Libraries/PushNotificationIOS'
  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'

  # Add new pods below this line

  use_native_modules!
end

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • [x] my application is an AndroidX application?
  • [x] I am using android/gradle.settings jetifier=true for Android compatibility?
  • [x] 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:

 info Fetching system and libraries information...
System:
    OS: macOS 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
    Memory: 202.59 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 12.9.1 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.10.3 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.9.0 => 16.9.0 
    react-native: ^0.60.5 => 0.60.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1
  • 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:
    • 0.5.0
  • Firebase module(s) you're using that has the issue:
    • Dynamic Links
  • Are you using TypeScript?
    • Y


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]

matthias-pichler avatar Sep 19 '19 10:09 matthias-pichler

Hmm not sure on this one and why it'd be happening, the tests project we have is using this in the same way you are - could you let me know what pods version you're using?

Salakar avatar Sep 19 '19 10:09 Salakar

I have a similar problem with @react-native-firebase/perf. Update from 0.4.3 to 0.5.0. Pod version 1.8.0.beta.2. Everything worked well up until this update.

jarekbb avatar Sep 19 '19 11:09 jarekbb

So confused as our tests project is linking fine using RN auto-linking; but am looking into it, will report back

Salakar avatar Sep 19 '19 11:09 Salakar

Could someone paste a full copy of their pod install logs?

Salakar avatar Sep 19 '19 11:09 Salakar

Here you are

Installing pods...\n
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration

[!] Invalid `Podfile` file:
[!] Invalid `RNFBPerf.podspec` file: [!] Unsupported version requirements. [nil] is not valid..

 #  from /Users/home/Projects/XXX/node_modules/@react-native-firebase/perf/RNFBPerf.podspec:26
 #  -------------------------------------------
 #    s.dependency          'React'
 >    s.dependency          'Firebase/Core', firebase_sdk_version
 #    s.dependency          'Firebase/Performance', firebase_sdk_version
 #  -------------------------------------------```

jarekbb avatar Sep 19 '19 11:09 jarekbb

Thanks @jarekbb - your issue is different to this one but I'll work on a fix for that too - will still need logs for the other issue to help debug it

Salakar avatar Sep 19 '19 11:09 Salakar

@jarekbb - v0.5.1 is now up with the fix in for your issue, may have also resolved your issue @Matthias-Pichler - please confirm

Salakar avatar Sep 19 '19 12:09 Salakar

@Salakar Version perf 0.5.1 works! Thank you for the quick fix. :-)

jarekbb avatar Sep 19 '19 12:09 jarekbb

I had a similar error as above and 0.5.1 seems to fix that. However, I get this error now:

[!] The 'Pods-myditation' target has transitive dependencies that include statically linked binaries: (FirebaseAuth, FirebaseCore, FirebaseCoreDiagnostics, GoogleDataTransportCCTSupport, GoogleDataTransport, FirebaseInstanceID, FirebaseDatabase, FirebaseDynamicLinks, FirebaseFirestore, FirebaseFunctions, FirebaseMessaging, and FirebaseStorage)

redpandatronicsuk avatar Sep 19 '19 12:09 redpandatronicsuk

@redpandatronicsuk are you using use_frameworks! in your podfile by any chance?

Salakar avatar Sep 19 '19 12:09 Salakar

Yes I am. I think I have to use it for lottie to work.

redpandatronicsuk avatar Sep 19 '19 12:09 redpandatronicsuk

I was under the impression use_frameworks was broken in RN60 and you'd need to either do the "I know what I'm doing" manual setup in RN59 or move to RN61 (which is still in release candidate phase but should go general release this week)

mikehardy avatar Sep 19 '19 12:09 mikehardy

I was under the impression use_frameworks was broken in RN60 and you'd need to either do the "I know what I'm doing" manual setup in RN59 or move to RN61 (which is still in release candidate phase but should go general release this week)

Correct! Initially, on v6 we had all RNFirebase Podspecs as static_frameworks to support use_frameworks then RN60 came along and broke support again so we had to revert 🙈 don't think it's fixed until RN61

Salakar avatar Sep 19 '19 12:09 Salakar

@mikehardy I am using RN61.0-rc.3 @Salakar When I remove use_frameworks! I no longer get the error message

Thanks for your quick replies :)

redpandatronicsuk avatar Sep 19 '19 12:09 redpandatronicsuk

@redpandatronicsuk feel free to locally patch-package to re-add support for it locally as you're using RN61; you just need to change this line to true for each of the RNFirebase packages you're using: https://github.com/invertase/react-native-firebase/blob/a2f0fd663837c7f02fc153ce6873b9d0416136aa/packages/storage/RNFBStorage.podspec#L29

Salakar avatar Sep 19 '19 12:09 Salakar

@Salakar thanks, I'll try that out later.

redpandatronicsuk avatar Sep 19 '19 12:09 redpandatronicsuk

@Salakar issue persists in 0.5.2

React native version: 0.60.5

pod version

bundle exec pod --version
1.7.5

pod install logs:

bundle exec pod install                                                                                                                [70adb9a]
Detected React Native module pods for RNAWSCognito, RNCAsyncStorage, RNDeviceInfo, RNFBDynamicLinks, RNFS, RNGestureHandler, RNImageCropPicker, RNLocalize, RNSVG, RNSentry, RNVectorIcons, ReactNativeLocalization, react-native-camera, react-native-config, react-native-netinfo, and react-native-splash-screen
Analyzing dependencies
Fetching podspec for `RNAWSCognito` from `../node_modules/amazon-cognito-identity-js`
Fetching podspec for `RNCAsyncStorage` from `../node_modules/@react-native-community/async-storage`
Fetching podspec for `RNDeviceInfo` from `../node_modules/react-native-device-info`
Fetching podspec for `RNFBDynamicLinks` from `../node_modules/@react-native-firebase/dynamic-links`
Fetching podspec for `RNFS` from `../node_modules/react-native-fs`
Fetching podspec for `RNGestureHandler` from `../node_modules/react-native-gesture-handler`
Fetching podspec for `RNImageCropPicker` from `../node_modules/react-native-image-crop-picker`
Fetching podspec for `RNLocalize` from `../node_modules/react-native-localize`
Fetching podspec for `RNSVG` from `../node_modules/react-native-svg`
Fetching podspec for `RNSentry` from `../node_modules/@sentry/react-native`
Fetching podspec for `RNVectorIcons` from `../node_modules/react-native-vector-icons`
Fetching podspec for `React` from `../node_modules/react-native/`
Fetching podspec for `React-Core` from `../node_modules/react-native/React`
Fetching podspec for `React-DevSupport` from `../node_modules/react-native/React`
Fetching podspec for `React-RCTActionSheet` from `../node_modules/react-native/Libraries/ActionSheetIOS`
Fetching podspec for `React-RCTAnimation` from `../node_modules/react-native/Libraries/NativeAnimation`
Fetching podspec for `React-RCTBlob` from `../node_modules/react-native/Libraries/Blob`
Fetching podspec for `React-RCTCameraRoll` from `../node_modules/react-native/Libraries/CameraRoll`
Fetching podspec for `React-RCTImage` from `../node_modules/react-native/Libraries/Image`
Fetching podspec for `React-RCTLinking` from `../node_modules/react-native/Libraries/LinkingIOS`
Fetching podspec for `React-RCTNetwork` from `../node_modules/react-native/Libraries/Network`
Fetching podspec for `React-RCTPushNotification` from `../node_modules/react-native/Libraries/PushNotificationIOS`
Fetching podspec for `React-RCTSettings` from `../node_modules/react-native/Libraries/Settings`
Fetching podspec for `React-RCTText` from `../node_modules/react-native/Libraries/Text`
Fetching podspec for `React-RCTVibration` from `../node_modules/react-native/Libraries/Vibration`
Fetching podspec for `React-RCTWebSocket` from `../node_modules/react-native/Libraries/WebSocket`
Fetching podspec for `React-cxxreact` from `../node_modules/react-native/ReactCommon/cxxreact`
Fetching podspec for `React-jsi` from `../node_modules/react-native/ReactCommon/jsi`
Fetching podspec for `React-jsiexecutor` from `../node_modules/react-native/ReactCommon/jsiexecutor`
Fetching podspec for `React-jsinspector` from `../node_modules/react-native/ReactCommon/jsinspector`
Fetching podspec for `ReactNativeLocalization` from `../node_modules/react-native-localization`
Fetching podspec for `react-native-camera` from `../node_modules/react-native-camera`
Fetching podspec for `react-native-config` from `../node_modules/react-native-config`
Fetching podspec for `react-native-netinfo` from `../node_modules/@react-native-community/netinfo`
Fetching podspec for `react-native-splash-screen` from `../node_modules/react-native-splash-screen`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
[!] Unable to find a specification for `RNFBApp` depended upon by `RNFBDynamicLinks`

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.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

matthias-pichler avatar Sep 19 '19 12:09 matthias-pichler

@Matthias-Pichler looks like auto-linking is not picking up the app module, you can see it's not listed in the Detected React Native module pods for ... log line - can you confirm it's in your node_modules directory?

Salakar avatar Sep 19 '19 12:09 Salakar

image

I noticed this too but yes there they are

matthias-pichler avatar Sep 19 '19 12:09 matthias-pichler

when starting the bundler this warning appears as well with 0.5.0 and 0.5.2

warn Package @react-native-firebase/app has been ignored because it contains invalid configuration. Reason: Unknown option dependency.platforms.ios.scriptPhases with value "[{"name":"[RNFB] Core Configuration","path":"./ios_config.sh","execution_position":"after_compile"}]" was found. This is either a typing error or a user mistake. Fixing it will remove this message.

matthias-pichler avatar Sep 19 '19 12:09 matthias-pichler