wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

IllegalViewOperationException: Trying to add unknown view tag #2892

Closed brunolemos closed 6 years ago

brunolemos commented 6 years ago

Issue Description

1% of the users are facing this crash. Do you have any idea what could it be?

com.facebook.react.uimanager.IllegalViewOperationException
com.reactnativenavigation.controllers.NavigationActivity
Trying to add unknown view tag: 1234

I noticed most of these users had this weird behavior of ActivityLifecycle being triggered multiple times at the same time (onDestroy(), onStop(), onResume(), onStart(), onCreate(), etc). What could cause this?

image

Stack points to https://github.com/facebook/react-native/blob/353c070be9e9a5528d2098db4df3f0dc02d758a9/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java#L479 but I didn't have this before migrating to react-native-navigation afaik.

04-29 07:07:05.094 25419-25452/com.reactnativenavigation.playground E/unknown:ReactNative: Exception in native call
    com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 70
        at com.facebook.react.uimanager.UIImplementation.setChildren(UIImplementation.java:480)
        at com.facebook.react.uimanager.UIManagerModule.setChildren(UIManagerModule.java:448)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        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:31)
        at android.os.Looper.loop(Looper.java:164)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
        at java.lang.Thread.run(Thread.java:764)

Steps to Reproduce / Code Snippets / Screenshots

Could not reproduce, but maybe you could give some insights.


Environment

zhairui commented 5 months ago

I meet same error with RN 0.72.5. I have no idea to deal with it, pls help !