Crash on Android if source is an invalid URL
See original GitHub issueIf I pass as source
an object like this { uri: 'INVALID_URL' }
I get the following error on Android:
Error while updating property 'source' of a view managed by: FastImageView
null
Must not be null or empty
At the moment I am normalising the source using this (ugly) code to avoid the crash:
const normalisedSource = source && typeof source.uri === 'string' && !source.uri.split('https://')[1] ? null : source;
but I think it would be better if the library prevents it.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:15
Top Results From Across the Web
Startactivity(intent) handle invalid url - android - Stack Overflow
im getting some urls from firebase to download a pdf in a repository of my collage in a fragment , thats work fine,...
Read more >Chrome for Android Crashes when an intent is triggered from ...
Steps to reproduce the problem: 1. Basically the crash can be triggered by invoking a virtual method on a NULL object reference by...
Read more >Crashes - Android Developers
An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.
Read more >Game crashing when Android MediaPlayer fails to open URL
I am building for Gear VR (so, Android ETC2). At the beginning of my game, I have a MediaPlayer starting in auto, opening...
Read more >6390b37a3b32fc7583154d53fda...
Stop using invalid URL to prevent unexpected crash Verify the input PAC Uri ... Check if the URL is a valid URL to...
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 FreeTop 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
Top GitHub Comments
not all image start https, http ?? const normalisedSource = source && typeof source.uri === ‘string’ && !source.uri.split(‘http’)[1] ? null : source;
I think the library itself should take of this issue, on ios it works perfectly.