React-native-firebase: 馃敟 CocoaPods could not find compatible versions for pod "GoogleUtilities/Logger"

Created on 4 Aug 2020  路  4Comments  路  Source: invertase/react-native-firebase


Issue



When running Pod install, the following error is thrown:

[!] CocoaPods could not find compatible versions for pod "GoogleUtilities/Logger":
  In Podfile:
    RNFBDynamicLinks (from `../node_modules/@react-native-firebase/dynamic-links`) was resolved to 7.4.1, which depends on
      Firebase/DynamicLinks (~> 6.28.1) was resolved to 6.28.1, which depends on
        Firebase/CoreOnly (= 6.28.1) was resolved to 6.28.1, which depends on
          FirebaseCore (= 6.9.1) was resolved to 6.9.1, which depends on
            GoogleUtilities/Logger (~> 6.7)

    RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`) was resolved to 7.6.1, which depends on
      GoogleUtilities (= 6.6.0) was resolved to 6.6.0, which depends on
        GoogleUtilities/Logger (= 6.6.0)

Project Files






Javascript

Click To Expand

#### `package.json`:

{
    "name": "springsale",
    "version": "0.0.2",
    "private": true,
    "scripts": {
        "postinstall": "patch-package; npx npm-license-crawler -onlyDirectDependencies -json licenses.json",
        "pods": "cd ios && pod install",
        "update-pods": "cd ios && pod repo update && pod install && pod update",
        "android": "react-native run-android",
        "ios": "react-native run-ios",
        "ios11": "react-native run-ios --device 'Samsung SmartFridge' --configuration Debug",
        "ios8": "react-native run-ios --device 'debug' --configuration Debug",
        "prodandroid": "react-native run-android --variant=release",
        "prod11": "react-native run-ios --device 'Samsung SmartFridge' --configuration Release",
        "prod8": "react-native run-ios --device 'debug' --configuration Release",
        "start": "react-native start",
        "clean": "watchman watch-del-all && rm -rf node_modules/ && npm cache clean --force && rm -rf ios/Pods/",
        "rebuild": "npm install && cd ios && pod repo update && pod install && pod update && cd .. && react-native start --reset-cache",
        "test": "jest",
        "lint": "eslint src/**/*.ts*"
    },
    "dependencies": {
        "@invertase/react-native-apple-authentication": "^1.1.2",
        "@react-native-community/art": "^1.2.0",
        "@react-native-community/async-storage": "^1.11.0",
        "@react-native-community/blur": "^3.6.0",
        "@react-native-community/google-signin": "^4.0.3",
        "@react-native-community/masked-view": "^0.1.10",
        "@react-native-community/segmented-control": "^2.1.0",
        "@react-native-community/slider": "^3.0.3",
        "@react-native-firebase/analytics": "^7.4.1",
        "@react-native-firebase/app": "^8.3.0",
        "@react-native-firebase/auth": "^8.3.1",
        "@react-native-firebase/crashlytics": "^8.3.0",
        "@react-native-firebase/dynamic-links": "^7.4.1",
        "@react-native-firebase/firestore": "^7.5.1",
        "@react-native-firebase/functions": "^7.3.1",
        "@react-native-firebase/messaging": "^7.6.1",
        "@react-native-firebase/ml-vision": "^7.3.1",
        "@react-native-firebase/perf": "^7.3.1",
        "@react-native-firebase/remote-config": "^8.1.1",
        "@react-native-firebase/storage": "^7.3.1",
        "@react-navigation/bottom-tabs": "^5.7.3",
        "@react-navigation/native": "^5.7.2",
        "@react-navigation/stack": "^5.8.0",
        "algoliasearch": "^4.3.1",
        "react": "16.13.1",
        "react-native": "0.63.2",
        "react-native-animatable": "^1.3.3",
        "react-native-blurhash": "^1.0.20",
        "react-native-fast-image": "^8.3.2",
        "react-native-fbsdk": "^2.0.0",
        "react-native-geocoder": "^0.5.0",
        "react-native-geolocation-service": "^5.0.0",
        "react-native-gesture-handler": "^1.7.0",
        "react-native-google-nearby-messages": "^1.0.20",
        "react-native-haptic-feedback": "^1.10.0",
        "react-native-image-crop-picker": "^0.32.2",
        "react-native-linear-gradient": "^2.5.6",
        "react-native-maps": "^0.27.1",
        "react-native-modal": "^11.5.6",
        "react-native-notification-badge": "^1.0.5",
        "react-native-permissions": "^2.1.5",
        "react-native-progress": "^4.1.2",
        "react-native-reanimated": "^1.10.1",
        "react-native-redash": "^14.2.3",
        "react-native-safe-area-context": "^3.0.7",
        "react-native-screens": "^2.9.0",
        "react-native-share": "^3.7.0",
        "react-native-shared-element": "^0.7.0",
        "react-native-skeleton-placeholder": "^2.0.7",
        "react-native-status-bar-height": "^2.5.0",
        "react-native-svg": "^12.1.0",
        "react-native-swiper": "^1.6.0",
        "react-native-touchable-scale": "^2.1.1",
        "react-native-vector-icons": "^7.0.0",
        "react-navigation-shared-element": "^3.0.0"
    },
    "devDependencies": {
        "@babel/core": "^7.11.0",
        "@babel/runtime": "^7.11.0",
        "@react-native-community/eslint-config": "^2.0.0",
        "@react-native-community/eslint-plugin": "^1.1.0",
        "@types/algoliasearch": "^3.34.10",
        "@types/jest": "^26.0.8",
        "@types/react-native": "^0.63.4",
        "@types/react-native-fbsdk": "^1.1.0",
        "@types/react-native-share": "^3.3.0",
        "@types/react-native-vector-icons": "^6.4.5",
        "@types/react-test-renderer": "16.9.2",
        "@typescript-eslint/eslint-plugin": "^3.8.0",
        "@typescript-eslint/parser": "^3.8.0",
        "babel-plugin-transform-remove-console": "^6.9.4",
        "eslint": "^7.6.0",
        "eslint-config-prettier": "^6.11.0",
        "eslint-plugin-prettier": "^3.1.4",
        "eslint-plugin-react-hooks": "^4.0.8",
        "eslint-plugin-react-native": "^3.8.1",
        "jest": "^26.2.2",
        "metro-react-native-babel-preset": "^0.61.0",
        "patch-package": "^6.2.2",
        "prettier": "^2.0.5",
        "react-navigation": "^4.4.0",
        "react-navigation-stack": "^2.8.2",
        "react-test-renderer": "16.13.1",
        "typescript": "^3.9.7"
    },
    "jest": {
        "preset": "react-native",
        "moduleFileExtensions": [
            "ts",
            "tsx",
            "js",
            "jsx",
            "json",
            "node"
        ]
    }
}

#### `firebase.json` for react-native-firebase v6:
{
  "react-native": {
    "ml_vision_image_label_model": true,
    "ml_vision_label_model": true,
    "messaging_android_notification_color": "@color/mediumslateblue",
    "crashlytics_debug_enabled": true
  }
}

### iOS
Click To Expand

#### `ios/Podfile`: - [ ] I'm not using Pods - [x] 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 'Springsale' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

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

  target 'SpringsaleTests' 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
#### `AppDelegate.m`:
#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLinkingManager.h>
#import <Firebase.h>
#import <FBSDKCoreKit.h>
#import <RNGoogleSignin/RNGoogleSignin.h>

// See: https://github.com/facebook/react-native/issues/16376#issuecomment-350523177
#if RCT_DEV && __has_include(<React/RCTDevLoadingView.h>)
#import <React/RCTDevLoadingView.h>
#endif

#ifdef FB_SONARKIT_ENABLED
#import <FlipperKit/FlipperClient.h>
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>

static void InitializeFlipper(UIApplication *application) {
  FlipperClient *client = [FlipperClient sharedClient];
  SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
  [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
  [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
  [client addPlugin:[FlipperKitReactPlugin new]];
  [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
  [client start];
}
#endif

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#ifdef FB_SONARKIT_ENABLED
  InitializeFlipper(application);
#endif
  if ([FIRApp defaultApp] == nil) {
    [FIRApp configure];
  }
  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];

  // See: https://github.com/facebook/react-native/issues/16376#issuecomment-350523177
  #if RCT_DEV && __has_include(<React/RCTDevLoadingView.h>)
  [bridge moduleForClass:[RCTDevLoadingView class]];
  #endif

  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                   moduleName:@"Springsale"
                                            initialProperties:nil];

  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [UIViewController new];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];

  // See: https://reactnative.dev/docs/running-on-device#pro-tips
  UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
  UIViewController *vc = [sb instantiateInitialViewController];
  rootView.loadingView = vc.view;
  return YES;
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  if ([[FBSDKApplicationDelegate sharedInstance] application:app openURL:url options:options]) {
    return YES;
  } else if ([RNGoogleSignin application:app openURL:url options:options]) {
    return YES;
  } else if ([RCTLinkingManager application:app openURL:url options:options]) {
    return YES;
  } else {
    return NO;
  }
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
 restorationHandler: (nonnull void (^)(NSArray<id<UIUserActivityRestoring>> *_Nullable))restorationHandler {
  // TODO: RNFirebaseLinks
//  return [[RNFirebaseLinks instance] application:application
//                            continueUserActivity:userActivity
//                              restorationHandler:restorationHandler];
  return [RCTLinkingManager application:application
                   continueUserActivity:userActivity
                     restorationHandler:restorationHandler];
}

@end


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

info Fetching system and libraries information...
(node:80877) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
    OS: macOS 10.15.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 6.15 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.5.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 25, 28, 29
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.0, 30.0.0
      System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
      Android NDK: 21.2.6472646
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.6/11E708 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_262 - /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.2 => 0.63.2 
  npmGlobalPackages:
    *react-native*: Not Found

- **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:** - `^8.3.0` - **`Firebase` module(s) you're using that has the issue:** - **RNFBDynamicLinks**/**@react-native-firebase/dynamic-links**: `7.4.1` - **RNFBMessaging**/**@react-native-firebase/messaging**: `7.6.1` - **Are you using `TypeScript`?** - Yes, `^3.9.7`




Most helpful comment

@mrousavy npx react-native-clean-project - learn it, live it, love it ;-)

All 4 comments

So I ran:

watchman watch-del-all
rm -rf node_modules/
npm cache clean --force
rm -rf ios/Pods/

and then

npm install
cd ios
pod repo update
pod install
pod update
cd ..
react-native start --reset-cache

and the dependency error was gone. Must've been some cache error...

@mrousavy npx react-native-clean-project - learn it, live it, love it ;-)

tried both ways, npx and manualy clean cache, still get 'GoogleUtilities/GULAppDelegateSwizzler.h' file not found in the dynamic links pod

Hi @mrousavy I have solve when delete file ios/Pods/Podfile.lock
and run
npm install
cd ios
pod install
cd ..

Was this page helpful?
0 / 5 - 0 ratings