-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Crash on Android if source is an invalid URL #407
Comments
not all image start https, http ?? |
this is log.
|
@OrangeFlavoredColdCoffee Your answer works perfectly. Thank you very much! you saved me so much time ^^ |
so I need adjust every source ? It's so Unfriendly!!! |
You saved my day! |
not all images start with https or http. what about local images |
how i could use this function or variable ? |
i don't know where |
You don’t have to use it necessarily, but it prevents malformed url to
crash on Android devices. If you want to use it, just wrap your fast image
with your own custom component wrapper and apply the function to fast image
data source prop
…On Sat, 11 Apr 2020 at 16:15, alexdieudonne ***@***.***> wrote:
not all image start https, http ??
const normalisedSource = source && typeof source.uri === 'string' &&
!source.uri.split('http')[1] ? null : source;
not all images start with https or http. what about local images
i don't know where
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#407 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMMH5NHLBTK4X37HBYPB73RMCCSVANCNFSM4GX5PRSQ>
.
|
render() { function getUriImage(uri) { |
where do i have do make this change? |
Thanks you, my problem is solved using this |
Handler local image class ProgressiveImage extends React.Component {
} |
I think the library itself should take of this issue, on ios it works perfectly. |
🎉 This issue has been resolved in version 8.5.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
If I pass as
source
an object like this{ uri: 'INVALID_URL' }
I get the following error on Android:At the moment I am normalising the source using this (ugly) code to avoid the crash:
but I think it would be better if the library prevents it.
The text was updated successfully, but these errors were encountered: