-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Error while updating property "d" of a view managed by RNSVGPath: V 9.8.1 #1084
Comments
This PR was created to fix this issue on latest version. Hope it can be merged quick |
I'm using v9.8.3 (latest) and I'm getting this exact error with this path:
|
@antoinerousseau yes, seems it's not solved yet. I tested it too but went back to 9.7.1 which works 100%. |
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) |
@antoinerousseau u made it work with 9.8.3 or 9.7.1 ? |
latest (9.8.3) but the version didn't seem to matter |
@antoinerousseau wow, nice man! i will give it a try today, then. Glad it worked. |
Can you try with v9.8.4? |
Hi, I had the same error than @antoinerousseau, but the new version, v9.8.4, seems to fix it. Thank you very much @msand :) |
Hi, I've got the same error with that path :
Tested on 9.9.X and now on 9.7.1, 9.8.4... The error is this one :
|
This seems to work fine in the latest version: import React from 'react';
import {View} from 'react-native';
import Svg, {Path} from 'react-native-svg';
const Test = () => {
return (
<View
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'tomato',
}}>
<Svg height="100%" width="100%" viewBox="0 0 600 600">
<Path
fill="none"
stroke={'black'}
d="M240.77.05c-41.7 1.46-76.34 33.94-80.34 75.4a84 84 0 001.12 24s.13.9.56 2.62a83.71 83.71 0 005.64 16.58c8.39 19.85 27.8 53.06 71.35 89.19a7.29 7.29 0 009.29 0c43.55-36.09 63-69.3 71.39-89.23a79.7 79.7 0 005.64-16.61c.39-1.67.56-2.62.56-2.62A83.61 83.61 0 00240.77.05zm3 125.11a40.6 40.6 0 1140.67-40.6 40.62 40.62 0 01-40.7 40.6zm126.82 210.99l7-3.58s6.64-3.18 5.7-13-6.45-12.63-12-13.23c-3.83-.42-11.36-.53-15.64-.56-8.31-16.86-15.93-32.29-15.93-32.29s-4.55-8.07-11.62-12.93a37.33 37.33 0 00-21.1-6.91c-6.92-.05-78.13-.88-78.36-.66l-41.44-.25S176.92 251 165.23 258a43.53 43.53 0 00-16.86 18.78c-.35.65-6.69 13.08-14 27.44l-15.44-.13s-7.76.62-10.43 6.28-3.6 16.17 3.57 19.55c1.8.85 4.42 2.18 7.32 3.7-4.51 8.84-7.71 15.13-7.71 15.13s-5.28 12.88-5.37 24.41l-.72 85.56S104 476.53 121 476.67l24 .2s12.36.75 12.52-17.34l.07-8.58 172.51 1.45-.08 9.51s-1.34 16.32 12.87 16.44l28.62.25s10.25-.66 10.37-15.61l.74-87.41s-1.06-16.62-7.23-29.5c-1.01-2.16-2.7-5.64-4.8-9.93zm-255.1-13.89l1.82 1.71a2.91 2.91 0 01-1.82-1.71zm2.94 145.07a3.61 3.61 0 01-2-.84l3.1.84zm52.94-107a13.65 13.65 0 1113.76-13.54 13.65 13.65 0 01-13.76 13.56zm109.06 16.88a53.14 53.14 0 01-75.05-.63 7.11 7.11 0 0110.14-10 38.9 38.9 0 0055 .46 7.1 7.1 0 0110 10.13zm34.28-15.68A13.65 13.65 0 11328.48 348a13.65 13.65 0 01-13.77 13.55zM3 619.29c14 9.06 28.07 12.37 34.25 12.37 4.32 0 5.33-1.72 5.33-3.45 0-2-1.3-2.88-3.17-3.31-5-1.3-19.57-2.88-30.22-12.23C3.74 607.77 0 601 0 590.93c0-20.86 16.12-35.11 42.46-35.11 12.66 0 27.63 3.31 37.13 8.2v34.11c-13.53-6.76-26.2-9.21-31.52-9.21-4.18 0-5.33 1.58-5.33 3.17 0 2.15 1.59 3 3.31 3.59 4.32 1.3 18.71 3 28.93 11.08 7 5.76 10.51 13.1 10.51 22.46 0 20-16.12 34-43.47 34-13.09 0-28.78-3.17-39-8.49zm91.55-61.89H134c25 0 53.1 7.2 53.1 37 0 26.77-22.45 37.56-48.21 37.56h-1.44v29.64h-42.9zm44 48.07c7.34 0 10.79-3.89 10.79-8.78s-3.59-8.78-10.79-8.78h-1.15v17.56zm57.75-48.07h42.89v67.21h32.24v37H196.3zm86.35 0h42.89v104.2h-42.89zm87.21 35.12l-.14-.29H338.2V557.4h95.42l.14.29-37.56 70.52.14.29h34.83v33.1h-97.86l-.15-.29zm72.39-35.12h42.89v104.2h-42.89z"
/>
</Svg>
</View>
);
};
const App = () => {
return <Test />;
};
export default App; |
@msand the code above does not work for me with react-native-svg@9.13.6. Could you please share your package.json configuration ? |
@dmitry-mashkov Can you try this? |
Also experiencing this issue in Rocket Chat |
Can you make a reproduction? |
I'll try and get some more information when I dig into this bug next week. Thanks for the reply. |
any updates on this? |
updating to latest version |
Still having the same issue... |
having same problem on my mac machine. |
This issue happened to us on an emulator and upgrading to the latest version (12.1.0) fixed it. |
facing similar issue but with the fill property of { Path } in react-native-svg in the latest version (12.1.0) |
This issue is not fixed on 12.1.0, maybe related to |
@MyRealFood Still having that issue with 12.1.0 |
You can trigger this error when you attempt to graph a line that is not within the boundary of the SVG on iOS. |
Same problem: "error while updating property "d" of a view managed by RNSVGPath" <Svg preserveAspectRatio="none" width="95%" height="116">
<Defs>
<ClipPath id="svg-draw">
<Path
fillRule="evenodd"
d={`M0 8C0 3.58172 3.58172 0 8 0H335C339.418 0 ${screenWidth} 3.58172 ${screenWidth} 8V50.2667C338.582 50.2667 1000 1000.729 1000 58C335 62.271 1000.582 65.7333 ${screenWidth} 65.7333V108C${screenWidth} 112.418 1000.418 116 335 116H7.99999C3.58172 116 0 112.418 0 108V67.6667C4.41828 67.6667 8 64.2043 8 59.9333C8 55.6623 4.41828 52.2 0 52.2V8Z`}
fill="#fff"
/>
</ClipPath>
</Defs>
<G clipPath="url(#svg-draw)" fillRule="nonzero" fill="#fff">
<Rect width={screenWidth-16} height="116" />
<Image href={ExampleImage} width={screenWidth/3} height="116" preserveAspectRatio="none" />
</G>
</Svg> |
Tried different versions and reference.. Only this one gave me a solution |
I also have this error with some android phones. My version of react-native-svg is 12.1.0 should I go back to 9.8.4? |
I tried to downgrade to 9.8.4 did'nt work I still have the crash |
hi @felix-lambert could you find any solution? |
No I had to uninstall react-native-svg because I had some random errors with some random devices and I did'nt know where it came from |
An open question please. It still happens |
Having this error on Android with |
Same here. It's also hard to reproduce. I can see the crashes in production but I am unable to recreate it with my own Android device. |
Any updates on this topic ? |
Hi, I am still facing this issue in our production reported by firebase crashlytics
Can you at least help in letting us know what are the possibilities that it will result in this crash? Maybe I can add some workaround in my code so as to prevent this from happening. |
Did anyone find a solution to this? |
PLease anyone found the issue ? |
Does anyone know why this issue is closed? We are still getting many crash reports reported by firebase crashlytics. |
In my case the problem was not in the library. |
v12.3.0 is work for me. |
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
Error
Environment info
Phone: Android
react: 16.8.6
react-native: 0.60.5
Library version: 9.8.1
Stack Trace
The text was updated successfully, but these errors were encountered: