Closed AlirezaHadjar closed 11 months ago
Hi @AlirezaHadjar, thanks for reporting this issue. As we're already done with supporting RN 0.73, we plan to release a new version of react-native-screens shortly. Could you check if the version taken from the main
branch works properly for you?
You can check that by changing react-native-screen version in your package.json to:
"react-native-screens": "software-mansion/react-native-screens#main"
cc @BooYeu could you also check that?
@tboba Thank you for the update. Yeah, I just tested the main
branch and it works like a charm. 🚀
Hi @AlirezaHadjar @BooYeu! I'm happy to say that we've released new version of react-native-screens (3.29.0) which has a support for React Native 0.73 onboard! 🥳
Check it out! If you find something wrong related to the newest version (this change is still buggy or doesn't work for you) let us know 🎉
Still necessary to do the react-native-screens override in the MainActivity file? Because it's not compiling here with it.
I have the same issue with react-native-screens@3.29.0
but on React Native 0.72.8:
In file included from /node_modules/react-native-screens/android/src/main/jni/rnscreens.cpp:5:
In file included from /node_modules/react-native-screens/android/src/main/jni/./rnscreens.h:19:
/node_modules/react-native-screens/android/src/main/jni/../../../../common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h:15:44: error: 'override' hides virtual member function
/Users/bulkinav/.gradle/caches/transforms-3/3c5567f8aec7a53085281dfc687909c0/transformed/jetified-react-android-0.72.8-debug/prefab/modules/react_nativemodule_core/include/react/renderer/core/ConcreteComponentDescriptor.h:209:16: note: hidden overloaded virtual function 'facebook::react::ConcreteComponentDescriptor<facebook::react::RNSScreenShadowNode>::adopt' declared here: type mismatch at 1st parameter ('const ShadowNode::Unshared &' (aka 'const shared_ptr<facebook::react::ShadowNode> &') vs 'facebook::react::ShadowNode &')
@bulkinav this looks like you're running your application with Fabric turned on, right?
In this case we support only the latest version of React Native, so to run 3.29 on Fabric you need React Native 0.73.x. This is the case, because for almost every ReactNative version breaking changes are merged to React Native repository (such as this one you reported, changing function signatures) that we can not keep up otherwise.
I guess you made me just aware, that we have not put that in our readme 🤦🏻
@kauly,
Do you mind posting a stacktrace / errors from build? (and your MainActivity file)
I am also having this error with RN 0.74.2
and react-native-screens@^3.32.0
:
Clean rnscreens-armeabi-v7a
C/C++: CMake Error in CMakeLists.txt:
C/C++: Imported target "ReactAndroid::jsi" includes non-existent path
C/C++: "/home/runner/.gradle/caches/transforms-4/3592a5461453009a5cb3ae9cf84bd9a7/transformed/jetified-react-android-0.74.2-release/prefab/modules/jsi/include"
C/C++: in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
C/C++: * The path was deleted, renamed, or moved to another location.
C/C++: * An install or uninstall procedure did not complete successfully.
C/C++: * The installation package was faulty and references files it does not
C/C++: provide.
C/C++: CMake Generate step failed. Build files cannot be regenerated correctly.
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed
> Task :react-native-screens:externalNativeBuildCleanRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-screens:externalNativeBuildCleanRelease'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/runner/work/alysium-mobile/alysium-mobile/node_modules/react-native-screens/android/.cxx/RelWithDebInfo/5a3b2a35/armeabi-v7a'
[0/1] Re-running CMake...
-- Configuring done
-- Generating done
FAILED: build.ninja
/usr/local/lib/android/sdk/cmake/3.22.1/bin/cmake --regenerate-during-build -S/home/runner/work/alysium-mobile/alysium-mobile/node_modules/react-native-screens/android -B/home/runner/work/alysium-mobile/alysium-mobile/node_modules/react-native-screens/android/.cxx/RelWithDebInfo/5a3b2a35/armeabi-v7a
C++ build system [clean] failed while executing:
/usr/local/lib/android/sdk/cmake/3.22.1/bin/ninja \\
-C \\
/home/runner/work/alysium-mobile/alysium-mobile/node_modules/react-native-screens/android/.cxx/RelWithDebInfo/5a3b2a35/armeabi-v7a \\
clean
from /home/runner/work/alysium-mobile/alysium-mobile/node_modules/react-native-screens/android
CMake Error in CMakeLists.txt:
Imported target "ReactAndroid::jsi" includes non-existent path
"/home/runner/.gradle/caches/transforms-4/3592a5461453009a5cb3ae9cf84bd9a7/transformed/jetified-react-android-0.74.2-release/prefab/modules/jsi/include"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Generate step failed. Build files cannot be regenerated correctly.
ninja: error: rebuilding 'build.ninja': subcommand failed
Do we understand where this is coming from?
Not really @aymather. If you can reproduce this error on fresh RN project then I might consider this a bug. Otherwise it's something setup specific (e.g. invalid cache, some wrong dependency version etc.). I'm working daily on 0.74.2 with new architecture & it works fine on my setup.
Confirm, that it works on: "react-native": "0.74.2" and "react-native-screens": "3.32.0" with new Architecture
but has build issues on 0.74.4 and 3.33.0
3.33.0 supports only react-native 0.75.0-rc.5+, the library won't build with any other version due to breaking changes in react-native
itself.
Hey @kkafar, I'm sorry, but I've tried React Native 0.74.4 with react-native-screens versions 3.32, 3.31.1, and 3.31.0, and I still experience build failures and the same error as reported in this issue. I haven't tried any versions below those yet
@Rakha112 try setup these versions "react-native": "0.74.2" and "react-native-screens": "3.32.0"
and following these steps if u encountering errors like this
IOS build issue resolving Error message: CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65. usually happens when you add new dependency to project
rm -rf ~/Library/Developer/Xcode/DerivedData rm -rf node_modules yarn.lock android ios yarn manually run npx expo prebuild --clean && npx pod-install manually run npx expo run:ios
Hey @lukachi, using React Native 0.74.2 and react-native-screens 3.32.0 on Android newArch builds successfully. Thank you very much. So, for now, it seems we can't use react-native-screens with React Native version 0.74.4, right?
If react-native published some breaking changes between patch version 0.74.2 and 0.74.4 then it's not on this library. Yeah I know, that from your perspective it does not matter who breaks the build, but only that the build is broken, but from the library perspective we can't even do a patch for 0.74.4, because that would require changes in native code, thus it would require minor version bump in screens
versioning, while 3.33.0 is already out with support for 0.75.0 & react-native introduced breaking changes between 0.74 & 0.75, thus any new version of this library won't ever support RN < 0.75.
So yeah, the only viable option is to stick to a little bit older patch version of react-native of upgrade :/
Thank you very much for your detailed explanation. I understand the situation now. I apologize if my previous comments caused any misunderstanding
Thank you again for your help!
Any suggestions on how to avoid getting this error, randomly, only at pipeline level, with react native 0.75.3?
I was constantly getting this error on lower levels of react-native-screens so I updated it to 4.0.0-beta.0
and it started working randomly (sometimes work sometimes fail).
Description
There's a build issue on Android while building the newly initialized app.
Steps to reproduce
react-native-screens
:New Architecture
:Snack or a link to a repository
https://github.com/AlirezaHadjar/rnscreensRN73BuildError.git
Screens version
3.27.0
React Native version
0.73.0
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
Nexus 5X
Acknowledgements
Yes