-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random JSApplicationIllegalArgumentException crashes on Android #21755
Comments
I can confirm. Crashlytics gives us more and more this kind of report since we have upgraded react-native to 0.57
Is there any workaround /solution /planned bugfix for that? |
There's chance that some of these exceptions will be fixed by #17842 software-mansion/react-native-svg#806 which had #17873 also causes |
Any idea when merged #17842 will be in the npm version? |
@Kamill90 If you think this should go faster you can ping on react-native-community/releases#48 but I'd suggest first trying out locally if this commit will fix your issue. |
I tried the fix from #17842 and still get these errors in random places. |
did #17842 already in RN 0.57.3? Our project met serveral reports since upgrade RN 0.57.x version. one more note: This type of crash has outstanding rate in Samsung devices with android 7.0+ than others. |
I am facing the same king of issues. |
@Winglonelion it's not released yet. It's planned for version 0.57.4. You can track it here react-native-community/releases#48 (comment). |
Any idea if this will be back-ported to older RN releases like 0.55? |
@Winglonelion same thing. Samsung and some LG devices as well after applying the fix. |
RN 0.57.4 available. |
#17873 (comment) fix crashes on Samsung and LG phones. |
@hramos FYI there's no PR for the comment that's linked #17873 (comment) so "Fixed" label will be misleading. I believe people who say it's fixed are building RN from source and applying this fix on their own. |
I closed it based on #17842. I'll re-open, can someone send a PR to address any remaining issues. |
RN has/had at least 2 distinct thread safety issues that I know of: One was DynamicFromMap pool that's fixed in #17842. Second is the varargs optimization that was root caused and very well described in #17873 (comment). |
System: In My Android app with react-native to 0.57.5, Crashlytics gives us more and more this kind of report. |
Having basically the same issue, only happening on Android, not iOS. My team is testing both. My problem is reproducible, at least on my device, and only happens with a particular navigation, after a button is pressed. When I dismiss the error on the device, the app completely freezes. |
Facing same issue. Please help if anyone knows the solution. I have used It happens only on Android and not on iOS. Attaching below Firebase crash report: Fatal Exception: com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'padding' in shadow node of type: AndroidTextInput Caused by java.lang.reflect.InvocationTargetException Caused by java.lang.IllegalStateException: This dynamic value has been recycled |
It seems to always happen with certain timing on our app startup. So I added 300ms delay with a setTimeout to delay initial rendering and seems to work well. |
@mhkhung |
@SujataSwamy was you find solution. I get the same error in RN 0.55. What version RN do you use? |
@AndreyPatseiko I didnot find any solution. It still crashes app in Android build. |
This error still happens in RN 0.59.1, stack trace below:
|
Like said @mhkhung I added simple delay into run application, and for now I don't getting crash in first time start application. But I getted crashes on other screens just when they start rendering. |
Anything new about this issue? My error logs are getting blaoted from this type of crashes... It only happens on Samsung devices. What can I do to prevent this issue from happening? |
I found the best way to fix this is patch your old RN before building. You can't easily fork RN as it needs some kind of build step.. Create a patch file and apply the patch before build with a command inside package.json
I run patch.. (you need || true so it doesn't fail when the patch is already applied during build)
I have also created another patch for FrameBasedAnimationDriver crash issue the same way based on https://github.com/facebook/react-native/pull/19808/files |
This error still happens in RN 0.59.8 and it only happens on Samsung S7 & S7 edge
|
@bigggge Hello there! I suggest you to upgrade react-native version to at least 0.59.10! This version contains newer version of JSC which is preventing from exactly these errors in your app. |
If you are integrating the React Native app into an existing native app, make sure that you are using a single instance of
|
@sinodko In last version of our application i upgraded RN version to 0.59.10 and still this error occurs |
@prof18 Thank you for this! |
In some case, I need multiple activities run many react native project in one application. How can I use on ReactInstanceManager? |
In my use case, I found that Android device only support update one react native render when a huge count of data coming from remote server (at least 100ms one message, and need to do complex computing and render). If I start render multiple react native project at the same time, it would easy occurs this error. |
We are seeing a lot of these crashes in Android and are on RN 59.10. Are there any plans to fix this soon? |
I have the same problem on android. react-native version: 0.44.3 errror log:
|
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Environment
React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 40.02 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.6.0 - /usr/local/bin/node
Yarn: 1.6.0 - ~/.yarn/bin/yarn
npm: 5.3.0 - /usr/local/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
Build Tools: 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3
API Levels: 21, 23, 25, 26, 27, 28
IDEs:
Android Studio: 2.2 AI-145.3537739
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.2 => 0.57.2
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 1.3.0
react-native-git-upgrade: 0.2.7
Android build versions:
buildToolsVersion = "27.0.3"
minSdkVersion = 21
compileSdkVersion = 27
targetSdkVersion = 27
supportLibVersion = "27.1.1"
Description
Hi there,
since I upgraded to react native 0.57 I receive some crashes on Android.
It's not reproducable, but If I e.g reload a list over and over again the app crashes at some point (sometimes it takes 100 tries, sometimes only 2 or 3).
The exception is always a JSApplicationIllegalArgumentException.
But with different properties (height, width, paddingHorizontal, ...).
I have no glue where it is coming from, because the crashes also occure on different places in the app.
If you need more information I'm glad to help.
Thanks
David
The stacktrace from sentry looks like this:
Reproducible Demo
The text was updated successfully, but these errors were encountered: