react-native-fast-image: [Android] Crash, Error while updating property 'source' of a view managed by: FastImageView
Describe the bug There is an app crash reported by Crashlytics on a device running Android 4.4.4 (Samsung, Galaxy Core Prime)
FastImageViewManager.java line 111
com.dylanvann.fastimage.FastImageViewManager.setSrc
Caused by java.lang.ClassCastException
androidx.appcompat.widget.TintContextWrapper cannot be cast to e.g.x0.t0.d0
To Reproduce I cannot reproduce this, but hopefully the log provided by Crashlytics would shred some light on this.
Expected behavior Should not crash.
Screenshots

Dependency versions
- React Native version: 0.62.3
- React version: 16.11.0
- React Native Fast Image version: 8.5.11
Note: if these are not the latest versions of each I recommend updating as extra effort will not be taken to be backwards compatible, and updating might resolving your issue.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15
@fdobre : Hey , I have raised the PR for this issue by forking the repo 29 days back. https://github.com/DylanVann/react-native-fast-image/pull/851/commits/1cfae0c695e1a3e974ea24986083447877b8f41b It’s still pending to be merged.
I am facing the same issue: I have fixed it by applying a null check in the FastImageSource.java file. This issue is happening because Glide lib doesn’t allow null or empty string to be passed to GlideUrl object, So it’s crashing.
Please anyone suggest if this approach is fine and a PR can be raised.
Solution: @Override public Uri getUri() { if(mUri != null && !mUri.equals(“”)) return mUri; return null; }
@ilenin, thanks for pinging me, I have done some more research and found this thread. So I have updated my code in the PR!
Yes, please see my “patches/react-native-fast-image+8.5.11.patch” below, @dcboy.