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.66k stars 2.21k forks source link

[🐛] Errors in target 'FirebaseCoreInternal' from project 'Pods #7838

Closed Nantris closed 1 month ago

Nantris commented 3 months ago

Issue

Build fails with:

[RUN_FASTLANE] ▸ ** BUILD FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸    CompileSwift normal x86_64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/Storage.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal x86_64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/StorageFactory.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal x86_64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/WeakContainer.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal x86_64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatsPayload.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal x86_64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatStorage.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal x86_64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/RingBuffer.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal arm64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatsPayload.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal arm64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatStorage.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal arm64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/RingBuffer.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal arm64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/Storage.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal arm64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/StorageFactory.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwift normal arm64 /var/folders/y5/pp8xq1qd1f78jth_11nsxndh0000gn/T/eas-build-local-nodejs/2ef58d11-a41c-4e8e-8099-e21ea9c41818/build/packages/mobile/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/WeakContainer.swift (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'FirebaseCoreInternal' from project 'Pods')
[RUN_FASTLANE] ▸ (14 failures)

I've followed all of the docs but still I get this error. I previously had this building, but it mysteriously started throwing errors. I've worked through them one by one, but now I'm quite stuck on this one and can't find any configuration problem on my end. I even tried the unsupported use_modular_headers just to see if it changed anything, but the error remains identical.


Project Files

Javascript

Click To Expand

#### `package.json`: ```json { "name": "mobile", "version": "1.0.0", "private": true, "scripts": { "start-auto": "cross-env NODE_OPTIONS=--max_old_space_size=6192 expo start", "start": "cross-env IS_DEV_CLIENT=1 expo start", "build-android": "gulp incrementVersionCode && eas build --profile=safe-production -p=android", "postinstall": "expo-yarn-workspaces postinstall", "android": "expo run:android", "ios": "expo run:ios" }, "dependencies": { "@emotion/native": "^11.11.0", "@expo/vector-icons": "^13.0.0", "@react-native-async-storage/async-storage": "1.18.2", "@react-native-community/datetimepicker": "7.2.0", "@react-native-community/netinfo": "9.3.10", "@react-native-community/slider": "4.4.2", "@react-native-firebase/app": "~18.7.0", "@react-native-firebase/auth": "~18.7.0", "@react-native-firebase/database": "~18.7.0", "@react-native-firebase/perf": "~18.7.0", "@react-native-firebase/storage": "~18.7.0", "@react-native-masked-view/masked-view": "0.2.9", "@react-native-picker/picker": "2.4.10", "@react-navigation/core": "^6.4.10", "@react-navigation/drawer": "^6.6.6", "@react-navigation/material-top-tabs": "^6.6.5", "@react-navigation/native": "^6.1.9", "@react-navigation/native-stack": "^6.9.17", "@react-navigation/stack": "^6.3.10", "@rneui/base": "4.0.0-rc.7", "@rneui/themed": "4.0.0-rc.7", "@shopify/flash-list": "1.4.3", "buffer": "^6.0.3", "deprecated-react-native-listview": "^0.0.8", "deprecated-react-native-prop-types": "^2.3.0", "expo": "~49.0.21", "expo-application": "~5.3.0", "expo-asset": "~8.10.1", "expo-background-fetch": "~11.3.0", "expo-build-properties": "~0.8.3", "expo-calendar": "~11.3.2", "expo-clipboard": "~4.3.1", "expo-community-flipper": "~48.0.1", "expo-constants": "~14.4.2", "expo-dev-client": "~2.4.12", "expo-file-system": "~15.4.5", "expo-font": "~11.4.0", "expo-haptics": "~12.4.0", "expo-intent-launcher": "~10.7.0", "expo-keep-awake": "~12.3.0", "expo-localization": "~14.3.0", "expo-notifications": "~0.20.1", "expo-random": "~13.2.0", "expo-screen-orientation": "~6.0.6", "expo-secure-store": "~12.3.1", "expo-splash-screen": "~0.20.5", "expo-status-bar": "~1.6.0", "expo-system-ui": "~2.4.0", "expo-task-manager": "~11.3.0", "expo-updates": "~0.18.19", "fast-text-encoding": "1.0.6", "history": "^4.10.1", "react": "18.2.0", "react-native": "0.72.6", "react-native-action-button": "^2.8.5", "react-native-animatable": "^1.3.3", "react-native-device-log": "1.0.2", "react-native-dialog": "~9.3.0", "react-native-easy-toast": "~2.3.0", "react-native-gesture-handler": "~2.12.0", "react-native-get-random-values": "~1.9.0", "react-native-image-zoom-viewer": "^3.0.1", "react-native-indicators": "^0.17.0", "react-native-mmkv": "^2.11.0", "react-native-pager-view": "6.2.0", "react-native-platform-touchable": "^1.1.1", "react-native-quick-base64": "^2.0.7", "react-native-reanimated": "~3.3.0", "react-native-render-html": "^6.3.0", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-shared-element": "0.8.8", "react-native-svg": "13.9.0", "react-native-vector-icons": "^9.2.0", "react-native-webview": "13.2.2", "react-navigation-backhandler": "^2.0.1" }, "devDependencies": { "@babel/core": "^7.21.0", "@rnx-kit/metro-plugin-cyclic-dependencies-detector": "~1.1.0", "@rnx-kit/metro-serializer": "~1.0.0", "babel-plugin-import-globals": "2.0.0", "babel-plugin-transform-inline-environment-variables": "0.4.4", "expo-yarn-workspaces": "~2.1.0", "react-native-monorepo-tools": "^1.0.0" } } ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```

