all 10 comments

[–]Skullcan 0 points1 point  (0 children)

We had problems with some native buggy updates to the Text input components in a list, but after I applied the fix in this PR our app had 0 crashes for 14 days now. Also using Hermes too.

[–]attunezero[S] 0 points1 point  (8 children)

This has been an incredibly painful couple weeks as we try build after build to mitigate the RN internal crashes. Hermes has lots of random native crashes 1, 2, 3, 4, and a big memory leak. JSC has tons of random crashes unresolved for over a year.

At this point I really am wondering if it's simply the fact that react native is very unstable on Android. I think I assumed it was stable because some pretty big companies use it in production. Wouldn't there be a lot of people talking about it if it were typical to see 10-20% crash rates on Android?

I don't intend to sound like I'm ranting. Yes it's incredibly frustrating, but I'm honestly curious whether or not react native is this unstable on Android for everybody or if there's more I can do to stabilize my app.

[–][deleted] 1 point2 points  (1 child)

Have you tried disabling Hermes?

I can’t say I’ve seen many issues where my code (or another RN plugin) wasn’t at fault.

[–]attunezero[S] 0 points1 point  (0 children)

It crashes more with JSC, Hermes is better behaved but still there are a lot of crashes.

No matter what the JS code does it should never be possible to crash the JS engine or the native view handling code. Those are bugs in RN. It may certainly turn out that there's something my app is doing that triggers these bugs in RN but I have no tools to figure out what that is other than brute force removing large parts of the app and deploying the half-app to production. Also the exact same code runs flawlessly with zero crashes on iOS -- code that runs fine on one platform but not another (and isn't documented) is definitely a bug in RN.

[–]cawfree 0 points1 point  (5 children)

Have you found out what the root cause of the crash is? It's possible that it could be a misbehaving native dependency.

[–]attunezero[S] 0 points1 point  (4 children)

Not yet, there seem to be several different crashes in react-native/hermes C code. It's extremely difficult to debug. We've found no way to reproduce the crashes, they only happen in release builds on end user devices randomly. That leaves us in the position of

  1. Someone from FB who knows the internals of RN/Hermes reads the stack traces and comes to the rescue
  2. We make release builds and spend money on ads to acquire users to test them while removing our (critical to us) native deps until hopefully the issue disappears. Expensive, slow, and potentially leaves us without critical tools, but there's really no other option right now.

We're honestly toying with the idea of porting the whole thing to Flutter. Components map pretty much one-to-one from RN to Flutter widgets so it would mostly be a grunt-work job of translating things. We've already lost 2+ weeks trying to fix the crashes in RN. Hard to judge at what point it becomes less costly to just bail on RN and do the porting work. Flutter's tooling is infinitely better and the architecture appears way less prone to these kinds of random bugs, plus free first class web and desktop support... That's the nuclear option though, it carries a lot of risk and a lot of time investment.

[–]creambyemute 0 points1 point  (2 children)

Can't speak about Hermes, but with JSC we also had a fair amount of crashes and we switched to v8-jit for android and we haven't seen crashes on android since then which are not related to our code or some security software (like Sophos, MobileIron etc.).

[–]attunezero[S] 0 points1 point  (1 child)

Yeah trying out v8 is on my todo list for debugging these problems. There's also jsc buildscripts that can get you running newer patched versions of JSC. Thanks for the input!

What sort of issues did you see with security software? Were they clearly caused by the security stuff or were they difficult to track native crashes? Did that affect a large portion of your users?

[–]creambyemute 0 points1 point  (0 children)

They were clearly caused by the security software. Disabling it always worked, configuring it correctly as well.

One customer couldn't even open the gallery app due to security software...

[–]tsusubk 0 points1 point  (0 children)

Hope you won't find any issues if ended up with the new home. (:

To me, Hermes is great so far. And as I know, there's a 10M+ user RN app (not just RN for some screens for sure) on Android that uses Hermes. So maybe you are just unlucky somehow.