react-native-svg icon indicating copy to clipboard operation
react-native-svg copied to clipboard

"Expected transform function" error when using with Reanimated

Open d4rky-pl opened this issue 2 years ago • 5 comments

Bug

When using react-native-svg with react-native-reanimated, animating SVG elements like Circle on the web results in a lot of console errors:

Error: <circle> attribute transform: Expected transform function, "undefined".

The animation itself works correctly.

Environment info

Library version: 13.9.0

Steps To Reproduce

  1. Create Svg with Circle and animate any of its properties

Snack example: https://snack.expo.dev/@helpling/happy-apple

Describe what you expected to happen:

The console.error should not be displayed

d4rky-pl avatar May 13 '23 18:05 d4rky-pl

yup, I also have the same problem 🐰

GalaxyTea1 avatar Aug 08 '23 12:08 GalaxyTea1

I was having this issue with 13.9.0. Updated to 13.14.0 and errors are gone.

jjspierx avatar Oct 03 '23 16:10 jjspierx

Same

oliviercperrier avatar Feb 16 '24 18:02 oliviercperrier

@jjspierx Yeah. I updated my package to the latest, which resolves this issue.

But I get this warning, when using it with Expo.

image

Karthik-B-06 avatar Mar 26 '24 11:03 Karthik-B-06

@Karthik-B-06 this is fine as long as you're using development build (but will crash in Expo Go) and build your own dependencies. You can opt-out of the warning for this library.

d4rky-pl avatar Mar 26 '24 11:03 d4rky-pl

@d4rky-pl Hey,

Here is an example showing correctly how we should use Reanimated. Additionally, I am sharing the Reanimated documentation with you.

bohdanprog avatar Aug 06 '24 11:08 bohdanprog

@bohdanprog I am not entirely sure how this is supposed to be helpful but... thank you?

d4rky-pl avatar Aug 06 '24 14:08 d4rky-pl

Looks fixed in the latest version, closing

d4rky-pl avatar Aug 06 '24 14:08 d4rky-pl

@bohdanprog I am not entirely sure how this is supposed to be helpful but... thank you?

Case your example doesn't work?

bohdanprog avatar Aug 06 '24 14:08 bohdanprog

@bohdanprog uh, yeah, that's usually what happens when you comment on an issue with a Snack from a year ago using an Expo version that is not supported by now 😅

The example worked in May 2023 and I know how to use the library, the bug has already been fixed.

d4rky-pl avatar Aug 06 '24 18:08 d4rky-pl

I understand. I apologize for the lengthy response, but we are striving to do our best as we aim to improve. :)

Thank you for your response :)

bohdanprog avatar Aug 06 '24 19:08 bohdanprog