vault-development / react-native-svg-uri

Render SVG images in React Native from an URL or static file
850 stars 335 forks source link

svg wrong #128

Open kingkong0828 opened 6 years ago

kingkong0828 commented 6 years ago

com.facebook.yoga.yogaNode.calculateLayout(float, float) on null object reference

marcorm commented 6 years ago

Did you find any solution?

ayehia commented 6 years ago

I have the same issue

dNitro commented 6 years ago

also here :-/

jainhitesh90 commented 6 years ago

any update? Same issue

emadhajjar commented 6 years ago

The same issue I have with specific file but for example this file it's working fine http://thenewcode.com/assets/images/thumbnails/homer-simpson.svg

Do I need some converter to SVF file?

marcorm commented 6 years ago

I don’t remember in detail what i’ve done. But cleaning up the svg code solves the problem.

mertkanu commented 6 years ago

After reading @marcorm comment, digged into the svg codes. If you remove unnecessary tags like

<title>DE87BE5B-186B-41B0-890C-160AE38146BD</title>
<desc>Created with sketchtool.</desc>
<defs></defs>

these, it'll work fine

Ethan-1997 commented 6 years ago

Same issue

fniwes commented 6 years ago

In my case, the error happens if there is a space or enter, or anything after the end of the start <svg> tag. Removing the extra newline was enough to avoid the red screen.

The image with error was: https://haveibeenpwned.com/Content/Images/PwnedLogos/EpicGames.svg

I fixed the issue with this particular image in the pull request #142 The image is not displayed because of a unrecognized tag, but at least the error is gone.