React-native: React native 0.59.x crashes on Android without any error message

Created on 2 Apr 2019  路  95Comments  路  Source: facebook/react-native

馃悰 Bug Report

RN 0.59 isn't stable on Android. if you spend 20 seconds wandering around in your app, it will crash and stop working with no error message whatsoever.
I have to add I didn't face this issue on Expo SDK 32 or RN v0.58.6.

To Reproduce

react-native init
react-native run-android
and use the Code Example as your App class.
now just type a few words in TextInput and then remove some letters and again type something...; it takes less than 5 seconds to crash without any error message.

Expected Behavior

just to work in a stable manner.

Code Example

export default class App extends Component {
  state = { text: "" };

  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Welcome to React Native!</Text>
        <Text style={styles.instructions}>To get started, edit App.js</Text>
        <Text style={styles.instructions}>{instructions}</Text>
        <TextInput
          onChangeText={text => {
            this.setState({ text });
          }}
          value={this.state.text}
          placeholder="please don't crash!"
        />
      </View>
    );
  }
}

Environment

React Native Environment Info:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-4702MQ CPU @ 2.20GHz
Memory: 913.58 MB / 5.76 GB
Binaries:
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338

Android 7.0 (real device: Samsung S7)
React Native v0.59.3

Bug Android Locked

Most helpful comment

It seems all they care is closing issues and keeping them below 400 even though lots of them are still relevant. @Fouppy

All 95 comments

@MahdiGhajary - if you look into the output of logcat you'll most probably see the exact reason for the crash. There is no such thing "no error message". We have our app running on .59 and it works fine. If you want someone to help you - please provide the output of the crash report in logcat.

@compojoom actually I did look at output of logcat but I couldn't find anything useful there.
here is a screenshot:
command

Try to print the logs without filtering them

@zaguiini What do you mean? (if you mean I should have run just log-android, I did and the output was exactly similar to the screenshot provided in my previous comment)

Run adb logcat instead, give it a try

@zaguiini Hundreds of lines of text were logged but there wasn't anything useful or special. could you reproduce this issue on your own machine or it's something that I'm just facing on my device?

I'm not getting this error, unfortunately...

@compojoom I am also experiencing this issue in android after I have migrated to RN 0.59 and added abi filters to support for 64bit android support arm64-v8a and x86_64.
When I remove them and work with armeabi-v7a and x86 the android app works fine.
My app crashes as soon as I start going into react-navigation and crashing in Samsung galaxy S7 having Android Version 6.0.1(it has both 64 bit OS and CPU) while working fine in most of the devices I have.

Logcat Response:
crash_1

Same issue is coming after I try it with a fresh RN project with v0.59

@compojoom I am also experiencing this issue in android after I have migrated to RN 0.59 and added abi filters to support for 64bit android support arm64-v8a and x86_64.
When I remove them and work with armeabi-v7a and x86 the android app works fine.
My app crashes as soon as I start going into react-navigation and crashing in Samsung galaxy S7 having Android Version 6.0.1(it has both 64 bit OS and CPU) while working fine in most of the devices I have.

Logcat Response:
crash_1

Same issue is coming after I try it with a fresh RN project with v0.59

Looks like there's a yoga issue there?

Can you guys try with a clean rn project? Is it working there? If it is, then it is a misconfiguration with the project you have. We are running with rn .59 for a week now and have 0 crash reports.

Please note this issue tracker is not a help forum (as stated in issue template).

We recommend using StackOverflow where there are community incentives to help others or our Discord channel for questions. We can reopen this once there is a concrete bug report and this is a real issue, or even better: please send us a PR with a fix!

@compojoom as I said, it's reproducible just by creating a fresh RN project. maybe it's just reproducible on Windows machines or android 7.0 or maybe just physical Galaxy S7. all I know is that I didn't have this issue on 0.58.6 or Expo SDK 32.
@cpojer I'm not seeking help for a special feature or implementation of something! there is clearly something wrong with the RN itself that it crashes without any error (or logs) whatsoever!

