margelo / margelo/react-native-vision-camera
🛠️ (iOS) iOS build fails: 'React/RCTMessageThread.h' file not found when building VisionCameraWorklets (when using react-native-vision-camera-worklets)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9.6k
- Forks
- 1.4k
- Avg merge
- 1d 28m
- Merged PRs (30d)
- 4
Description
Prerequisites
- I have read and followed every applicable step in the Nitro Modules Troubleshooting guide.
- I have read the VisionCamera Troubleshooting guide and Installation guide.
- I did a clean build — deleted
node_modules,ios/Pods,ios/build, and Xcode's DerivedData, then reinstalled. - I searched existing build-error issues and found nothing matching.
Full build error output
Executing react-native-vision-camera Pods/VisionCamera » Copy generated compatibility header
› Packaging expo-dev-launcher Pods/expo-dev-launcher » libexpo-dev-launcher.a
❌ (ios/Pods/Headers/Public/RNWorklets/worklets/apple/WorkletsMessageThread.h:4:9)
2 |
3 | #import <Foundation/Foundation.h>
> 4 | #import <React/RCTMessageThread.h>
| ^ 'React/RCTMessageThread.h' file not found
5 |
6 | namespace facebook {
7 | namespace react {
❌ (node_modules/react-native-vision-camera-worklets/cpp/JSIConverter+AsyncQueue.hpp:12:10)
10 | #include <jsi/jsi.h>
11 | #if __has_include(<worklets/RunLoop/AsyncQueue.h>)
> 12 | #include <worklets/RunLoop/AsyncQueue.h>
| ^ could not build module 'RNWorklets'
13 | #elif __has_include(<RNWorklets/worklets/RunLoop/AsyncQueue.h>)
14 | #include <RNWorklets/worklets/RunLoop/AsyncQueue.h>
15 | #else
❌ (ios/Pods/Headers/Public/RNWorklets/worklets/apple/WorkletsMessageThread.h:4:9)
2 |
3 | #import <Foundation/Foundation.h>
> 4 | #import <React/RCTMessageThread.h>
| ^ 'React/RCTMessageThread.h' file not found
5 |
6 | namespace facebook {
7 | namespace react {
❌ (node_modules/react-native-vision-camera-worklets/cpp/JSIConverter+AsyncQueue.hpp:12:10)
10 | #include <jsi/jsi.h>
11 | #if __has_include(<worklets/RunLoop/AsyncQueue.h>)
> 12 | #include <worklets/RunLoop/AsyncQueue.h>
| ^ could not build module 'RNWorklets'
13 | #elif __has_include(<RNWorklets/worklets/RunLoop/AsyncQueue.h>)
14 | #include <RNWorklets/worklets/RunLoop/AsyncQueue.h>
15 | #else
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherUpdatesHelper.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherRCTDevSettings.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherDeferredRCTRootView.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » expo-dev-launcher-dummy.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherRCTBridge.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherDevMenuExtensions.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherRedBox.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherManifestParser.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncher.m
› Compiling expo-dev-launcher Pods/expo-dev-launcher » EXDevLauncherController.m
⚠️ (../../../../Public/React-Core/React/RCTEventDispatcherProtocol.h:131:12)
@interface RCTBridge (RCTEventDispatcher)
^ duplicate definition of category 'RCTEventDispatcher' on interface 'RCTBridge' [-Wobjc-duplicate-category-definition]
› Packaging expo-dev-launcher Pods/expo-dev-launcher » libexpo-dev-launcher.a
› Executing expo-dev-launcher Pods/expo-dev-launcher » Copy generated compatibility header
Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this issue, 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 'hermes-engine' from project 'Pods')
▸ ** BUILD FAILED **
▸ The following build commands failed:
▸ SwiftCompile normal arm64 /Users/expo/workingdir/build/node_modules/react-native-vision-camera-worklets/nitrogen/generated/ios/VisionCameraWorkletsAutolinking.swift (in target 'VisionCameraWorklets' from project 'Pods')
▸ SwiftCompile normal arm64 Compiling\ VisionCameraWorkletsAutolinking.swift /Users/expo/workingdir/build/node_modules/react-native-vision-camera-worklets/nitrogen/generated/ios/VisionCameraWorkletsAutolinking.swift (in target 'VisionCameraWorklets' from project 'Pods')
▸ SwiftCompile normal x86_64 /Users/expo/workingdir/build/node_modules/react-native-vision-camera-worklets/nitrogen/generated/ios/VisionCameraWorkletsAutolinking.swift (in target 'VisionCameraWorklets' from project 'Pods')
▸ Building workspace testcameraframes with scheme testcameraframes and configuration Release
▸ (4 failures)
Exit status: 65
+---------------------------------------+
| Build environment |
+-------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.231.1 |
| sdk | iPhoneSimulator26.2.sdk |
+-------------+-------------------------+
Looks like fastlane ran into a build/archive error with your project
It's hard to tell what's causing the error, so we wrote some guides on how
to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
Before submitting an issue on GitHub, please follow the guide above and make
sure your project is set up correctly.
fastlane uses `xcodebuild` commands to generate your binary, you can see the
the full commands printed out in yellow in the above log.
Make sure to inspect the output above, as usually you'll find more error information there
[!] Error building the application - see the log above
Error: The "Run fastlane" step failed because of an error in the Xcode build process. We automatically detected following errors in your Xcode build logs:
- 'React/RCTMessageThread.h' file not found
- could not build module 'RNWorklets'
- could not build Objective-C module 'VisionCameraWorklets'
- 'React/RCTMessageThread.h' file not found
- could not build module 'RNWorklets'
- could not build Objective-C module 'VisionCameraWorklets'
Refer to "Xcode Logs" below for additional, more detailed logs.
VisionCamera version
5.0.4
React Native version
0.81.5
React Native architecture
New Architecture (Fabric / bridgeless)
Expo?
Expo 54
Host macOS version
EAS Build (iOS)
Xcode version
EAS Build hosted Xcode environment
iOS Deployment Target
15.1
CocoaPods version
?
Ruby version
?
Build target
Simulator
Package manager
npm
Reproduction repository
https://github.com/Khaoula-Ghalimi/test_camera_frames (5.0.4)
https://github.com/Khaoula-Ghalimi/empty_test_project (5.0.11)
Additional context
So I was in the process of testing camera frames as I do need that for my project with YOLO where I send frame by frame to a nitro module I finished the setup of android which worked perfectly but as I passed to ios I tried firstly to build and see if my nitro module pass but it doesn't even reach it, it shows the react-native-vision-camera-worklets uses a file called React/RCTMessageThread.h which no longer exist in the latest version of react native?
I created this new test project without my nitro module at first it worked with only react-native-vision-camera but when I added react-native-vision-camera-worklets it crashed I tried to clean I deleted my package-lock.json and node_modules but to no avail.
my main project uses 5.0.11 (latest version) as a version of vision camera and its worklets and it still happens. I do have another project that do the same it has 5.0.11 as a version I thought creating a new project can solve things but well nothing works https://github.com/Khaoula-Ghalimi/empty_test_project
Submission
- I pasted the full error output as text (not a screenshot).
- I wrote this report in my own words. I did not paste AI-generated summaries of the error.
- The reproduction repository I linked is public and reproduces the build error on a fresh clone. I understand the issue will be closed without one.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with node_modules/react-native-vision-camera-worklets/cpp/JSIConverter+AsyncQueue.hpp and ios/Pods/Headers/Public/RNWorklets/worklets/apple/WorkletsMessageThread.h, then compare their React Native 0.81.5 header expectations against the linked reproduction projects. Done means a fresh EAS iOS simulator build with react-native-vision-camera-worklets succeeds without the missing RCTMessageThread or RNWorklets errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, react-native
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100