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.

"TypeError": "Network request failed"

See original GitHub issue

I got this error when importing local svg file using svgUri <SvgUri width=“100%” height=“100%” uri={require(‘…/…/assets/icons/logo.svg’)} />`

`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:12

github_iconTop GitHub Comments

4reactions
sanguineman91commented, Aug 17, 2021

The solution I found is make the Svg a React component instead of an image file

Can you describe how to solve it, thanks

1reaction
collinpricecommented, Jul 29, 2020

I’m getting “Network request failed” when I attempt to load a svg using a data uri on android. This works on iOS.

<SvgCssUri
    height={100}
    width={100}
    uri={
"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cpath%20fill%3D%22%2354b847%22%20d%3D%22M0%200h100v100H0z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M61.6%2069.1h-17V38.3h8.6v25.4h8.2c5.7%200%208.1-3.9%208.1-14.1S66.8%2036.4%2061%2036.4H42.2v32.7h-8.4V36.3H21.4v-5.4h42.3c10.2%200%2015%205.3%2015%2018.6-.1%2017.4-7.3%2019.6-17.1%2019.6%22%2F%3E%3C%2Fsvg%3E"
    }
/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native fetch() Network Request Failed - Stack Overflow
When I create a brand new project using react-native init (RN version 0.29.1) and put a fetch in the render method to the...
Read more >
HTTP Fetch fails with "TypeError: Network request ... - GitHub
There are 83 issues opened and unanswered about network requests failing with this generic error. The main causes of the pain are: Not...
Read more >
Improve "TypeError: Network request failed" error message
Network request failed, this error occurs usually when api call failed or you have some internet issue. In android emulator, sometimes this error...
Read more >
React Test TypeError: Network request failed - technote.fyi
If you get this error message during a test, it's because jest isn't making the network call. You need to make a mock...
Read more >
Network request failed! : Help & Support
Network request failed! Print · Make sure the resource that you are trying to use is accessible to the outside world. Try checking...
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