Closed ferrannp closed 2 years ago
I'm having the same issue. I'm wondering if there is something looking for "libjsc.so" that can't find it because hermes replaces "libjsc.so" with "libhermes.so". I've been looking through the SoLoader documentation and the Realm documentation to see if I can find anything.
realm-js uses JavaScriptCore APIs directly on React Native to implement its JS API so right now it cannot run on Hermes. We're planning on migrating to the new API in the coming months.
Yeah I was pretty sure this was not an easy change. Glad to hear it is planned to happen @fealebenpae. Thank you!
+1
Spent over 48hours debugging this issue. When I disabled hermes, it started working.
can't wait to implement realm with hermes...
We got stuck migrating project to hermes :((
@fealebenpae firstly, thank you for all the hard work creating this amazing software. Do you have any rough idea as to when Hermes support might arrive?
I have an app that is stuck in a difficult predicament, the latest JSCore engine has a very high crash rate on certain devices, we can't rollback to earlier RN as it would drop 64bit support, and we can't move to Hermes as we store most of our data in Realm.
We are exploring some dire options at the moment and it would really help us to know if a Realm version might arrive in the next 2 weeks or if we are definitely going to have to wait until October or later.
Again thank you for the hard work. I would love to be able to submit a PR with this functionality, unfortunately this area is totally out of my depth.
Unfortunately we won’t be able to add support for the new Hermes APIs in the next couple of weeks. Because we need to swap out a large part of our C++ codebase to do that it’s likely it’ll take our team months to pull this off.
Would Hermes support help at all with this issue the chrome debugging issue? That's been a thorn in our side. https://github.com/realm/realm-js/issues/491
@raphaeleidus you do not need to downgrade RN. You can use the latest RN with Realm. Just disable Hermes for now. Realm is fully compatible with RN 64 bits.
@ferrannp RN is not my problem it is the JSC in 0.59.10 (not hermes). For 64bit support on android we had to upgrade to 0.59.10 but the JSCore at that version has a high crash rate. I am not running Hermes at all but the people experiencing this issue: https://github.com/facebook/react-native/issues/25494 and trying to resolve or mitigate it have suggested that moving to Hermes would resolve the issue. I cannot move to Hermes though because I am using Realm. This is the problem. Can't move forward to Hermes because of Realm and can't move back to only 32 bit support because of Google. It is a difficult situation and nobody's fault on any side but I and many others are caught in the middle.
I had a similar issue @raphaeleidus. Unrelated, but what solved mine were
-keep class io.realm.react.**
After that I stopped getting any issue. I'm using the latest version of React Native (0.60.5). App works fine
@paschaldev were you able to reenable hermes after that?
No... Realm with Hermes gives the JSC error whatever... We'll have to wait unfortunately for Realm before we can use Hermes.
@fealebenpae You mentioned that it will take "months to pull this off". Can you tell whether or not this is something that gets attention in the coming months? In other words, is it planned?
We would like to make use of realm-js
and disabling Hermes would be acceptable for now but it will be good to know whether or not support for Hermes can be expected.
Also curious about the roadmap for Hermes. Would it be easier to patch Hermes so it can provide some compatibility to w/e Realm needs?
@mattijsf It is something I expect us to prioritize in Q4 (this year), although we haven't done that planning just yet, but will in the coming weeks.
Has anyone tested Realm with JS v8 on Android? https://github.com/Kudo/react-native-v8
Perhaps it's a good alternative.
@cristianoccazinsp yeah, I have, it is the same problem. Realm very specifically requires the jscore JS engine and doesn't work with other engines
Bummer! I was reading about the high crash rate of JSCore on Android and started to look at alternatives, but looks like Realm is a blocker for any JS alternative.
@bmunkholm Obviously we hope it gets picked up soon. Thanks for the update 👍
I suggest using this build script for the moment:
Is it ant better?
El mié., 28 de agosto de 2019 06:56, tatiesmars notifications@github.com escribió:
I suggest using this build script for the moment:
- https://github.com/react-native-community/jsc-android-buildscripts It allows to use updated version of javascript core on Android instead of the nov 2014 version...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/realm/realm-js/issues/2455?email_source=notifications&email_token=ALU263FRRASER2IQ2MO4T43QGZDT3A5CNFSM4ICRE4Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5KR62A#issuecomment-525672296, or mute the thread https://github.com/notifications/unsubscribe-auth/ALU263EU2EC5N4AX4NLGO4DQGZDT3ANCNFSM4ICRE4YQ .
+1
+1
++++1
+1 In fact, I have 3 apps using Realm and lot of 64bit users complain about crashes. There is any plan to support hermes by now?
We will support Hermes, but unfortunately we can't share a specific timeline yet.
Doing the +1 is best at the top comment with the 👍 - thanks.
Please, we look forward to it.
@tatiesmars Were you able to use that? I'm curious since RN 59 already uses an updated JSC and it contained crashes fixed only by using Hermes or react-native-v8, which is what we cannot do at the moment when using Realm.
+1 Please do it!
Realm is my go-to option for data storage in mobile apps and Hermes brings some major performance improvements to RN.
Those two should be best friends.
+1 Please , we look forward to increase our app performance :)
+1
My work around to work with Hermes and Realm was to implement a native module to use a JAVA version for Realm in Android.
My work around to work with Hermes and Realm was to implement a native module to use a JAVA version for Realm in Android.
Would you care to share this implementation?
+1 please do it !, i waiting, and i hope can boost perform react native well
+1 please do it !
@tatiesmars Were you able to use that? I'm curious since RN 59 already uses an updated JSC and it contained crashes fixed only by using Hermes or react-native-v8, which is what we cannot do at the moment when using Realm.
@The0racle So far our app is using this version of JSC on android with RN 60 and realm, work like good for us.
@tatiesmars Were you able to use that? I'm curious since RN 59 already uses an updated JSC and it contained crashes fixed only by using Hermes or react-native-v8, which is what we cannot do at the moment when using Realm.
@The0racle So far our app is using this version of JSC on android with RN 60 and realm, work like good for us.
Is there any real advantage of using that version of JSC over RN's one? There also seems to be a few "big" issues still open (https://github.com/react-native-community/jsc-android-buildscripts/issues/84 and https://github.com/react-native-community/jsc-android-buildscripts/issues/82) which I wonder if they would actually make things worse.
Update: Correct me if I'm wrong, but RN >= 59 already uses the latest JSC for Android.
@tatiesmars Were you able to use that? I'm curious since RN 59 already uses an updated JSC and it contained crashes fixed only by using Hermes or react-native-v8, which is what we cannot do at the moment when using Realm.
@The0racle So far our app is using this version of JSC on android with RN 60 and realm, work like good for us.
The app build with this version works, but it also crashes on several devices. That's the bigger issue here. Add to that Hermes or V8 improves the apps performance as well.
My work around to work with Hermes and Realm was to implement a native module to use a JAVA version for Realm in Android.
Could you share what you did?
+1
+1
+1
+1
@ferrannp Maybe you could update the issue to support other JS engines. I specifically am looking into implementing react-native-v8 instead of Hermes as we prioritize performance/memory usage over start up speed.
So @kneth you guys a working on it?
@fealebenpae could you maybe publish some rough timeline? Will it take another couple of month?
My project is stuck until this is fixed. :(
@RenanSanguinete @Rob-Dre We haven't started on this yet. Until we do it's hard to share a timeline. We hope to identify resources during this year.
+1
Goals
Make Hermes engine to work with Realm. Hermes comes from react-native 0.60.2 and significantly improves app performance on Android.
Steps to Reproduce
Following https://facebook.github.io/react-native/docs/hermes. if
enableHermes: true
, you will get the following:With
enableHermes: false
, everything works as expected.Version of Realm and Tooling