Certain URLs wont load. Error is null.
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
I'm having the exact same issue as #741. Exception is null and I have no idea why some of my images wont load. The URLs passed into Glide seem fine.
```java
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
final Location location = mLocations.get(position);
if (location.hasImage()) {
String imageUrl = NetworkHelper.getImageUrl(getContext(),location.getImageName());
holder.image.setVisibility(View.VISIBLE);
// Use Glide for image loading
Glide.with(getContext())
.load(imageUrl)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.centerCrop()
.into(new GlideDrawableImageViewTarget(holder.image) {
@Override
public void onLoadFailed(Exception e, Drawable errorDrawable) {
super.onLoadFailed(e, errorDrawable);
e.printStackTrace();
}
@Override
public void onResourceReady(GlideDrawable resource, GlideAnimation animation) {
super.onResourceReady(resource, animation);
}
});
} else {
// Due to the nature of the RecyclerView, we need to ensure we clear
// out images to odd behavior.
Glide.clear(holder.image);
holder.image.setVisibility(View.GONE);
}
}
```
I've tried hardcoding one of the URLs that fails and it fails consistently so there must be something about those specific images Glide doesnt like though I cant quite see why. I can download them manually just fine.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.