@MahdiGhajary - then do rn init, create the project, push it to github, give us a link and we'll try to run your project to confirm. RN init works fine on my end and the produced app doesn't crash.

@compojoom @cpojer @MahdiGhajary
Git Repo: https://github.com/ishantsagar/RN59-AwesomProject
Crash Video: https://www.dropbox.com/s/opc1vwgusi4ck88/samsung_crash.mp4?dl=0
Device Details: https://www.dropbox.com/s/b39yvmobhjsx2be/Screenshot_20190406-140655.png?dl=0
https://www.dropbox.com/s/p201120ov4xeb7v/Screenshot_20190406-140633.png?dl=0
https://www.dropbox.com/s/xlz7n0xmu894uoi/Screenshot_20190406-140644.png?dl=0

The crash is occurring when I open the app and long press on the text for 2-3 seconds, sometimes the app hangs up but doesn't crash.

As mentioned earlier as well, the app is not crashing in other android devices as I noticed till now, that is why it could be related to some specific device architecture configuration.Crash log is the same as attached previously.

Note: However, app does not crash in debugger mode.

mine does not crash....tested with latest version

Crashes on physical galaxy s7.

@hramos @mkonicek As of now we can conclude that this seems to be an issue with latest RN 0.59 release, affecting android builds running on Samsung S7, S7 Edge after we provided support for arm64-v8a, x86_64, removing them from build.gradle does not crash the app, which could potentially affect apps going live after 1 August 2019 as per Google Play 64 bit support policy. We would like you guys to draw some attention to it, please?

This is still happening on RN 59.4, Galaxy S7, Android 6.0.

Removing arm64-v8a and x86_64 from build.gradle doesn't change anything.

Edit: added relevant bits from logcat 猬囷笍

04-12 12:49:51.781 32678   340 D SoLoader: libimagepipeline.so not found on /data/data/com.example.app/lib-main
04-12 12:49:51.781 32678   340 D SoLoader: libimagepipeline.so found on /data/app/com.example.app-1/lib/arm64
04-12 12:49:51.911 32678   345 W System.err: remove failed: ENOENT (No such file or directory) : /data/user/0/com.example.app/cache/http-cache/journal.tmp
04-12 12:50:00.391 23531 23531 I AndroidIME: DummyIme.onActivate() : EditorInfo = Package = com.example.app : Type = PhoneNumber : Learning = Disable : Suggestion = Hide : AutoCorrection = Disable : Microphone = Hide : NoPersonalizedLearning = Disable
04-12 12:50:00.401 23531 23531 I Conv2QueryExtension: Conv2Query not enabled due to current app [com.example.app] not in whitelist
04-12 12:50:00.671  3159  3159 F DEBUG   : pid: 32678, tid: 32756, name: mqt_js  >>> com.example.app <<<
04-12 12:50:00.731  3159  3159 F DEBUG   :     #00 pc 00000000007e048c  /data/app/com.example.app-1/lib/arm64/libjsc.so (WTFCrash+16)
04-12 12:50:00.731  3159  3159 F DEBUG   :     #01 pc 00000000000be650  /data/app/com.example.app-1/lib/arm64/libjsc.so (WTFCrashWithInfo(int, char const*, char const*, int)+24)
04-12 12:50:00.731  3159  3159 F DEBUG   :     #02 pc 0000000000489f2c  /data/app/com.example.app-1/lib/arm64/libjsc.so (operationLinkDirectCall+1120)
04-12 12:50:01.411  3470   360 W ActivityManager:   Force finishing activity com.example.app/.MainActivity
04-12 12:50:01.521  3470  3580 D ISSUE_DEBUG: InputChannelName : fc4da6f Application Error: com.example.app
04-12 12:50:01.571  3470  4337 I WindowState: WIN DEATH: Window{70135df u0 d0 com.example.app/com.example.app.MainActivity}

