react-native-v8: Crash when using with react-native-code-push

Hi ! Since upgrading to 0.61.2 (and now I’m using 0.61.4), installing an update with codepush crashes the app. This only happens when using V8 (tried Hermes and JSC, no issue there). I have 2 traces, a JS one et a native one: JS: LOG [CodePush] Exception in HostFunction: Malformed calls from JS: field sizes are different. [[23,28],[1,0],[[80,100,1574329821120,false]],263]

Native:

11-21 10:44:47.153 15878 15878 E AndroidRuntime: java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: index=1 count=0 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:344) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.bridge.ReactContext$ExceptionHandlerWrapper.handleException(ReactContext.java:351) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:31) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:789) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6944) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: Caused by: java.lang.IndexOutOfBoundsException: index=1 count=0 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.view.ViewGroup.addInArray(ViewGroup.java:5234) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.view.ViewGroup.addViewInner(ViewGroup.java:5144) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4953) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at android.view.ViewGroup.addView(ViewGroup.java:4893) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.uimanager.ViewGroupManager.addView(ViewGroupManager.java:35) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren(NativeViewHierarchyManager.java:512) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute(UIViewOperationQueue.java:205) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:779) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:888) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.uimanager.UIViewOperationQueue.access$2200(UIViewOperationQueue.java:42) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded(UIViewOperationQueue.java:846) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:29) 11-21 10:44:47.153 15878 15878 E AndroidRuntime: … 7 more

Any leads ? thanks in advance !

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

@Alaa-Ben AFAIK, for remote debugging, RN will run on legacy bridge mode, i.e. not JSI objects. That’s why the error will not happen on remote debugging mode.

So for now, the only solution is the PR you submitted to react native ?

A workaround is to patch V8 internally and remove the exception from Object.freeze(). Please let me wait for some days to see if there are any updates from the PR first.