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 lvothnrv opened this issue 2 years ago • 6 comments

What were you trying to do?

Hello here since I switched to react-native 0.69.2 I have this bug that drives me crazy I tested everything nothing happens I even created a react-native project project and just installed react-native-vision- camera I have the same problem..

Capture d’écran 2022-07-21 à 23 34 37

Reproduceable Code

No response

What happened instead?

I just can't start my application anymore.

Relevant log output

No response

Device

iPhone 13

VisionCamera Version

2.14.0

Additional information

lvothnrv avatar Jul 21 '22 19:07 lvothnrv

Looks like a fix was merged in react-native. Until it's released, adding this to my post_install block in ios/Podfile fixed it (I have no idea if the issue affects Android too, we're only targeting iOS right now).

installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
  target_installation_result.native_target.build_configurations.each do |config|
    # For third party modules who have React-bridging dependency to search correct headers
    config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
    config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" '
    config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" '
  end
end

dmarkow avatar Jul 22 '22 14:07 dmarkow

Looks like a fix was merged in react-native. Until it's released, adding this to my post_install block in ios/Podfile fixed it (I have no idea if the issue affects Android too, we're only targeting iOS right now).

installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
  target_installation_result.native_target.build_configurations.each do |config|
    # For third party modules who have React-bridging dependency to search correct headers
    config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
    config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" '
    config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" '
  end
end

Hi thank you for your comment but I don't know if it's me who misplaces the piece of code you gave me but it doesn't work can you show me your code please...

lvothnrv avatar Jul 24 '22 19:07 lvothnrv

@lvothnrv In you ios/Podfile, there should be a line that starts with post_install do |installer|. Put this inside that.

dmarkow avatar Jul 24 '22 19:07 dmarkow

@lvothnrv In you ios/Podfile, there should be a line that starts with post_install do |installer|. Put this inside that.

I did that but it doesn't work..

post_install do |installer| installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result| target_installation_result.native_target.build_configurations.each do |config| # For third party modules who have React-bridging dependency to search correct headers config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" ' config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" ' end end react_native_post_install(installer) __apply_Xcode_12_5_M1_post_install_workaround(installer) end

lvothnrv avatar Jul 24 '22 19:07 lvothnrv

@lvothnrv Did you run pod install again after adding this? If so, then I'm not sure what else to add...

dmarkow avatar Jul 24 '22 19:07 dmarkow

@lvothnrv Did you run pod install again after adding this? If so, then I'm not sure what else to add...

No I didn't.. thank you very much you really save my life again thank you my friend.

lvothnrv avatar Jul 24 '22 19:07 lvothnrv

Upgrading to react-native 0.69.3 seems to resolve the problem

babeone avatar Nov 06 '22 17:11 babeone

Looks like a fix was merged in react-native. Until it's released, adding this to my post_install block in ios/Podfile fixed it (I have no idea if the issue affects Android too, we're only targeting iOS right now).

installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
  target_installation_result.native_target.build_configurations.each do |config|
    # For third party modules who have React-bridging dependency to search correct headers
    config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
    config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Private/React-bridging/react/bridging" '
    config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers" '
  end
end

This worked on react native 0.70.6 and vision camera 2.15.2.

ziga-hvalec avatar Nov 23 '22 12:11 ziga-hvalec

I added this block to the Podfile, ran pod install, but when I try to generate the build on Xcode it gives me "Build file not found"

flaviocoppola avatar Jan 17 '23 10:01 flaviocoppola

facing same problem any solution?

Osamasomy avatar Aug 30 '23 07:08 Osamasomy

also still got this

sravis02 avatar Sep 14 '23 18:09 sravis02

Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.

mrousavy avatar Sep 30 '23 09:09 mrousavy

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