It seems all they care is closing issues and keeping them below 400 even though lots of them are still relevant. @Fouppy

@Fouppy That still mentions arm64 throughout the stack trace. Did you fully rebuild the app after removing those ABIs from build.gradle?

The 64 bit build appears to be causing all sorts of issues for us. From segfaults to seemingly random NullPointerExceptions that never occurred before and cannot be reproduced, specifically on Galaxy S7 and Galaxy Tab S2. Both device variants run on Cortex-A53 (Exynos) CPUs.

@wbercx This logcat was extracted before, but the crash still occured

Important note: As described on this StackOverflow solution, just removing "arm64-v8a", "x86_64" is not enough, you also have to do this in your ndk filters:

android {
    defaultConfig {

        ndk {
            // Specifies the ABI configurations of your native
            // libraries Gradle should build and package with your APK.
            abiFilters "armeabi-v7a", "x86"
        }
       ...
    }
}

@ahanriat Yep, that's what I did :) To no avail.

Got the same crash using latest react-native, and fresco version 1.13.0. Downgrading Fresco to 1.9.0 resolved the issue to me, and it doesn't crash anymore.

Got the same crash using latest react-native, and fresco version 1.13.0. Downgrading Fresco to 1.9.0 resolved the issue to me, and it doesn't crash anymore.

How did you downgrade fresco version ? what file should I change ?

This is an issue for me too.

Yup, been frustratingly debugging this (trying to upgrade to 0.59 for a production release). iOS works great, it works fine in dev, but we encounter this crash in production pretty sporadically across multiple devices on Android (Samsung Galaxy 7, Essential phone, etc.). We have an LG Nexus where we can't reproduce this error though.

We have already filtered out the 64-bit builds, which we confirm through trawling around the apk just to make sure. Without that, we were actually encountering freezing where it looked like JavaScript was dead, even though the native app kept running.

(As an additional note, we tried to upgrade to 0.59.5 too, which didn't seem to help)

On my end, tried moving around Fresco to 1.9.0 (crashed immediately with 0.59.5 the moment an image came up), 1.10.0 (which is the default version for 0.59.X) and unsurprisingly it acts the same as not forcing the version to be 1.10.0. I finally upgraded to 1.13.0, which doesn't seem to crash when I hit an image, but as far as I can tell also behaves the same as 1.10.0, with the same crash which this issue is about.

Same problem here with two totally different apps running RN 0.59, and the problem just happens on a specific devices (Samsung S7 with Android 6.0.1).

Unfortunately, I still have not been able to get these devices to debug.

Please everyone, upvote this issue to get RN team attention.

@cpojer Repo with source (RN 0.59.8 react-native clean init project with no edits) and APK file (inside /apk folder) is here: https://github.com/quietbits/react-native-apk-crash
Could you (and anyone else) please try it on your device(s) and see if you can successfully launch it? There is a list of devices we've tried in the readme. Much appreciated!

What, why is this closed ? is this resolved ?

I found this issue #24261 with Hi-Pri tag.

In my case the application loads when the phone is connected to the metro-builder, but once the phone is disconnect from the Metro-builder the application crashes.

Hi All, my release signed android APK is crashed immediately after clicked on app icon on the physical device, though my signed app builds successful, below are logcat error :

2019-05-30 10:16:56.003 1150-1263/? E/View: focusableViewAvailable: current thread is android.anim, return!
2019-05-30 10:16:56.023 2852-6156/? E/[HwRecSys]HwRecSysService: getIsRportDirectService is false!
2019-05-30 10:16:56.084 1150-7764/? E/ReportTools: This is not beta user build
2019-05-30 10:16:56.153 2852-6156/? E/[HwRecSys]HwRecSysService: getIsRportDirectService is false!
2019-05-30 10:16:56.260 1771-5525/? E/HsmCoreServiceImpl: onTransact in code is: 103
2019-05-30 10:16:56.321 1150-1263/? E/WindowManager: win=Window{aab7e30 u0 Splash Screen com.wtitool EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true

Please help me

@syedammar, @douglasjunior cited this above, but take a look at #24261.

I don't think those logs are actually showing the crash. I have a comment a bit further up (same issue) about tombstones in Android that you can use to extract the actual crash.

https://github.com/facebook/react-native/issues/24261#issuecomment-490239902

I'm also getting this issue on Android. Any update on this?

@hramos @mkonicek As of now we can conclude that this seems to be an issue with latest RN 0.59 release, affecting android builds running on Samsung S7, S7 Edge after we provided support for arm64-v8a, x86_64, removing them from build.gradle does not crash the app, which could potentially affect apps going live after 1 August 2019 as per Google Play 64 bit support policy. We would like you guys to draw some attention to it, please?

I agree with @ishantsagar , I have just faced this issue, only happens on REAL DEVICE, LENOVO A701a48, RUNNING ANDROID 6.
deleting "arm64-v8a", "x86_64" from

ndk {
            abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
 }

solved the issue.

So it must be something to do with this latest config's way of building "arm64-v8a", "x86_64" builds.
Not sure if it's entirely RN's fault, but maybe the team could help investigate and educate instead of just closing the case for the sake of closing it

Any help on this issue would be seriously appreciated!

I'm pretty sure this is a duplicate of this issue https://github.com/facebook/react-native/issues/24261

TLDR; Javascript Core Jit on Android 64bits is not stable 馃悰 But thanks to some awesome people 鉂わ笍 a fix is coming

Hi All, my release signed android APK is crashed immediately after clicked on app icon on the physical device, though my signed app builds successful, below are logcat error :

2019-05-30 10:16:56.003 1150-1263/? E/View: focusableViewAvailable: current thread is android.anim, return!
2019-05-30 10:16:56.023 2852-6156/? E/[HwRecSys]HwRecSysService: getIsRportDirectService is false!
2019-05-30 10:16:56.084 1150-7764/? E/ReportTools: This is not beta user build
2019-05-30 10:16:56.153 2852-6156/? E/[HwRecSys]HwRecSysService: getIsRportDirectService is false!
2019-05-30 10:16:56.260 1771-5525/? E/HsmCoreServiceImpl: onTransact in code is: 103
2019-05-30 10:16:56.321 1150-1263/? E/WindowManager: win=Window{aab7e30 u0 Splash Screen com.wtitool EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true

Please help me

The issue was solved when I change my entry point in the file 'android/app/build.gradle' from
project.ext.react = [
entryFile: "index.js"
]
to
project.ext.react = [
entryFile: "index.android.js"
]

Regards,

i have same issues with note 9 and galaxy A7 :(

Please, update to 0.59.10, see #24261.

if i use below app crashes and accepted by google play store
ndk { abiFilters "armeabi-v7a","arm64-v8a","x86","x86_64" }
if i use below app is working but not accepted by google play store
ndk { abiFilters "armeabi-v7a", "x86" }

please any one help me solving

@hramos @mkonicek As of now we can conclude that this seems to be an issue with latest RN 0.59 release, affecting android builds running on Samsung S7, S7 Edge after we provided support for arm64-v8a, x86_64, removing them from build.gradle does not crash the app, which could potentially affect apps going live after 1 August 2019 as per Google Play 64 bit support policy. We would like you guys to draw some attention to it, please?

I agree with @ishantsagar , I have just faced this issue, only happens on REAL DEVICE, LENOVO A701a48, RUNNING ANDROID 6.
deleting "arm64-v8a", "x86_64" from

ndk {
            abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
 }

solved the issue.

So it must be something to do with this latest config's way of building "arm64-v8a", "x86_64" builds.
Not sure if it's entirely RN's fault, but maybe the team could help investigate and educate instead of just closing the case for the sake of closing it

it fixed the crash only but as google has upgrade 64-bit policy on 1 August 2019, we can not submit our application on the play store
when we upload .apk file on the play store, it give the error below
Screenshot 2019-08-14 at 08 08 39

I already update to 0.59.10 and still facing the problem on Samsung S7, S7 Edge.

I hame the same issue, RN version 0.59.5, release bundle, here is the stack:

calling runApplication)(value@28:3170 com.facebook.react.common.JavascriptException Module AppRegistry is not a registered callable module (calling runApplication), stack: value@28:3170 <unknown>@28:822 value@28:2565 value@28:794 value@-1 com.facebook.react.common.JavascriptException Module AppRegistry is not a registered callable module (calling runApplication), stack: /var/jenkins_home/workspace/MyProject/MyProject/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js invariant@354:4 /var/jenkins_home/workspace/MyProject/MyProject/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js module@106:26 /var/jenkins_home/workspace/MyProject/MyProject/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js fn@314:8 /var/jenkins_home/workspace/MyProject/MyProject/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js value@105:17 value@-1 mqt_native_modules com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54) com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38) java.lang.reflect.Method.invoke(Method.java:-2) com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372) com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158) com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java:-2) android.os.Handler.handleCallback(Handler.java:751) android.os.Handler.dispatchMessage(Handler.java:95) com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29) android.os.Looper.loop(Looper.java:154) com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232) java.lang.Thread.run(Thread.java:761)

