question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Random JSApplicationIllegalArgumentException crashes on Android

See original GitHub issue

Environment

React Native Environment Info: System: OS: macOS 10.14 CPU: x64 Intel® Core™ 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:

java.lang.ClassCastException: Value for fill cannot be cast from ReadableNativeArray to Double
    at com.facebook.react.bridge.ReadableNativeMap.checkInstance(ReadableNativeMap.java:148)
    at com.facebook.react.bridge.ReadableNativeMap.getValue(ReadableNativeMap.java:127)
    at com.facebook.react.bridge.ReadableNativeMap.getDouble(ReadableNativeMap.java:168)
    at com.facebook.react.bridge.DynamicFromMap.asDouble(DynamicFromMap.java:64)
    at com.facebook.react.uimanager.LayoutShadowNode$MutableYogaValue.setFromDynamic(LayoutShadowNode.java:67)
    at com.facebook.react.uimanager.LayoutShadowNode.setHeight(LayoutShadowNode.java:157)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:105)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:157)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:61)
    at com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties(ReactShadowNodeImpl.java:458)
    at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:295)
    at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:377)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
    at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
    at android.os.Looper.loop(Looper.java:164)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
    at java.lang.Thread.run(Thread.java:764)
java.lang.reflect.InvocationTargetException: null
    at java.lang.reflect.Method.invoke(Method.java)
    at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:105)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:157)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:61)
    at com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties(ReactShadowNodeImpl.java:458)
    at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:295)
    at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:377)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
    at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
    at android.os.Looper.loop(Looper.java:164)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
    at java.lang.Thread.run(Thread.java:764)
com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'height' in shadow node of type: RCTView
    at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:116)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:157)
    at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:61)
    at com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties(ReactShadowNodeImpl.java:458)
    at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:295)
    at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:377)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
    at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
    at android.os.Looper.loop(Looper.java:164)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
    at java.lang.Thread.run(Thread.java:764)

Reproducible Demo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:26
  • Comments:37 (3 by maintainers)

github_iconTop GitHub Comments

17reactions
Kamill90commented, Oct 16, 2018

I can confirm. Crashlytics gives us more and more this kind of report since we have upgraded react-native to 0.57 Most common crashes are: Fatal Exception: com.facebook.react.bridge.JSApplicationIllegalArgumentException Error while updating property 'marginBottom' in shadow node of type: RCTText

Fatal Exception: com.facebook.react.bridge.JSApplicationIllegalArgumentException Error while updating property 'bottom' in shadow node of type: RCTView

Fatal Exception: com.facebook.react.bridge.JSApplicationIllegalArgumentException Error while updating property 'paddingHorizontal' in shadow node of type: RCTView

Fatal Exception: com.facebook.react.bridge.JSApplicationIllegalArgumentException Error while updating property 'fill' of a view managed by: RNSVGPath

Is there any workaround /solution /planned bugfix for that?

14reactions
HarikaSabbellacommented, Sep 6, 2019

We are seeing a lot of these crashes in Android and are on RN 59.10. Are there any plans to fix this soon?

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSApplicationIllegalArgumentExc...
We're getting this crash on all kind of devices. Fatal Exception: com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating ...
Read more >
Fix an Android device that's restarting or crashing
Randomly reboots or restarts; Shuts down without restarting; Restarts constantly: Go to the Advanced troubleshooting section. Troubleshoot your phone. Check for ...
Read more >
Appgyver - QA processes & Android crash issue
Appgyver - QA processes & Android crash issue ... Looks like it crashes with “Animated node with tag XXXX does not exists” at...
Read more >
Debugging a Non Reproducible Crash - Bam Tech
Our crash reporting tool, Sentry is on fire!! All the new errors are of the type JSApplicationIllegalArgumentException Error while updating ...
Read more >
Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found