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.

Exception in native call from JS null

See original GitHub issue

I have the following exception in my react-native app on Android

Exception in native call from JS null handleException ReactRootView.java:564 dispatchDraw ReactViewGroup.java:705 draw View.java:13715 buildDrawingCache View.java:12966 draw View.java:13400 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 buildDrawingCache View.java:12966 draw View.java:13400 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 buildDrawingCache View.java:12966 draw View.java:13400 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 draw View.java:13715 draw FrameLayout.java:467 draw HorizontalScrollView.java:1562 draw ReactHorizontalScrollView.java:415 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 draw View.java:13715 draw FrameLayout.java:467 draw ScrollView.java:1576 draw ReactScrollView.java:392 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 drawChild DrawerLayout.java:1366 dispatchDraw ViewGroup.java:2797 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13715 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactViewGroup.java:699 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 dispatchDraw ReactRootView.java:226 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 draw View.java:13715 draw FrameLayout.java:467 draw View.java:13596 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 draw View.java:13594 drawChild ViewGroup.java:2928 dispatchDraw ViewGroup.java:2797 draw View.java:13715 draw FrameLayout.java:467 draw PhoneWindow.java:2211 drawSoftware ViewRootImpl.java:2281 draw ViewRootImpl.java:2177 performDraw ViewRootImpl.java:2045 performTraversals ViewRootImpl.java:1854 doTraversal ViewRootImpl.java:989 run ViewRootImpl.java:4351 run Choreographer.java:749 doCallbacks Choreographer.java:562 doFrame Choreographer.java:532 run Choreographer.java:735 handleCallback Handler.java:725 dispatchMessage Handler.java:92 loop Looper.java:137 main ActivityThread.java:5041 invokeNative Method.java invoke Method.java:511 run ZygoteInit.java:793 main ZygoteInit.java:560 main NativeStart.java

I have the following versions in my React-Native app:

  • react-native: 0.57.8
  • react: 16.6.3
  • Android: 4.4.2

The main problem is that, this exception does not have a certain case, it just happens anywhere in the app. For example, while you’ve been in the app for a while, and then try to go to a screen, it crashes with this exception.

I have searched a lot about IllegalViewOperationException.

https://github.com/facebook/react-native/issues/13984 -> The issue here suggest to remove LayoutAnimation however I’ve totally removed it from my project and I’m still facing the issue.

com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag -> the exception here seems to be caused by another reason, in my case I don’t have an unknown view tag issue

I have searched a lot about StackOverflowException in react-native, but even in it’s GitHub issues, there are zero results.

I’ve also checked Exception in native call error. For example, in this link, E/unknown:React: Exception in native call, the issue is caused by bundling. However my case is not related to bundling. I can successfully run the app in the emulator and navigate among screens. The exception also occurs in release mode on real devices too.

I’m unable to find an answer including Exception in native call ,IllegalViewOperationException, and StackOverflowException keywords. The exception occurs on Android devices with only 4.x version. It does not occur on 5 and higher Android versions. I guess that it might be related to device’s insufficient RAM, or the device might not handle too many renderings in consecutive page navigations. Any ideas on how I can prevent this exception?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17

github_iconTop GitHub Comments

5reactions
hsnMoghadasicommented, Aug 13, 2019

my problem solved with this:

cd android
gradlew clean
gradlew assembleDebug --stacktrace

i hope that works for you

1reaction
alexkuttigcommented, Apr 23, 2019

@murtraja short update - Upgrading RN to 0.59.5 did not solve the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

E/unknown:React: Exception in native call - Stack Overflow
I resolve this, by deleting the dependency in android\settings.gradle file. That not specified in the build.gradle file. This fix my problem.
Read more >
[Solved]-getting Exception in native call from JS java.lang ...
Coding example for the question getting Exception in native call from JS java.lang.NullPointerException: Attempt to invoke interface method-React Native.
Read more >
How to Fix TypeError: Null is Not an Object in JavaScript
The JavaScript error TypeError: null is not an object occurs when a property is accessed or a method is called on a null...
Read more >
[GWT] Documentation - JavaScript: JSNI
The JavaScript Native Interface (JSNI) feature of GWT can solve both of these ... Call from JavaScript code into Java code and vice-versa;...
Read more >
Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
operator accesses an object's property or calls a function. ... Note: If someInterface itself is null or undefined , a TypeError exception ......
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