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.

Bunch of crashes on Android (6.x and 7.x) - strokeDashoffset and strokeWidth

See original GitHub issue

We 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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:13

github_iconTop GitHub Comments

2reactions
cihantascommented, Oct 26, 2017

Same problem.

"react": "16.0.0-alpha.12",   
"react-native": "^0.48.4",   
"react-native-svg": "^6.0.0-rc1",  
0reactions
jabajajcommented, Feb 13, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bunch of crashes on Android (6.x and 7.x) - strokeDashoffset ...
We 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...
Read more >
Why Do My Apps Keep Crashing on Android? - Avast
1. The “Force stop” method · 2. Restart your Android device · 3. Keep your phone updated · 4. Clear your cached data...
Read more >
Crashes | Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
stroke-dasharray | CSS-Tricks
The stroke-dasharray property in CSS sets the length of dashes in the stroke of SVG shapes. More specifically, it sets the length of...
Read more >
Fix an Android device that's restarting or crashing - Google Help
Try the following steps if your phone has any of these problems: Randomly reboots or restarts; Shuts down without restarting; Restarts constantly: Go...
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