Could not find image named undefined.png
See original GitHub issueGetting many of these warnings. Images still show though. Don’t get this with Image
.
Could not find image named undefined.png
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Could Not Find Image File in React Native - Stack Overflow
So in the file it would be a list of requires like this export const imageName = require('./path/to/the/image/imageName.png');.
Read more >Images - React Native
The image name is resolved the same way JS modules are resolved. ... while check@3x.png will be used on an iPhone 7 Plus...
Read more >How to obtain a URI for an image asset in React Native (With ...
First, it's CommonJS and we're working on the browser-side of things, where it doesn't really belong, in the end you're using just a...
Read more >Error Message: There are errors below. Hover over each for ...
File name - If the image file name is longer than 80 characters, including the file extension, the image won't upload into the...
Read more >ImagePicker - Expo Documentation
The plugin allows you to configure various properties that cannot be set at ... When you run this example and pick an image,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah I’m seeing this issue as well and I think it’s because of this line: https://github.com/wcandillon/react-native-img-cache/blob/master/src/index.tsx#L101
I actually see
render()
getting called twice before the component finally has a value atthis.state.path
, so the built inImage
component is throwing this warning when it can’t loadundefined.png
. I have to think it’s just becauseRNFetchBlob.fs.exists()
is a Promise and it’s delaying anything until the next loop, which is going to miss that firstrender()
call?For what it’s worth, I don’t think the
style
prop has anything to do with this issue as mentioned above. All that does is allow RN to determine it doesn’t even need to attempt to load the image because it has no dimensions and won’t be displayed anyways, so the warning is never thrown.I’m not exactly sure what the right solution is here, but one idea is to allow for passing a placeholder image path that could be set as the initial value of
this.state.path
so that something is displayed while it pulls the image from cache or downloads the image.For those who are affected by the warning, you can disable that specific yellow box warning with
console.ignoredYellowBox = ['Could not find image']
somewhere near the entry point of your app. This will prevent the yellow box from being displayed, but you’ll still see the warnings in your debugging console.@kirkstrobeck I ran a couple of tests on IOS and couldn’t reproduce the issue. Is it possible that you experienced the issue on android? Please feel free to re-open if this is the case of if you have more information on how to reproduce the issue.