@hramos @mkonicek As of now we can conclude that this seems to be an issue with latest RN 0.59 release, affecting android builds running on Samsung S7, S7 Edge after we provided support for arm64-v8a, x86_64, removing them from build.gradle does not crash the app, which could potentially affect apps going live after 1 August 2019 as per Google Play 64 bit support policy. We would like you guys to draw some attention to it, please?

I agree with @ishantsagar , I have just faced this issue, only happens on REAL DEVICE, LENOVO A701a48, RUNNING ANDROID 6.
deleting "arm64-v8a", "x86_64" from

ndk {
            abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
 }

solved the issue.
So it must be something to do with this latest config's way of building "arm64-v8a", "x86_64" builds.
Not sure if it's entirely RN's fault, but maybe the team could help investigate and educate instead of just closing the case for the sake of closing it

it fixed the crash only but as google has upgrade 64-bit policy on 1 August 2019, we can not submit our application on the play store
when we upload .apk file on the play store, it give the error below
Screenshot 2019-08-14 at 08 08 39

I did that but the app is still crashing.

For anyone reading this, the summary is there is no fix for 0.59x. You will have to upgrade to 0.60x, switch on hermes, and then if there are any other issues after this you will have to create a new issue with the repo

Hermes is still in experiment, so today is not an option for most existing apps. Example: https://github.com/facebook/react-native/issues/24261#issuecomment-522658041

I actually went through the trouble of bumping React-Native to 0.60.5 and enabling Hermes + 64-bit (which was a pain, as upgrading react-native always is) and I'm still having these issues on several Android phones (including HUAWEI MYA-L41).

I've tried just about everything I've found in other threads without much luck, so I can tell you bumping react-native and using Hermes doesn't fix all of these issues.

The updated react-native + Hermes and 64-bit is amazing on other Android devices I've ran it on and our app has never felt smoother.

However, whenever I test on the specific device I mentioned (Huawei) it crashes instantly or after the app is open for 1-2 seconds without a specific crash message, I don't have any other devices besides that one and a newer Huawei (which works perfectly) so I can't give you more info on other phones.

If anyone has made any progress with this issue or has any ideas for more specifically logging my issues, advice is always welcome and I'm willing to share any information regarding this issue.
Thanks to the people in this thread for offering solutions, but no luck so far. 馃檪

In my case, the problem was redux-logger and Gradle version.

  1. I removed redux-logger from my code
  2. In build.gradle at the android folder:
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2' // <-- This version did the trick too, I had 4.X.X
        classpath 'com.google.gms:google-services:3.2.1'
    }

And now I can work in release mode without any problem.

Can anybody confirm that this worked?

