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.

Error while updating property "d" of a view managed by RNSVGPath: V 9.8.1

See original GitHub issue

I saw that for others the recent update fixed this issue but it did not in my case. i downgraded to v 9.7.1. to get it working.

Code

import React from 'react';
import {View, Text} from 'react-native';
import Svg, {Circle, Path, Rect} from 'react-native-svg';

const Test = () => {
  return (
    <View
      style={{
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: 'tomato',
      }}>
      <Svg height="100" width="100">
        <Path d="M 40 60 A 10 10 0 0 0 60 60" stroke="black" />
        <Rect x="0" y="0" width="100" height="100" fill="black" />
        <Circle cx="50" cy="50" r="30" fill="yellow" />
        <Circle cx="40" cy="40" r="4" fill="black" />
        <Circle cx="60" cy="40" r="4" fill="black" />
      </Svg>
    </View>
  );
};

export default Test;

Error

Error while updating property "d" of a view managed by RNSVGPath: 

null

length 32; index=32

Environment info

Phone: Android react: 16.8.6 react-native: 0.60.5 Library version: 9.8.1

Stack Trace

java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:83)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:131)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:51)
        at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:46)
        at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:268)
        at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:198)
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1036)
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1007)
        at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
        at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172)
        at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765)
        at android.view.Choreographer.doCallbacks(Choreographer.java:580)
        at android.view.Choreographer.doFrame(Choreographer.java:549)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5753)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
     Caused by: java.lang.StringIndexOutOfBoundsException: length=32; index=32
        at java.lang.String.indexAndLength(String.java:500)
        at java.lang.String.charAt(String.java:494)
        at com.horcrux.svg.PathParser.parse_number(PathParser.java:525)
        at com.horcrux.svg.PathParser.parse_list_number(PathParser.java:497)
        at com.horcrux.svg.PathParser.parse(PathParser.java:152)
        at com.horcrux.svg.PathParser.parseData(PathParser.java:13)
        at com.horcrux.svg.PathView.setD(PathView.java:31)
        at com.horcrux.svg.RenderableViewManager$PathViewManager.setD(RenderableViewManager.java:395)
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:83) 
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:131) 
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:51) 
        at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:46) 
        at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:268) 
        at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:198) 
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1036) 
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1007) 
        at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) 
        at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172) 
        at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84) 
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765) 
        at android.view.Choreographer.doCallbacks(Choreographer.java:580) 
        at android.view.Choreographer.doFrame(Choreographer.java:549) 
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 
        at android.os.Handler.handleCallback(Handler.java:739) 
        at android.os.Handler.dispatchMessage(Handler.java:95) 
        at android.os.Looper.loop(Looper.java:135) 
        at android.app.ActivityThread.main(ActivityThread.java:5753) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
09-01 03:03:43.564 21910-21910/com.etunes E/unknown:ReactNative: Exception in native call
    com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'd' of a view managed by: RNSVGPath
        at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:98)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:131)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:51)
        at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:46)
        at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:268)
        at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:198)
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1036)
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1007)
        at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
        at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172)
        at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765)
        at android.view.Choreographer.doCallbacks(Choreographer.java:580)
        at android.view.Choreographer.doFrame(Choreographer.java:549)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5753)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:83)
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:131) 
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:51) 
        at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:46) 
        at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:268) 
        at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:198) 
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1036) 
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1007) 
        at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) 
        at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172) 
        at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84) 
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765) 
        at android.view.Choreographer.doCallbacks(Choreographer.java:580) 
        at android.view.Choreographer.doFrame(Choreographer.java:549) 
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 
        at android.os.Handler.handleCallback(Handler.java:739) 
        at android.os.Handler.dispatchMessage(Handler.java:95) 
        at android.os.Looper.loop(Looper.java:135) 
        at android.app.ActivityThread.main(ActivityThread.java:5753) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
     Caused by: java.lang.StringIndexOutOfBoundsException: length=32; index=32
        at java.lang.String.indexAndLength(String.java:500)
        at java.lang.String.charAt(String.java:494)
        at com.horcrux.svg.PathParser.parse_number(PathParser.java:525)
        at com.horcrux.svg.PathParser.parse_list_number(PathParser.java:497)
        at com.horcrux.svg.PathParser.parse(PathParser.java:152)
        at com.horcrux.svg.PathParser.parseData(PathParser.java:13)
        at com.horcrux.svg.PathView.setD(PathView.java:31)
        at com.horcrux.svg.RenderableViewManager$PathViewManager.setD(RenderableViewManager.java:395)
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:83) 
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:131) 
        at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:51) 
        at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:46) 
        at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:268) 
        at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:198) 
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1036) 
        at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1007) 
        at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29) 
        at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:172) 
        at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84) 
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765) 
        at android.view.Choreographer.doCallbacks(Choreographer.java:580) 
        at android.view.Choreographer.doFrame(Choreographer.java:549) 
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 
        at android.os.Handler.handleCallback(Handler.java:739) 
        at android.os.Handler.dispatchMessage(Handler.java:95) 
        at android.os.Looper.loop(Looper.java:135) 
        at android.app.ActivityThread.main(ActivityThread.java:5753) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200) 
09-01 03:03:43.684 21910-21910/com.etunes E/EmojiFactory_jni: Failed to load libemoji.so: dlopen failed: library "libemoji.so" not found

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:38

github_iconTop GitHub Comments

11reactions
antoinerousseaucommented, Sep 2, 2019

Downgrading didn’t solve it for me, but I put my SVG code into SVGOMG and it gave me a different one that works… go figure!

<Svg width={25} height={25} viewBox="0 -1 25 24">
  <G fill={tintColor} fillRule="evenodd">
-   <Path d="M14.364 15.281c-.438.263-1 .408-1.58.408-.58 0-1.141-.145-1.58-.408l-7.15-4.29s-.645-.387-.645.49v4.284c0 2.257 4.197 4.69 9.375 4.69s9.375-2.433 9.375-4.69v-.302-4.224c0-.703-.459-.36-.459-.36l-7.336 4.402z" />
-   <Path d="M24.581 7.098c.559-.345.559-.91 0-1.256L13.515.26c-.558-.345-1.472-.345-2.03 0L.42 5.842c-.559.345-.559.91 0 1.256l11.066 6.848c.558.345 1.472.345 2.03 0" />
-   <Path d="M24.164 17.336V9.918s.005-.351-.226-.235c-.185.093-.64.321-.8.447-.184.145-.143.47-.143.47v6.736c0 .096-.09.141-.134.164-.42.223-.702.634-.702 1.105 0 .708.636 1.281 1.42 1.281.785 0 1.421-.573 1.421-1.281 0-.473-.284-.885-.706-1.107-.042-.022-.13-.066-.13-.162z" />
+   <Path d="M14.36 15.28c-.43.26-1 .4-1.58.4-.58 0-1.14-.14-1.58-.4L4.05 11s-.64-.39-.64.5v4.27c0 2.26 4.2 4.7 9.37 4.7s9.38-2.44 9.38-4.7v-4.52c0-.7-.46-.36-.46-.36l-7.34 4.4z" />
+   <Path d="M24.58 7.1c.56-.35.56-.91 0-1.26L13.52.26a2.12 2.12 0 0 0-2.03 0L.42 5.84c-.56.35-.56.91 0 1.26l11.07 6.85c.55.34 1.47.34 2.03 0M24.16 17.34V9.92s0-.35-.22-.24c-.19.1-.64.32-.8.45-.19.14-.14.47-.14.47v6.74c0 .1-.1.14-.14.16-.42.22-.7.63-.7 1.1 0 .71.63 1.29 1.42 1.29.78 0 1.42-.58 1.42-1.29 0-.47-.28-.88-.7-1.1-.05-.02-.14-.07-.14-.16z" />
  </G>
</Svg>

(the buggy line was the second path)

4reactions
saaymeencommented, Oct 6, 2021

Having this error on Android with react-native-svg@12.1.1. Error does not happen on simulator (neither M1 nor Linux) and not on iPhone. Only on a real Android device for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while updating property "d" of a view managed by ...
i downgraded to v 9.7.1. to get it working. Code. import React from 'react'; import {View, Text} from 'react-native ...
Read more >
Error while updating property 'd' of a view managed by
My intention: Dynamically fetch chart data and plot multiple charts on my page. Whenever I have a succesful fetch the sData[] gets filled....
Read more >
[Solved]-Error while updating property 'd' of a view managed by
Coding example for the question Error while updating property 'd' of a view managed by: RNSVGPath-React Native.
Read more >
Error while updating property 'd' of a view managed by
I have an SvgUri component in my code. The component causes a crash when the URI points to the following SVG file: <?xml...
Read more >
error while updating property 'transform' of a view managed by
error while updating property 'd' of a view managed by rnsvgpath ... October 10th 2018, our team releases a new version of our...
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