react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

'react/bridging/CallbackWrapper.h' file not found🔧

Open NathanielNLA opened this issue 1 year ago • 3 comments

How were you trying to build the app?

npm i --legacy-peer-deps npx react-native run-ios

Full build logs

** BUILD FAILED **

The following build commands failed:
        CompileC /Users/<>/Library/Developer/Xcode/DerivedData/<>-fvpiedjnqebsuqbaqkpkfoakwdhh/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/VisionCamera.build/Objects-normal/arm64/JSITypedArray.o /Users/<>/Desktop/<>/repos/<>/node_modules/react-native-vision-camera/cpp/JSITypedArray.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'VisionCamera' from project 'Pods')
(1 failure)

'react/bridging/CallbackWrapper.h' file not found

Project dependencies

"dependencies": {
    "@babel/polyfill": "^7.12.1",
    "@react-native-async-storage/async-storage": "^1.18.2",
    "@react-native-community/datetimepicker": "^7.1.0",
    "@react-native-firebase/app": "^18.7.1",
    "@react-native-firebase/messaging": "^18.7.1",
    "@react-native-picker/picker": "^2.4.6",
    "@react-native/normalize-color": "^2.0.0",
    "@react-navigation/drawer": "^6.6.6",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.6.2",
    "@types/rn-fetch-blob": "^1.2.4",
    "anymatch": "^3.1.2",
    "eslint-config-prettier": "^8.5.0",
    "i18next": "^22.4.9",
    "lodash": "^4.17.21",
    "npm-check": "^6.0.1",
    "react": "18.2.0",
    "react-i18next": "^12.1.4",
    "react-native": "0.72.5",
    "react-native-audio-recorder-player": "^3.6.0",
    "react-native-chart-kit": "^6.12.0",
    "react-native-dropdown-picker": "^5.4.2",
    "react-native-gesture-handler": "^2.12.0",
    "react-native-gifted-chat": "^1.0.1",
    "react-native-inappbrowser-reborn": "^3.6.3",
    "react-native-keychain": "^8.1.1",
    "react-native-modern-datepicker": "^1.0.0-beta.91",
    "react-native-pathjs-charts": "^0.0.34",
    "react-native-permissions": "^3.8.0",
    "react-native-progress": "^5.0.0",
    "react-native-reanimated": "3.4.2",
    "react-native-safe-area-context": "^4.5.3",
    "react-native-screens": "^3.21.0",
    "react-native-super-grid": "^4.6.1",
    "react-native-svg": "^13.9.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-native-ui-lib": "^6.14.1",
    "react-native-vector-icons": "^9.2.0",
    "react-native-version-check": "^3.4.7",
    "react-native-vision-camera": "^3.6.13",
    "react-native-wheel-pick": "^1.2.0",
    "react-native-worklets-core": "^0.2.1",
    "rn-fetch-blob": "^0.12.0",
    "typescript-cookie": "^1.0.6"
  },

VisionCamera Version

3.6.13

Target platforms

iOS

Operating system

MacOS

Can you build the VisionCamera Example app?

Yes, I can successfully build the Example app here

Additional information

NathanielNLA avatar Dec 05 '23 10:12 NathanielNLA

Same here

IlanAMG avatar Jan 04 '24 13:01 IlanAMG

I had the same issue. Don't have a solution but there seems to be an issue with use_frameworks! :linkage => :static in the Podfile which is required by firebase. After removing firebase from my project, the error was resolved.

henrik-d avatar Jan 10 '24 09:01 henrik-d

I need firebase in the project...

For my part, the build no longer breaks when I deactivate the frame processors. The problem is that I also need it in the project.

IlanAMG avatar Jan 10 '24 09:01 IlanAMG

Any solution for this? I am using expo and firebase, get the same issue here. My build failed when I include useFrameworks: "static"

whentao avatar Jan 11 '24 23:01 whentao

same, any solution?

Amurmurmur avatar Jan 12 '24 10:01 Amurmurmur

Fixed. Just apply this patch file and enjoy your Friday:

react-native-vision-camera+3.7.1.patch
diff --git a/node_modules/react-native-vision-camera/VisionCamera.podspec b/node_modules/react-native-vision-camera/VisionCamera.podspec
index 435e579..3952e38 100644
--- a/node_modules/react-native-vision-camera/VisionCamera.podspec
+++ b/node_modules/react-native-vision-camera/VisionCamera.podspec
@@ -68,6 +68,7 @@ Pod::Spec.new do |s|
   s.dependency "React"
   s.dependency "React-Core"
   s.dependency "React-callinvoker"
+  s.dependency "ReactCommon"
 
   if hasWorklets
     s.dependency "react-native-worklets-core"

Amurmurmur avatar Jan 12 '24 12:01 Amurmurmur

I also faced the same issue and I am using react-native-vision-camera ver 2.16.1. I solved the issue by adding s.dependency "ReactCommon" into the node_modules/react-native-vision-camera/VisionCamera.podspec at the last line as shown below.

Pod::Spec.new do |s|
  ...
  s.dependency "React-callinvoker"
  s.dependency "React"
  s.dependency "React-Core"
  s.dependency "ReactCommon"    <== Add this line
end

After made the changes, I execute pod install command then recompile the app again. Hope this will help those who using V2 of react-native-vision-camera.

sekhuat avatar Jan 14 '24 08:01 sekhuat

This solved it for me: with use_frameworks!

update your Podfile

` post_install do |installer| installer.pods_project.targets.each do |target| ..

target.build_configurations.each do |config| config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' config.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native/ReactCommon" ' if target.name === "RNReanimated" config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17' end end

NathanielNLA avatar Jan 14 '24 09:01 NathanielNLA

Hey - I think this is not related to VisionCamera. If it is, please create a PR to fix this

mrousavy avatar Jan 15 '24 13:01 mrousavy