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.

IllegalArgumentException crash on Android

See original GitHub issue

Describe Since upgrading to RN 0.64 we encounter following crash on Android

The weird part here is that in our project we use react-native-gesture-handle in other components but when we scroll to change the date from DatePickerField it starts to crash on Android and the log points out crash because of react-native-gesture-handler. I am not sure that i am right if i post this issue in here but in fact there are maybe related things between DatePickerField with this crash.

Crash log:

IllegalArgumentException. Unable to find JSIModule for class UIManager

java.lang.IllegalArgumentException: 
  at com.facebook.react.bridge.JSIModuleRegistry.getModule (JSIModuleRegistry.java:39)
  at com.facebook.react.bridge.CatalystInstanceImpl.getJSIModule (CatalystInstanceImpl.java:2)
  at com.facebook.react.uimanager.UIManagerHelper.getUIManager (UIManagerHelper.java:81)
  at com.facebook.react.uimanager.UIManagerHelper.getUIManager (UIManagerHelper.java:1)
  at com.facebook.react.uimanager.UIManagerHelper.getUIManagerForReactTag (UIManagerHelper.java:4)
  at com.facebook.react.animated.NativeAnimatedNodesManager.handleEvent (NativeAnimatedNodesManager.java:17)
  at com.facebook.react.animated.NativeAnimatedNodesManager.onEventDispatch (NativeAnimatedNodesManager.java:6)
  at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent (EventDispatcherImpl.java:27)
  at com.facebook.react.uimanager.JSTouchDispatcher.handleTouchEvent (JSTouchDispatcher.java:58)
  at com.facebook.react.ReactRootView.dispatchJSTouchEvent (ReactRootView.java:49)
  at com.facebook.react.ReactRootView.onInterceptTouchEvent (ReactRootView.java)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2753)
  at com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView.dispatchTouchEvent (RNGestureHandlerEnabledRootView.java:12)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3222)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2845)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3222)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2845)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3222)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2845)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3222)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2845)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3222)
  at android.view.ViewGroup.dispatchTouchEvent (ViewGroup.java:2845)
  at com.android.internal.policy.DecorView.superDispatchTouchEvent (DecorView.java:697)
  at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent (PhoneWindow.java:1879)
  at android.app.Activity.dispatchTouchEvent (Activity.java:3487)
  at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent (WindowCallbackWrapper.java:2)
  at com.android.internal.policy.DecorView.dispatchTouchEvent (DecorView.java:655)
  at android.view.View.dispatchPointerEvent (View.java:13732)
  at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent (ViewRootImpl.java:6131)
  at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess (ViewRootImpl.java:5909)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:5358)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:5411)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:5377)
  at android.view.ViewRootImpl$AsyncInputStage.forward (ViewRootImpl.java:5536)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:5385)
  at android.view.ViewRootImpl$AsyncInputStage.apply (ViewRootImpl.java:5593)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:5358)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:5411)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:5377)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:5385)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:5358)
  at android.view.ViewRootImpl.deliverInputEvent (ViewRootImpl.java:8420)
  at android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:8353)
  at android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:8306)
  at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent (ViewRootImpl.java:8535)
  at android.view.InputEventReceiver.dispatchInputEvent (InputEventReceiver.java:198)
  at android.os.MessageQueue.nativePollOnce (MessageQueue.java)
  at android.os.MessageQueue.next (MessageQueue.java:326)
  at android.os.Looper.loop (Looper.java:181)
  at android.app.ActivityThread.main (ActivityThread.java:7050)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)

Smartphone

  • OS: Android
  • React Native version: 0.64.0
  • react-native-date-picker: 3.2.10
  • react-native-gesture-handler: 1.10.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:14
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
sharifhhcommented, Apr 7, 2021

Here is a patch-package script as a workaround for now

diff --git a/node_modules/react-native-date-picker/android/src/main/java/com/henninghall/date_picker/PickerView.java b/node_modules/react-native-date-picker/android/src/main/java/com/henninghall/date_picker/PickerView.java
index 53ee357..de0fcca 100644
--- a/node_modules/react-native-date-picker/android/src/main/java/com/henninghall/date_picker/PickerView.java
+++ b/node_modules/react-native-date-picker/android/src/main/java/com/henninghall/date_picker/PickerView.java
@@ -34,6 +34,7 @@ public class PickerView extends RelativeLayout {
         if (didUpdate(VariantProp.name)) {
             this.removeAllViewsInLayout();
             inflate(getContext(), state.derived.getRootLayout(), this);
+            findViewById(R.id.container).setId(100023);
             uiManager = new UIManager(state, this);
         }
 

7reactions
henninghallcommented, Jun 11, 2021

This issue is fixed in react native 0.64.2 🥳

Read more comments on GitHub >

github_iconTop Results From Across the Web

My app crashes with a java.lang.IllegalArgumentException
I get a crash report every few weeks about a java.lang.IllegalArgumentException and I really don't know where to start looking.
Read more >
[Android] IllegalArgumentException crash with 0.64-rc.2 #1284
The error is casued by the UIManager trying to dispatch this event to JavaScript via the bridge. The UIManager tries to retrieve the...
Read more >
How to Fix the Top 5 Android Crashes - Instabug Blog
Probably the most varied and general cause of crashes on the list is the IllegalArgumentException. Its definition in the most simple and it...
Read more >
java.lang.IllegalArgumentException: View not attached to ...
IllegalArgumentException: View not attached to window manager at android.view. ... CrashReporter$1.run(CrashReporter.java:95) at android.os.Handler.
Read more >
Navigation crashes with IllegalArgumentException [118975714]
This isn't an issue with Navigation, but an issue with Fragments not canceling click events when stopped, causing the second click event to...
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