react-native-svg: Version 7.0.X seems to be broken on Android

It seems that version 7.0.x is broken on android, since it keeps throwing “<Element> should be descendant of a SvgViewShadow”, as also pointed out by here, is it a known issue?

logcat outputs: E unknown:ReactNative: RNSVG: com.horcrux.svg.ClipPathShadowNode should be descendant of a SvgViewShadow. E unknown:ReactNative: RNSVG: com.horcrux.svg.ClipPathShadowNode should be descendant of a SvgViewShadow. E unknown:ReactNative: RNSVG: com.horcrux.svg.DefsShadowNode should be descendant of a SvgViewShadow. E unknown:ReactNative: RNSVG: com.horcrux.svg.DefsShadowNode should be descendant of a SvgViewShadow. E unknown:ReactNative: RNSVG: com.horcrux.svg.PathShadowNode should be descendant of a SvgViewShadow. E unknown:ReactNative: RNSVG: com.horcrux.svg.PathShadowNode should be descendant of a SvgViewShadow. E unknown:ReactNative: RNSVG: com.horcrux.svg.GroupShadowNode should be descendant of a SvgViewShadow.

Android version: 8.0.0 React Native version: 0.57.0

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 7
  • Comments: 25 (9 by maintainers)

Most upvoted comments

@kristerkari I changed the null handling logic, so the common initial case doesn’t cause any warnings: https://github.com/react-native-community/react-native-svg/commit/a2550c35df7cdf972ba707687480c7b4573c9b32

Closing this as it’s fixed in the latest versions.

I just tested and the warnings are gone now, thanks!

So I just did more testing for the issue. Ignore my previous comment. That was not the app crashing, but rather the “Pixer Launcher”, so I got confused that the React Native app would have crashed.

Now that I tried to run the code again, I could not make the app crash with my https://github.com/kristerkari/rn-svg-crash repo, but the errors/warnings were still printed to adb logcat even with the latest master.

I also need to mention that downgrading to v6.5.2 fixes the crash for me.