Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] A random exception occurred while updating prop xxx #13253

Closed
solartcc opened this issue Apr 2, 2017 · 2 comments
Closed

[Android] A random exception occurred while updating prop xxx #13253

solartcc opened this issue Apr 2, 2017 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@solartcc
Copy link

solartcc commented Apr 2, 2017

Description

I embed two ReactFragment into ViewPager of a Activity, each ReactFragment loads a different bundle file at the same time. Then we have come across a random crash as the log below, probability is about 60-70%. According to the information, it seems that ReactNative has some problem on dealing with multi ReactFragment loaded at the same time in a same Activity.

The bundle file works well with ReactActivity or single ReactFragment.

Exception log

04-02 16:51:52.102 8996-10354/? E/unknown:ViewManager: Error while updating prop left
java.lang.IllegalArgumentException: method com.facebook.react.uimanager.LayoutShadowNode.setPositionValues argument 1 has type int, got null
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:104)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:148)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:52)
at com.facebook.react.uimanager.ReactShadowNode.updateProperties(ReactShadowNode.java:258)
at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:184)
at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:235)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:319)
at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:150)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:833)

others, for example:

04-02 17:03:59.075 8996-10826/? E/unknown:ViewManager: Error while updating prop marginRight
...
04-02 17:05:08.362 8996-11119/? E/unknown:ViewManager: Error while updating prop position
...
04-02 17:06:07.946 8996-11424/? E/unknown:ViewManager: Error while updating prop height
...
04-02 17:07:24.751 8996-11885/? E/unknown:ViewManager: Error while updating prop bottom
...
04-02 17:10:18.569 8996-12535/? E/unknown:ViewManager: Error while updating prop flexDirection
...
04-02 17:13:05.374 8996-13067/? E/unknown:ViewManager: Error while updating prop right
...

or other random props.

Solution

I did't find a very correct solution. However, I found that when the exception caught by NativeModuleCallExceptionHandler I through invoke the XReactInstanceManagerImpl::recreateReactContextInBackgroundFromBundleLoader to reload the bundle file, in this way it can be normal rendering again.

I expect to find a real solution. Thanks!

image20170402173349

Additional Information

  • React Native version: 0.41.0
  • Platform: Android
  • Development Operating System: MacOS
  • Dev tools: Android Studio 2.2, Android SDK 16+
@hramos
Copy link
Contributor

hramos commented Jun 26, 2017

Closing as the issue did not provide a list of repro steps as required by the template.

@hramos hramos closed this as completed Jun 26, 2017
@wuguokai
Copy link

@solartcc hi,could you have solve the problem?I got same exception!

@facebook facebook locked as resolved and limited conversation to collaborators Jun 26, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants