question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Crash, Error while updating property 'source' of a view managed by: FastImageView

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
anchalaroracommented, Jan 11, 2022

@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.

1reaction
anchalaroracommented, Dec 6, 2021

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; }

public Headers getHeaders() {
  if(mHeaders != null)
    return mHeaders;
  return null;
}

public GlideUrl getGlideUrl() {
  if(getUri().toString() != null && !getUri().toString().equals("")) {
    return new GlideUrl(getUri().toString(), getHeaders());
  }else {
    return new GlideUrl(Glide,getHeaders());
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while updating property 'source' of a view managed by ...
I really want to use FastImage on my every project but this source issue stays with me. Not only my own device, but...
Read more >
react-native-fast-image Error while updating property 'source ...
When running on Android, an exception will occur, but it is normal on iOS. com.facebook.react.bridge.JSApplicationIllegalArgumentException: ...
Read more >
React Native: error while updating property src of a view ...
If passing a single-element array as ImageSourcePropType , then the crash won't happen. So, specifically on Android, a multi-element array as ...
Read more >
react-native-fast-image - npm
React Native's Image component handles image caching like browsers for the most part. If the server is returning proper cache control headers ...
Read more >
Error On An Android Studio Project While Updating Property:
Error while updating property 'source' of a view managed by: FastImageView null Must not be null or empty. At the moment I am...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found