invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.74k stars 2.22k forks source link

[🐛] @react-native-firebase/firestore - Errno::ENOENT - No such file or directory @ rb_sysopen - XYZ/ios/Pods/BoringSSL-GRPC/src/include/openssl/BoringSSL.modulemap #7257

Closed skemp42 closed 1 year ago

skemp42 commented 1 year ago

Issue

When creating a brand new React Native project and trying to integrate firebase into it, pods will install fine up until I add the firebase dependency, which has my package.json looking like:

  "dependencies": {
    "@react-native-firebase/app": "^18.3.0",
    "@react-native-firebase/auth": "^18.3.0",
    "@react-native-firebase/firestore": "^18.3.0",
    "@react-native-google-signin/google-signin": "^10.0.1",
    "react": "18.2.0",
    "react-native": "0.72.3"
  },

Following the firebase docs and adding:

  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

into the podfile, I then cannot install pods due to this error:

### Error

Errno::ENOENT - No such file or directory @ rb_sysopen - XYZ/ios/Pods/BoringSSL-GRPC/src/include/openssl/BoringSSL.modulemap
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:971:in `read'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:971:in `read'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:971:in `block in create_module_map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:149:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:970:in `create_module_map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:76:in `block in install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:149:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:40:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator.rb:115:in `block in install_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in `install_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:32:in `block in install_all_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:149:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:31:in `install_all_pod_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:19:in `generate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:320:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:183:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:170:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/command/update.rb:63:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Describe your issue here


Project Files

Javascript

Click To Expand

#### `package.json`: ```json { "name": "AwesomeProject", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest" }, "dependencies": { "@react-native-firebase/app": "^18.3.0", "@react-native-firebase/auth": "^18.3.0", "@react-native-firebase/firestore": "^18.3.0", "@react-native-google-signin/google-signin": "^10.0.1", "react": "18.2.0", "react-native": "0.72.3" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.9", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.7", "prettier": "^2.4.1", "react-test-renderer": "18.2.0", "typescript": "4.8.4" }, "engines": { "node": ">=16" } } ``` #### `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: ```ruby # Resolve react_native_pods.rb with node to allow for hoisting require Pod::Executable.execute_command('node', ['-p', 'require.resolve( "react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]}, )', __dir__]).strip platform :ios, min_ios_version_supported prepare_react_native_project! # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded # # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` # ```js # module.exports = { # dependencies: { # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), # ``` flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym end target 'AwesomeProject' do config = use_native_modules! use_frameworks! :linkage => :static $RNFirebaseAsStaticFramework = true # Flags change depending on the env values. flags = get_default_flags() use_react_native!( :path => config[:reactNativePath], # Hermes is now enabled by default. Disable by setting this flag to false. :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], # Enables Flipper. # # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. # :flipper_configuration => flipper_config, # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) target 'AwesomeProjectTests' do inherit! :complete # Pods for testing end post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( installer, :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) end end ``` #### `AppDelegate.m`: ```objc #import "AppDelegate.h" #import #import @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.moduleName = @"AwesomeProject"; // You can add your custom initial props in the dictionary below. // They will be passed down to the ViewController used by React Native. self.initialProps = @{}; [FIRApp configure]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; #else return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; #endif } @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`: ```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:** ``` CocoaPods : 1.12.1 Ruby : ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22] RubyGems : 3.0.3.1 Host : macOS 13.3.1 (22E261) Xcode : 14.3 (14E222b) Git : git version 2.39.2 (Apple Git-143) Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib Repositories : trunk - CDN - https://cdn.cocoapods.org/ ``` - **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:** - `latest` - **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `Y/N` & `VERSION`


github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

mikehardy commented 1 year ago

Strange, I'm not sure why that's happening but I have a from-scratch demonstration of how to create a react-native app and integrate it with react-native-firebase from start to finish, that shows how to do so and builds correctly: https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.