facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
117.69k stars 24.16k forks source link

React-bridging wrong paths? #34102

Closed mm-webx closed 2 years ago

mm-webx commented 2 years ago

Description

CleanShot 2022-06-29 at 18 44 51 Wrong React-bridging directories structure: xxx/ios/Pods/Headers/Public/React-bridging/react/bridging/react/bridging/LongLivedObject.h should be: xxx/ios/Pods/Headers/Public/React-bridging/react/bridging/LongLivedObject.h

So xxx/node_modules/react-native/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h has wrong imports like

#include <react/bridging/CallbackWrapper.h>
#include <react/bridging/LongLivedObject.h>

Version

0.69.1

Output of npx react-native info

warn Package react-native-appsflyer has been ignored because it contains invalid configuration. Reason: "dependency.platforms.ios.podspecPath" is not allowed warn Package @svgr/webpack has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/webx/_WEBX/gigaverse-mobile/node_modules/@svgr/webpack/package.json info Fetching system and libraries information... System: OS: macOS 12.4 CPU: (8) arm64 Apple M1 Memory: 102.55 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 8.5.5 - ~/.nvm/versions/node/v16.13.1/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Android NDK: 22.1.7171670 IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /opt/homebrew/opt/openjdk@11/bin/javac npmPackages: @react-native-community/cli: Not Found react: ^18.2.0 => 18.2.0 react-native: ^0.69.1 => 0.69.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

0.69.1 react native and for example install react-native-vision-camera

Snack, code example, screenshot, or link to a repository

CleanShot 2022-06-29 at 18 51 42 CleanShot 2022-06-29 at 18 52 03 CleanShot 2022-06-29 at 18 52 13

Risovas commented 11 months ago

@fontesrp these I did not, didn't come across this issue to be honest. Thanks for the suggestion, I'll spend some time reading and trying the proposed solutions there. I'll let you know how it goes 👍

Risovas commented 11 months ago

So, honestly I didn't find any explicit solutions proposed besides commits / patches that were already merged into the main branch and theoretically are already applied to the react-native version I'm using. I don't really understand if the issue I'm facing is on the react-native-vision-camera lib code or if it's a problem with react-native itself, but the issue persists to me 😞

sanderdewilde commented 8 months ago

Also experiencing the issue (using use_frameworks! :linkage => :static for firebase), with "react-native": "0.72.7", "react-native-vision-camera": "^3.6.12",

aybarska commented 7 months ago

same on "react-native": "^0.72.8" i have to use use_modular_headers! and use_frameworks!

dharmik-valani commented 7 months ago

@aybarska Does it working?

Amurmurmur commented 7 months ago

Same exact issue here

> 11 | #include <react/bridging/CallbackWrapper.h>
     |          ^ 'react/bridging/CallbackWrapper.h' file not found

Have to use these, in the app.json

[
        "expo-build-properties",
        {
          "ios": {
            "deploymentTarget": "14.0",
            "useFrameworks": "static"
          },
          "android": {
            "compileSdkVersion": 34,
            "targetSdkVersion": 34,
          }
        }
      ],

started happening once switched to useFrameworks: static I need firebase module as well as react-native-vision-camera and react-native-quick-crypto Happening with "react-native": "0.72.6"

dharmik-valani commented 7 months ago

hi @Amurmurmur , yes I have resolved it. but I didn't use expo for it. I resolved by correcting pod file

Amurmurmur commented 7 months ago

@dharmik-valani what did you change?

andvalsol commented 4 months ago

@Amurmurmur what was your change?