react-native-firebase
react-native-firebase copied to clipboard
[🐛] FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found after XCode required to download iOS 17.2
Version
0.71.4
Buld target
iOS
Output of react-native info
System:
OS: macOS 13.6.3
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 1.00 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.15.0/bin/yarn
npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
Watchman: 2023.03.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.12.0 - /Users/glabsmac/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 15.1/15C65 - /usr/bin/xcodebuild
Languages:
Java: 19.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: ^10.2.2 => 10.2.7
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Issue and Reproduce Steps
My code work fine until the XCode required to download and install iOS 17.2
, As usually I build my project using this command:
ENVFILE=.env.uat react-native run-ios --device='My iPhone' --mode='Debug' --scheme='ProjectUAT' -- --reset-cache
I getting full error:
info Found Xcode workspace "Project.xcworkspace"
info Building (using "xcodebuild -workspace Project.xcworkspace -configuration Debug -scheme ProjectUAT -destination id=cb7ace617209c485d19e50e44ddc8db8467a7d00")
▸ Copying simdjson.h
▸ Copying simdjson-umbrella.h
▸ Copying vlog_is_on.h
▸ Copying stl_logging.h
▸ Copying raw_logging.h
▸ Copying logging.h
▸ Copying log_severity.h
▸ Copying glog-umbrella.h
▸ Copying React-jsinspector-umbrella.h
▸ Copying InspectorInterfaces.h
▸ Processing ResourceBundle-TSBackgroundFetchPrivacy-RNBackgroundFetch-Info.plist
▸ Copying /Users/glabsmac/Library/Developer/Xcode/DerivedData/Project-bzgimiggenvixufobizueooyyidr/Build/Products/Debug-iphoneos/RNBackgroundFetch/TSBackgroundFetchPrivacy.bundle/PrivacyInfo.xcprivacy
▸ Compiling simdjson.cpp
▸ Compiling simdjson-dummy.m
❌ fatal error: module map file '/Users/glabsmac/Documents/PROJECT/project/Project-react-native/ios/build/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found
❌ fatal error: module map file '/Users/glabsmac/Documents/PROJECT/project/Project-react-native/ios/build/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found
❌ fatal error: module map file '/Users/glabsmac/Documents/PROJECT/project/Project-react-native/ios/build/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found
❌ fatal error: module map file '/Users/glabsmac/Documents/PROJECT/project/Project-react-native/ios/build/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found
❌ fatal error: module map file '/Users/glabsmac/Documents/PROJECT/project/Project-react-native/ios/build/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found
❌ fatal error: module map file '/Users/glabsmac/Documents/PROJECT/project/Project-react-native/ios/build/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found
▸ Compiling simdjson_vers.c
❌ fatal error: module map file '/Users/glabsmac/Documents/PROJECT/project/Project-react-native/ios/build/Debug-iphoneos/FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found
▸ Processing ResourceBundle-ReactNativeBlobUtilPrivacyInfo-react-native-blob-util-Info.plist
▸ Copying /Users/glabsmac/Library/Developer/Xcode/DerivedData/Project-bzgimiggenvixufobizueooyyidr/Build/Products/Debug-iphoneos/react-native-blob-util/ReactNativeBlobUtilPrivacyInfo.bundle/PrivacyInfo.xcprivacy
▸ Processing ResourceBundle-nanopb_Privacy-nanopb-Info.plist
▸ Copying /Users/glabsmac/Library/Developer/Xcode/DerivedData/Project-bzgimiggenvixufobizueooyyidr/Build/Products/Debug-iphoneos/nanopb/nanopb_Privacy.bundle/PrivacyInfo.xcprivacy
Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ProjectUAT' from project 'Project')
Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ProjectUAT' from project 'Project')
Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ProjectUAT' from project 'Project')
Run script build phase '[CP-User] [RNFB] Crashlytics Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ProjectUAT' from project 'Project')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'fmt' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Codegen' from project 'Pods')
Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RCT-Folly' from project 'Pods')
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening Project.xcworkspace.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Dependencies
{
"name": "Project",
"version": "0.0.1",
"private": true,
"reactNativePermissionsIOS": [
"AppTrackingTransparency",
"Calendars",
"Camera",
"Contacts",
"LocationAccuracy",
"LocationAlways",
"LocationWhenInUse",
"Notifications",
"PhotoLibrary",
"PhotoLibraryAddOnly"
],
"dependencies": {
"@apollo/react-hooks": "^4.0.0",
"@bam.tech/react-native-image-resizer": "^3.0.5",
"@nozbe/watermelondb": "^0.25.5",
"@react-native-community/async-storage": "^1.8.1",
"@react-native-community/blur": "^4.3.2",
"@react-native-community/checkbox": "^0.5.14",
"@react-native-community/cli": "^10.2.2",
"@react-native-community/datetimepicker": "^7.6.2",
"@react-native-community/geolocation": "^3.0.5",
"@react-native-community/masked-view": "^0.1.6",
"@react-native-community/push-notification-ios": "^1.10.1",
"@react-native-firebase/app": "^19.2.2",
"@react-native-firebase/crashlytics": "^19.2.2",
"@react-native-firebase/messaging": "^19.2.2",
"@react-native-picker/picker": "^2.4.9",
"@react-navigation/bottom-tabs": "^6.5.7",
"@react-navigation/material-top-tabs": "^6.6.2",
"@react-navigation/native": "^6.1.6",
"@react-navigation/stack": "^6.3.16",
"@turf/turf": "6.5.0",
"add": "^2.0.6",
"alasql": "^3.1.0",
"apollo-boost": "^0.4.9",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.10",
"apollo-link": "^1.2.14",
"apollo-link-context": "^1.0.20",
"apollo-link-error": "^1.1.13",
"apollo-link-http": "^1.5.17",
"apollo-link-state": "^0.4.2",
"apollo-upload-client": "^17.0.0",
"axios": "^1.3.4",
"deprecated-react-native-prop-types": "^4.0.0",
"formik": "^2.2.9",
"graphql": "^16.6.0",
"graphql-tag": "^2.12.6",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"moment-timezone": "^0.5.41",
"patch-package": "^6.5.1",
"postinstall-postinstall": "^2.1.0",
"react": "18.2.0",
"react-native": "0.71.4",
"react-native-auto-height-image": "^3.2.4",
"react-native-background-fetch": "^4.2.4",
"react-native-blob-util": "^0.19.6",
"react-native-calendars": "1.1280.0",
"react-native-camera-kit": "^13.0.0",
"react-native-circular-progress": "^1.3.8",
"react-native-config": "^1.5.0",
"react-native-contacts": "^7.0.5",
"react-native-detector": "^0.2.3",
"react-native-device-info": "^10.4.0",
"react-native-document-picker": "^9.1.0",
"react-native-elements": "^3.4.3",
"react-native-email": "^2.1.0",
"react-native-exception-handler": "^2.10.10",
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.9.0",
"react-native-image-crop-picker": "^0.39.0",
"react-native-image-picker": "^5.1.0",
"react-native-image-viewing": "^0.2.2",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-linear-gradient": "^2.6.2",
"react-native-maps": "1.7.1",
"react-native-modal": "^13.0.1",
"react-native-modal-datetime-picker": "^14.0.1",
"react-native-new-snap-carousel": "^3.9.3",
"react-native-pager-view": "^6.1.4",
"react-native-paper": "^5.3.1",
"react-native-pdf": "^6.7.4",
"react-native-permissions": "^3.7.3",
"react-native-push-notification": "^8.1.1",
"react-native-qrcode-svg": "^6.2.0",
"react-native-rate": "^1.2.12",
"react-native-reanimated": "^3.0.2",
"react-native-reanimated-carousel": "^3.3.0",
"react-native-render-html": "^6.3.4",
"react-native-restart": "^0.0.27",
"react-native-safe-area-context": "^4.5.0",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "^3.20.0",
"react-native-simple-toast": "^3.0.2",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "^13.8.0",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^3.5.1",
"react-native-vcards": "^2.5.0",
"react-native-vector-icons": "^9.2.0",
"react-native-webview": "^12.0.2",
"react-navigation": "^4.3.7",
"react-navigation-tabs": "^2.8.11",
"recyclerlistview": "^4.2.0",
"rn-sliding-up-panel": "^2.4.6",
"vcf": "^2.1.1",
"victory-native": "^36.6.8",
"yarn": "^1.22.19",
"yup": "^1.0.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.21.0",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-transform-flow-strip-types": "^7.21.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native-community/eslint-config": "^3.2.0",
"@tsconfig/react-native": "^2.0.2",
"@types/jest": "^29.2.1",
"@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.73.8",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
},
"jest": {
"preset": "react-native"
}
}
Cocoapod
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
# source 'https://github.com/CocoaPods/Specs.git'
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
def pod_share
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseCrashlytics', :modular_headers => true
pod 'FirebaseMessaging', :modular_headers => true
pod 'FirebaseSessions', :modular_headers => true
pod 'FirebaseInstallations', :modular_headers => true
pod 'GoogleDataTransport', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'PromisesObjC', :modular_headers => true
pod 'PromisesSwift', :modular_headers => true
pod 'nanopb', :modular_headers => true
pod 'WatermelonDB', :path => '../node_modules/@nozbe/watermelondb'
# NOTE: Do not remove, needed to keep WatermelonDB compiling:
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi', :modular_headers => true
# NOTE: This is required as of v0.23
pod 'simdjson', path: '../node_modules/@nozbe/simdjson'
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
# :hermes_enabled => flags[:hermes_enabled],
:hermes_enabled => false,
: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,
# uncomment these lines when you want to debug using Flipper
# :flipper_configuration => FlipperConfiguration.enabled(
# ["Debug"], { 'Flipper' => '0.189.0' }
# ),
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
end
target 'Project' do
pod_share
target 'ProjectTests' do
inherit! :complete
# Pods for testing
end
end
target 'ProjectUAT' do
pod_share
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
puts "===EXECUTE SET IOS DEPLOYMENT TARGET"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '17.2'
end
end
installer.pods_project.build_configurations.each do |config|
puts "===EXECUTE RM UNARY BINARY FUNCTION"
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION'
end
end
I have the same error for a while did you manage to resolve it?
I have the same error, I tried removing/reinstalling the pods, cache, DerivedData
from Xcode but it still does not work. 😞
▸ Compiling RCTDevSettings.mm
▸ Compiling RCTDevMenu.mm
▸ Compiling RCTDevLoadingView.mm
▸ Compiling RCTClipboard.mm
▸ Compiling RCTAppearance.mm
▸ Compiling RCTAppState.mm
▸ Compiling RCTAlertManager.mm
▸ Compiling RCTAlertController.mm
▸ Compiling RCTActionSheetManager.mm
▸ Compiling RCTAccessibilityManager.mm
▸ Compiling Pods-LoopManager-dummy.m
❌ .../ios/Pods/Headers/Public/ReactCommon/ReactCommon.modulemap:1:8: redefinition of module 'ReactCommon'
module ReactCommon {
^
There is no support for modular headers workarounds. This is clear in the documentation, use_frameworks is a strict requirement in the Podfile.
Closing.
I use Firebase without use_frameworks. You can just use Firebase directly, withouth third party libraries:
// ios/Podfile target 'AppName' do
...
pod 'FirebaseCore', :modular_headers => true pod 'Firebase', :modular_headers => true pod 'FirebaseCoreInternal', :modular_headers => true pod 'GoogleUtilities', :modular_headers => true
// android/app/build.gradle dependencies { // ... // Import the Firebase BoM // When using the BoM, you don't specify versions in Firebase library dependencies implementation platform("com.google.firebase:firebase-bom:31.5.0") // implementation "com.google.firebase:firebase-analytics" implementation "com.google.firebase:firebase-messaging" // ... }
@cauediademi can you elaborate? You're using React Native Firebase without use_frameworks
?
I'm facing endless nightmares trying to get my project to build with Expo EAS due to use_frameworks
. Even when I had it working, I came back some weeks later and it's erroring during Fastlane again.
When you got dead end, maybe you can try to create new project, try to install latest dependency one by one. configure your firebase and pod to latest, make sure everything work fine, then copy all your codes into new project.
really no one has a solution for this? i even tried one from a different dude, which was excluding the arm64 from debug and still didn't work
I believe there is no solution because - for better or worse - use_frameworks is a requirement of firebase-ios-sdk, thus it is a requirement here one level higher in react-native-firebase. No workarounds with modular_headers are supported so I think most people have found a way to live with the use_frameworks requirement somehow (most likely through careful module selection such that they avoid modules that don't work with it - that's what I've done anyway)
@mikehardy I wonder if you have any thoughts on the sporadic mentions of getting it working without use_frameworks
- eg: https://github.com/invertase/react-native-firebase/issues/6332#issuecomment-2322972795
I certainly wouldn't expect you to try supporting that, but I wonder if you have any thoughts on a more theoretical level - like, is advising again use_modular
more about ensuring a reasonable support load than about a strict incompatibility? Is it liable to break at any moment?
most people have found a way to live with the use_frameworks requirement somehow (most likely through careful module selection such that they avoid modules that don't work with it - that's what I've done anyway)
Not really a react-native-firebase
problem here, but we can't get it to work above 0.72.x
when using use_frameworks
due to a bug in React Native that seemingly searches the wrong header paths in monorepos. Unfortunately countless attempts to fix that have been unsuccessful, so I'd be very interested in any thoughts you might have on the possibility of foregoing it, even though I know you couldn't reasonably provide support for nor endorse it.
I'm just looking at it as a possible stop-gap measure to give us time to put together a repro and hopefully get the underlying issue resolved.
@Nantris firebase-ios-sdk strictly requires it, and as they port more modules to Swift, on their own schedule, more workaround stuff is needed. It's a moving target, so conforming to their stated build requirement is the only long-term supportable solution IMHO - there are enough other problems to deal with I don't attempt to work around it personally