@lecramfriedrich See https://github.com/facebook/react-native/issues/25494

Libraries in general (Fresco, React navigation, whatever else) have come up in these different issues as "remove this and it will fix it" and as a whole the consensus is removing any/all don't help. One of the issues of tracking this down is removing the libraries may look like it temporarily works, because the cause of the crash is not necessarily deterministic. It's a garbage collection issue with Android + JSC, so sometimes you can actually go for a long time (from luck) without crashing.

Using an abi filter to remove 64-bit builds does... well, in most cases... but is no longer viable given the Google Play Store no longer accepts apps that don't contain 64-bit builds as of August 1st.

0.59.10 helps somewhat, but still encounters crashes.

The current most likely path for fixing this is to upgrade to 0.60+ and Hermes, as per the other issue.

I followed the following things and it solved my problems
well we need to upgrade react-native version at least to 0.59.1

some time react-native upgrade 0.59.1-rc.0 do not works
and we do not get upgraded
so you need to change "react-native": "0.59.10" or higher version in the package.json file manually
and then nom install
you may need to remove node_modules and package-lock.json file as well
after this you may need to update some libraries if you get some error
and finally don't forget to

ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}

and then also

splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}

Probably a long shot, but I didn't see any specific error either and debugging Android didn't yield much.
After searching for a while our issue was that we sometimes passed null to the source variable in the react-native Image component when there is no given image. This only seems to give issues on a specific architecture + 64-bit.
As I said, probably a long shot for other people here, but it might help someone.

any solutions ???

In my case app (0.59.9 version) was crashing just after opening it. I resolved by doing this:

react-native bundle --dev false --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

cd android

./gradlew assembleRelease

This will create an unrelease APK in android/app/build/outputs/apk/release

@azharuddinkhan8898 its not working

I will refer again to https://github.com/facebook/react-native/issues/25494. It is almost certainly the cause of most of these crashes (if you have 64-bit enabled).

It would even explain why some of these solutions (temporarily, for some Android phones) work鈥攊t's a JSC getting-garbage-collected issue. Moving certain libraries around, changing certain settings, can delay鈥攅ven sometimes for a long time鈥攚hen the crash occurs. It sometimes even solves it on certain phone models. But it will not for all of them. And most times, it doesn't actually fix it for the long term. I've also personally been fooled before that I fixed it because I tested on a different phone or emulators (which are 32-bit).

If so, you will never solve it by tweaking around the edges, because the issue is in the runtime, in the literal JavaScript engine you're using. You can't take out any libraries, change any build settings, or do anything that will permanently solve it outside of upgrading to 0.60+ and replacing JSC with v8 or Hermes.

any solution?

My current version 0.57.5. I create new project 0.60.5 and copy js files and working

Same issue with react-native 59.9, Android 8.1 (Emulator: Pixel 2, Real device: Xiaomi Redmi 6)
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz
Memory: 5.58 GB / 15.70 GB
Binaries:
Yarn: 1.17.3 - C:\Users\Gabriel\AppData\Roaming\npmyarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5791312

someone can confirm that for react native version 0.60.5 it's working? I don't want to upgrade my react native for no reason

@tal987 No, it will 100% not work in 0.60.5, as tested by myself and at least 10 other people spread across different issues and confirmed by maintainers of RN and related libraries (at least conceptually while trying to pin down the cause of the issue).

Again, this is a nondeterministic crash, so it's really hard to tell for certain without a long runtime across thousands of devices. But that's what we've done.

You will need to upgrade AND switch out your JavaScript engine to v8 or Hermes, as referenced in the other issue.

Damn! It's so embarrassing

any solution? 鈽癸笍

@j-wang - It's possible to switch to v8 without upgrading to rn 0.60

@chilugen - just upgrading doesn't work for all Android devices.

@jacquesdev what error ?

@chilugen React native 0.59.x crashes on Android

@chilugen - I am on that version, see the comment above, https://github.com/facebook/react-native/issues/24260#issuecomment-526319471, it's not even fixed yet in 0.60.5.

