BabylonJS / BabylonReactNative

Build React Native applications with the power of Babylon Native
MIT License
371 stars 59 forks source link

Add Support for React-Native 74 and 75 #655

Open nmongiya opened 2 weeks ago

nmongiya commented 2 weeks ago

For questions, please use the forum.

Is your feature request related to a problem? Please describe. React Native released version 74 in April and 75 on August 14, 2024. Can we please have support for that?

Describe the solution you'd like I am not able to run the app with RN version 0.74.5, I want app to run with latest React Native version

Errors that I am receiving It compiles fine but crashes at runtime with the following error E terminating due to uncaught exception of type std::logic_error: Not implemented A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6035 (mqt_js), pid 5842 (xx.xx.xx)

Additional context Add any other context or screenshots about the feature request here.

CedricGuillemet commented 5 days ago

I'm taking a look.

CedricGuillemet commented 5 days ago

0.74.2 is ok but 0.74.3 is not. Now searching for the breaking change.

nmongiya commented 5 days ago

You are right, I can confirm that I am able to run the app on 0.74.2

nmongiya commented 4 days ago

https://github.com/facebook/react-native/releases/tag/v0.74.3

CedricGuillemet commented 4 days ago

I could get a callstack:

/base.apk!libhermes.so (BuildId: 7f8ff6385b5fe455c03f7b48cdae12ba78b8c714)
/base.apk!libBabylonNative.so (BabylonNative::Initialize(facebook::jsi::Runtime&, std::__ndk1::function<void (std::__ndk1::function<void ()>)>)+104) (BuildId: b431f252b69276ed8904a3dd383684bd86d07dd1)
/base.apk!libBabylonNative.so (Java_com_babylonreactnative_BabylonNativeInterop_00024BabylonNative_initialize+164) 

tldr: it looks like an initialization issue with Hermes but no version bump in changelog.

CedricGuillemet commented 4 days ago

@nmongiya I'm testing on Android for practical reason. Do you repro this crash on iOS as well?

CedricGuillemet commented 4 days ago

I can see a different version of hermes-android with the same version as RN but I can't find a package/build/changelog for that. Also, I unzipped the .apk. libhermes.so file is different between both version but nothing striking when looking at symbols with objdump.

nmongiya commented 4 days ago

I am not using hermes for this project. Also I have noticed some other error while playing with 74.2. Multiple vertex buffers with the same attribute cannot be recorded image

CedricGuillemet commented 4 days ago

The vertex buffer error is on the JS side and is not related to the RN version. It should happen with the web version as well.