iOS

Click To Expand

#### `ios/Podfile`: - [x] I'm not using Pods (I'm using EAS to manage it) - [] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```


Android

Click To Expand

Not applicable - iOS problem only


Environment

Click To Expand

**`react-native info` output:** ``` System: OS: macOS 12.6.8 Memory: 2.28 GB / 8.00 GB Shell: version: 5.8.1 path: /bin/zsh Binaries: Node: version: 20.11.0 path: ~/.nvm/versions/node/v20.11.0/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v20.11.0/bin/yarn npm: version: 10.2.4 path: ~/.nvm/versions/node/v20.11.0/bin/npm Watchman: version: 2024.05.06.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 21.2 - iOS 15.2 - macOS 12.1 - tvOS 15.2 - watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: version: 13.2.1/13C100 path: /usr/bin/xcodebuild Languages: Java: Not Found Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: Not Found react-native: Not Found react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: Not found newArchEnabled: Not found iOS: hermesEnabled: Not found newArchEnabled: Not found ``` - **Platform that you're experiencing the issue on**: - [x] 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:** - `e.g. 5.4.3` - **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `Y/N` & `VERSION`


mikehardy commented 3 months ago

Please try with current versions of react-native and react-native-firebase:


    "@react-native-firebase/app": "~18.7.0",
    "@react-native-firebase/auth": "~18.7.0",
    "@react-native-firebase/database": "~18.7.0",
    "@react-native-firebase/perf": "~18.7.0",
    "@react-native-firebase/storage": "~18.7.0",

Additionally, you may like https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh where I have a fully automated demonstration script that makes a new react-native project from scratch and integrate react-native-firebase then test build it in a few configurations. It works every time - so this will be related to something happening in your app settings, some other module interfering with the build settings you need, or perhaps Expo, I'm not sure - but my script positively affirms that it can build and run fine when configured per documentation

nguyenthetuan commented 3 months ago

Screen Shot 2024-06-24 at 14 49 26 please fix error

Nantris commented 3 months ago

I had to upgrade to 19.2.2 as mentioned in another thread to resolve this. I couldn't make 18.x work.

github-actions[bot] commented 1 month 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.

russellwheatley commented 1 month ago

@Nantris - thank you for confirming you were able to resolve the issue 🙏