Description
We upgraded from React Native 0.72.4 to 0.75.1. We had a working 0.72.4 feature branch integrating firebase cloud messaging. After merging the 0.75.1 branch (without FCM), we get a build error. I believe it is because we have to use
use_frameworks! :linkage => :static
with react-native-firebase.
I've spent days trying all kinds of fixes including patching all jsinspector-modern imports in node_modules with jsinspector_modern, adding pre and post install scripts to remove the offending files, running in production mode, turning hermes off, every combination of use_modular_headers! and use_frameworks! on/off, static/dynamic. I'm not very familiar with the inner workings of the Podfile and ios builds but I did a lot of research and couldn't come up with a solution.
Since FCM is so common, I'm surprised no one else has this error, which makes me think it must be something small I've missed. The error does mention react-native-image-picker but it looks like it's coming from much deeper in the react-native files. However, if I remove react-native-image-picker, the build is successful, so maybe the issue is in fact with that library?
I've created a reproducible example using the latest RN version. I also tried a MRE with the version we use, 0.75.1.
Not using Expo.
Steps to reproduce
Repo: https://github.com/gabriellend/rn-jsinspector-repro
git clone https://github.com/gabriellend/rn-jsinspector-repro.git
install dependencies
open ios/ReproducerApp.xcworkspace
run project
React Native Version
0.75.1, 0.79.1
Affected Platforms
Build - MacOS
Output of npx @react-native-community/cli info
0.75.1:
System:
OS: macOS 15.4
CPU: (12) arm64 Apple M2 Pro
Memory: 460.48 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.7.0
path: ~/.nvm/versions/node/v22.7.0/bin/node
Yarn: Not Found
npm:
version: 10.9.2
path: ~/Desktop/ENABLE/node_modules/.bin/npm
Watchman:
version: 2025.04.14.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.21
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.1
wanted: 0.75.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
=======================================
0.79.1:
System:
OS: macOS 15.4
CPU: (12) arm64 Apple M2 Pro
Memory: 775.70 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.7.0
path: ~/.nvm/versions/node/v22.7.0/bin/node
Yarn: Not Found
npm:
version: 10.8.2
path: ~/.nvm/versions/node/v22.7.0/bin/npm
Watchman:
version: 2025.04.14.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.21
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: 18.0.0
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.1
wanted: 0.79.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
While building module 'React' imported from /Users/user/AwesomeProject/node_modules/react-native-image-picker/ios/ImagePickerManager.h:1:
In file included from <module-includes>:1:
In file included from /Users/user/AwesomeProject/ios/Pods/Target Support Files/React-Core/React-Core-umbrella.h:41:
/Users/user/AwesomeProject/node_modules/react-native/React/Base/RCTBridge+Inspector.h:11:9: fatal error: 'jsinspector-modern/ReactCdp.h' file not found
11 | #import <jsinspector-modern/ReactCdp.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/user/AwesomeProject/node_modules/react-native-image-picker/ios/ImagePickerManager.mm:1:
/Users/user/AwesomeProject/node_modules/react-native-image-picker/ios/ImagePickerManager.h:1:9: fatal error: could not build module 'React'
1 | #import <React/RCTBridgeModule.h>
| ~~~~~~~^
2 errors generated.
MANDATORY Reproducer
https://github.com/gabriellend/rn-jsinspector-repro.git
Screenshots and Videos
No response
Description
We upgraded from React Native 0.72.4 to 0.75.1. We had a working 0.72.4 feature branch integrating firebase cloud messaging. After merging the 0.75.1 branch (without FCM), we get a build error. I believe it is because we have to use
with react-native-firebase.
I've spent days trying all kinds of fixes including patching all
jsinspector-modernimports in node_modules withjsinspector_modern, adding pre and post install scripts to remove the offending files, running in production mode, turning hermes off, every combination of use_modular_headers! and use_frameworks! on/off, static/dynamic. I'm not very familiar with the inner workings of the Podfile and ios builds but I did a lot of research and couldn't come up with a solution.Since FCM is so common, I'm surprised no one else has this error, which makes me think it must be something small I've missed. The error does mention react-native-image-picker but it looks like it's coming from much deeper in the react-native files. However, if I remove react-native-image-picker, the build is successful, so maybe the issue is in fact with that library?
I've created a reproducible example using the latest RN version. I also tried a MRE with the version we use, 0.75.1.
Not using Expo.
Steps to reproduce
Repo: https://github.com/gabriellend/rn-jsinspector-repro
React Native Version
0.75.1, 0.79.1
Affected Platforms
Build - MacOS
Output of
npx @react-native-community/cli info0.75.1:
=======================================
0.79.1:
Stacktrace or Logs
MANDATORY Reproducer
https://github.com/gabriellend/rn-jsinspector-repro.git
Screenshots and Videos
No response