Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Image] No suitable image URL loader found for #3127

Closed
Mokto opened this issue Sep 29, 2015 · 11 comments
Closed

[Image] No suitable image URL loader found for #3127

Mokto opened this issue Sep 29, 2015 · 11 comments
Labels
JavaScript Resolution: Locked This issue was locked by the bot.

Comments

@Mokto
Copy link

Mokto commented Sep 29, 2015

Hi guys,

I'm stuck by an issue when updating to react-native@0.12.0-rc : "No suitable image URL loader found for".

This issue seems to be occurring when image uri is not correct (non existing images).

Thanks !

Please let me know if you need anything else.

@brentvatne
Copy link
Collaborator

@Mokto - iOS or Android?

@brentvatne brentvatne changed the title No suitable image URL loader found for [Image] No suitable image URL loader found for Sep 30, 2015
@Mokto
Copy link
Author

Mokto commented Sep 30, 2015

Sorry, i forgot to mention this.

IOS only !

Thanks.

@ide
Copy link
Contributor

ide commented Sep 30, 2015

Could you post a short snippet of your image JSX to show what code can cause this bug? Nonexistent image can mean a couple different things.

@Mokto
Copy link
Author

Mokto commented Sep 30, 2015

Sure !

<Image
        source={{uri: album.cover}}
/>

You have to know that sometimes album.cover is an empty string. In this case, the message "No suitable image URL loader found for" is occuring. (only in 0.12.0-rc, not in 0.11.0).

I will be more accurate next time.

@ide
Copy link
Contributor

ide commented Sep 30, 2015

Thanks for the detail!

@grabbou
Copy link
Contributor

grabbou commented Oct 1, 2015

Maybe a simple invariant would've been enough for this? @ide

@ide
Copy link
Contributor

ide commented Oct 1, 2015

I'd prefer a warning since the failure is obvious in a lot of cases (you don't see your image) and breaking the app is harsh for such a recoverable mistake. My current belief is that it should be hard to accidentally break RN at the JS level and hard to intentionally break it at the native level. That will require more work on our part but lead to better UX and DX with this forgiveness.

@grabbou
Copy link
Contributor

grabbou commented Oct 1, 2015

Yeah, sorry, meant warning but wrote invariant automatically.

@dralletje
Copy link
Contributor

What I did now is rendering a View with the same style whenever an empty uri is encountered, couldn't think of something better.

@ghost ghost closed this as completed in 95a4f44 Oct 5, 2015
MattFoley pushed a commit to skillz/react-native that referenced this issue Nov 9, 2015
Summary: fixes facebook#3127
Closes facebook#3185

Reviewed By: @​svcscm

Differential Revision: D2507588

Pulled By: @nicklockwood
@ToccaLeee
Copy link

@javache @ide react-native 0.14.2
No suitable image URL loader found for http://localhost:8081/assets/ReactNative/images/icon_arrow@2x.png?platform=ios&hash=c9eb04f153e31bb617334f96267a0f22. You may need to import the RCTNetworking library in order to load images

my code:
require('../../../images/icon_service_center.png')

I am pretty sure that the image icon_arrow@2x.png is in http://localhost:8081/assets/ReactNative/images/ directory and also have imported RCTNetworking library

Crash-- pushed a commit to Crash--/react-native that referenced this issue Dec 24, 2015
Summary: fixes facebook#3127
Closes facebook#3185

Reviewed By: @​svcscm

Differential Revision: D2507588

Pulled By: @nicklockwood
@Pabloicaza
Copy link

Pabloicaza commented Jun 28, 2017

I know this is old but for me adding 'http://' to localhost:3000/ image path solved the problem.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
JavaScript Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants