BabylonReactNative icon indicating copy to clipboard operation
BabylonReactNative copied to clipboard

Add Support for React-Native 74 and 75

Open nmongiya opened this issue 1 year ago • 18 comments
trafficstars

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.

nmongiya avatar Sep 03 '24 04:09 nmongiya

I'm taking a look.

CedricGuillemet avatar Sep 12 '24 07:09 CedricGuillemet

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

CedricGuillemet avatar Sep 12 '24 17:09 CedricGuillemet

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

nmongiya avatar Sep 12 '24 20:09 nmongiya

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

nmongiya avatar Sep 12 '24 23:09 nmongiya

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 avatar Sep 13 '24 07:09 CedricGuillemet

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

CedricGuillemet avatar Sep 13 '24 07:09 CedricGuillemet

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.

CedricGuillemet avatar Sep 13 '24 09:09 CedricGuillemet

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

nmongiya avatar Sep 13 '24 09:09 nmongiya

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.

CedricGuillemet avatar Sep 13 '24 12:09 CedricGuillemet

@CedricGuillemet Hello, mate! Any updates? Is anyone working on adding the support? 👀

dmitryshostak avatar Sep 26 '24 13:09 dmitryshostak

Hi @dmitryshostak , I'm working on it ATM. no ETA yet. you can follow progress of this PR : https://github.com/BabylonJS/BabylonReactNative/pull/647

CedricGuillemet avatar Sep 26 '24 14:09 CedricGuillemet

I've also been getting crashes on 0.73 when working on this PR: #654 I thought its something related to my PR thankfully its not, 0.75 works as expected.

I've been getting the issue immediately after calling BabylonNative::Initialize(*GetJSIRuntime(bridge), std::move(jsDispatcher)); which looks like an issue with accessing jsi runtime?

There have been some changes around this here: https://github.com/reactwg/react-native-new-architecture/discussions/160 maybe some fixes didn't get backported to 0.73?

okwasniewski avatar Sep 30 '24 12:09 okwasniewski

@okwasniewski yes, there is an issue open for it : https://github.com/BabylonJS/BabylonReactNative/issues/655#issuecomment-2348225773 a new virtual method has been added between 0.74.2 and 0.74.3 so ABI is broken. I didn't check 0.73. I was expecting this major version to work as 0.74.0 to 0.74.2 work

CedricGuillemet avatar Sep 30 '24 12:09 CedricGuillemet

We experience the same issue using react-native 0.75.4 on both android and ios. Did you manage to find a workaround for this?

antonsthb avatar Nov 14 '24 16:11 antonsthb

any update?

mikevocalz avatar Jan 13 '25 06:01 mikevocalz

any update?

Hi @mikevocalz , this is still on our roadmap but not much progress so far.

CedricGuillemet avatar Jan 13 '25 08:01 CedricGuillemet

any updates? i tried using in react-native 0.76.9 and i got could not initialize babylon native React on my app screen

johncobain avatar May 08 '25 12:05 johncobain

any updates? i tried using in react-native 0.76.9 and i got could not initialize babylon native React on my app screen

Sorry, no update yet.

CedricGuillemet avatar May 14 '25 14:05 CedricGuillemet

Fixed by https://github.com/BabylonJS/BabylonReactNative/pull/665

CedricGuillemet avatar Jul 09 '25 14:07 CedricGuillemet