For sure upgrading to 0.59.10 will fix it on some Android phones, but not all of them.

@jacquesdev Yup, since the comment, I've seen some folks do that with v8, and it looks like it's working for them too. I can't speak from personal experience since I used Hermes (which does require an upgrade).

@j-wang I鈥檓 using Hermes too but it seems that the performance is very slow compare to without it. Anyway I upgraded to 0.60.5 and I have noticed that the performance is slower than before. Did you fix this issue?

Hmm, it likely depends on your exact application and what you're doing. For ours, it's actually marginally faster. Well, on production at least. On development, it's now almost unusably slow for certain phones (including higher-end ones).

I have two apps, one at react native 0.59.10 and the other at 0.60.5. I can't use Hermes or v8 cause there is a lib (realm in this case) that only uses JavaScript Core. The problem for me is that I can't go back cause of Google 64 bits mandatory. Waiting for the lib owners to integrate Hermes or V8, and hoping that this will solve those crashes.

I already tried so many things, and change this lib will affect the whole project, at a level that will the worth for me to create a new one instead.

@RenanSanguinete You can build for 64-bit on 0.59.x

@wkoutre The app still crashes on 64-bits on 0.59.x in some devices as Galaxy Samsung S7

Well, it didn't for the app I'm currently working on, but there are obviously many complexities to consider regarding this on a per-app basis.

still the error persists in samsung s7 with RN 0.59?

I'm on RN 0.60 and still having the issue.

I am also facing the same issue across for all android 6.0 version. not for lower ones and higher ones

Hi My app is crashing only in production build
TextInput just type a few words in TextInput and then remove some letters and again type something...; it takes less than 5 seconds to crash without any error message.
i am using react -native 0.59.4.
also using redux-form fields for text input.
Please help me to solve this issue.
@mmahdigh Can you help me out on this issue if your issue is fixed.?

I was able to fix for my app using kind of a workaround. used
android:hardwareAccelerated="true"
in the AndroidManifest.xml for Application tag.

Here's a fix if your issues are related to JSC on React 0.59 (https://github.com/facebook/react-native/issues/24261#issuecomment-548149232)

react 61.4 still crashes on random devices. (huawei and Lg mostly)

update .aab file instead of apk.
its works for me
cd android
./gradlew bundleRelease

Update the react version to react 61.5 ..then it will work fine

I have an error using
gradlew bundleRelease with react native 61.5

Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
error Unable to resolve module ../components/AppStateListener from screens\WebScreen.js:

seems that the bundle is not able to read the component ?

The error is the same using:
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

Please help.

I'm in 61.5 still crashing.

i faced the same issue
i try to check the begining of crash log: adb logcat -d
then i saw this error message:
AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;
i solved it using this link
https://stackoverflow.com/questions/56901873/swiperefreshlayout-error-on-a-react-native-app-after-androidx-migration
i hope this help

This problem may be related to react-native-screens. Please try. It worked for me.

Add the following two lines to the dependencies section in android/app/build.gradle.

implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'

https://stackoverflow.com/questions/56901873/swiperefreshlayout-error-on-a-react-native-app-after-androidx-migration

@compojoom I am also experiencing this issue in android after I have migrated to RN 0.59 and added abi filters to support for 64bit android support arm64-v8a and x86_64.
When I remove them and work with armeabi-v7a and x86 the android app works fine.
My app crashes as soon as I start going into react-navigation and crashing in Samsung galaxy S7 having Android Version 6.0.1(it has both 64 bit OS and CPU) while working fine in most of the devices I have.

Logcat Response:
crash_1

Same issue is coming after I try it with a fresh RN project with v0.59

Thanks. It worked in my case

two easy steps solved my problem...

open android studio and remove offline bundle from src/main/assest..(** if any)
open MainApplication.java and remove the following import..
import com.facebook.react.BuildConfig

Was this page helpful?
0 / 5 - 0 ratings