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

Broken image URL's break entire app (memory spikes and no error handling) #635

Open
klaaz0r opened this issue Feb 24, 2020 · 5 comments
Open
Labels

Comments

@klaaz0r
Copy link

klaaz0r commented Feb 24, 2020

Describe the bug
When using images from third party services sometimes the links are broken. This should not break the code/app. I see huge memory spikes (1gb+) when loading images that are broken. It is not possible to handle these broken images correctly. onError does not give a proper error and it is not possible to handle.

To Reproduce
Load images with status codes other than 200, so a 403, 404 any 500 range or an broken link that returns a string/text.

Expected behavior
onError should provide an error that can be handled inside the JS runtime.

Dependency versions

  • React Native version: 0.61.4
  • React version: 16.11.0
  • React Native Fast Image version: 7.0.2

For now I am using the fallback (so react natives Image component) but I would love to use fast-image because well when it works it is amazing!

@ahartzog
Copy link

ahartzog commented Mar 3, 2020

@klaaz0r can you explain how you're using Image as the fallback to prevent this behavior on broken/invalid URLs?

@nobodyabcd
Copy link

@klaaz0r can you explain how you're using Image as the fallback to prevent this behavior on broken/invalid URLs?

He means he didnt use fast-image because of this bug, he is using image

@klaaz0r
Copy link
Author

klaaz0r commented Mar 9, 2020

@ahartzog what @guanhuay says, I use the fallback for now to prevent crashes. What I noticed is that it sometimes crashes when the image is used twice in the same view in different sizes, this might has something todo with it.

@bradyim
Copy link

bradyim commented Apr 15, 2020

@klaaz0r do you know if this is fixed in version 8.x.x?

@efstathiosntonas
Copy link

I guess this should fix it but it would require fallback prop: (fix released on rn 0.63)

facebook/react-native@06b8b15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants