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

RCTImageFromLocalAssetURL is loading image from web #16800

Closed
douglasjunior opened this issue Nov 12, 2017 · 12 comments
Closed

RCTImageFromLocalAssetURL is loading image from web #16800

douglasjunior opened this issue Nov 12, 2017 · 12 comments
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@douglasjunior
Copy link

douglasjunior commented Nov 12, 2017

Is this a bug report?

I dont know if this is a Bug.

The docs says that RCTImageFromLocalAssetURL loads only local images.

// Returns an UIImage for a local image asset. Returns nil if the URL
// does not correspond to a local asset.

But in recent version of RN, it is also loading image from web (https). I think that this is related to 998197f.

My question is, this is intentional? Because this breaks the docs and my previous logic.

Have you read the Contributing Guidelines?

Yes.

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 6.11.3
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: EAP AI-171.4429293 AI-171.4429293

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3

Steps to Reproduce

Call RCTImageFromLocalAssetURL with a web image URI.

Expected Behavior

Return nil if a non local image is provided.

Actual Behavior

It is loading image from the web.

@janicduplessis
Copy link
Contributor

cc @sahrens Since you reviewed this

@stale
Copy link

stale bot commented Feb 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 1, 2018
@douglasjunior
Copy link
Author

The problem still exists.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 1, 2018
@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to ContributeWhat to Expect from Maintainers

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon. labels Feb 24, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 24, 2018
@douglasjunior
Copy link
Author

The problem still exists.

@rodrigobdz
Copy link

@hramos could you reopen this issue? I can confirm that the issue is still happening in the latest React Native version v0.56.0.

But in recent version of RN, it is also loading image from web (https). I think that this is related to 998197f.

The link to the snippet loading an image from the web is still present in RCTUtils.m.

@hramos
Copy link
Contributor

hramos commented Jul 16, 2018

Reopening, it would be great to see a code snippet that reproduces this. I am aware there's already repro steps, but ideally an issue would contain a code snippet that can be easily dropped into a new project.

@hramos hramos reopened this Jul 16, 2018
@rodrigobdz
Copy link

Thanks. @douglasjunior Do you have a MCVE for this issue?

@stale
Copy link

stale bot commented Oct 15, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 15, 2018
@douglasjunior
Copy link
Author

Hello everyone, sorry for the delay. I found this problem while working in an image viewing library.

Here is the PR where I explain the problem: alwx/react-native-photo-view#122

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 15, 2018
@stale
Copy link

stale bot commented Jan 16, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 16, 2019
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 26, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@cpojer
Copy link
Contributor

cpojer commented Apr 2, 2019

This was an intentional change the documentation should be updated to reflect it.

@cpojer cpojer closed this as completed Apr 2, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Apr 2, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants
@cpojer @hramos @douglasjunior @janicduplessis @rodrigobdz @react-native-bot and others