Bunch of crashes on Android (6.x and 7.x) - strokeDashoffset and strokeWidth
See original GitHub issueWe are seeing a bunch of crashes on Android originating from react-native-svg. I’m a little confused about the exact source of this crash as we never set ‘strokeDashoffset’ anywhere in our react native views. There’s also a similar crash with the proprety ‘strokeWidth’ (which we also never set explicitly). Could anyone help with some pointers on fixing this (or at least determining the root cause)?
This are the stack traces I have:
strokeDashoffset:
com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'strokeDashoffset' in shadow node of type: RNSVGPath at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:116) at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:154) at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:58) at com.facebook.react.uimanager.ReactShadowNode.updateProperties(ReactShadowNode.java:272) at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:197) at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:249) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:363) 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:751) 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:241) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194) at java.lang.Thread.run(Thread.java:761) Caused by: java.lang.IllegalArgumentException: method com.horcrux.svg.RenderableShadowNode.setStrokeDashoffset argument 1 has type float, got null at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:105) ... 15 more
strokeWidth:
com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'strokeWidth' in shadow node of type: RNSVGPath at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:116) at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:154) at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:58) at com.facebook.react.uimanager.ReactShadowNode.updateProperties(ReactShadowNode.java:272) at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:197) at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:249) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:363) 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:751) 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:154) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194) at java.lang.Thread.run(Thread.java:762) Caused by: java.lang.IllegalArgumentException: method com.horcrux.svg.RenderableShadowNode.setStrokeWidth argument 1 has type float, got null at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:105) ... 15 more
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:13
Top GitHub Comments
Same problem.
I was definitely rebuilding the native bundle after upgrading. I think what resolved the issue is the fact that we now only have one instance of the ReactInstanceManager vs. multiple instances before.