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.

Image not show on android, but still working on IOS

See original GitHub issue

Describe the bug When I show image with url, android device not showing but still show on IOS

              <FastImage
                    source={{uri: 'https://via.placeholder.com/150/810b14'}
                    style={style}
                    resizeMode={resizeMode}
                    onLoadStart={this.onLoadStart}
                    onLoadEnd={this.onLoadEnd}
                />

Dependency versions

  • React Native version: 0.62.2
  • React Native Fast Image version: 8.3.0

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:16
  • Comments:36 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
byeokimcommented, Jun 7, 2022

Hi dear @byeokim, what should I add to the header?

<FastImage
  source={{
    uri: 'https://picsum.photos/536/354',
    headers: {
      key: 'value', // <== what should I add here?
    },
  }}
/>

Regarding my comments above I meant

<FastImage
  source={{
    uri: ...,
  }}
  fallback={Platform.OS === 'android'}
/>
5reactions
milansusnjarcommented, Sep 2, 2020

It doesn’t work with v7.0.0 for me.

Glide fails, here is the log from my phone:

2020-09-02 21:22:26.679 16922-16922/com.blogl10n W/Glide: Load failed for https://via.placeholder.com/150/810b14 with size [600x600]
    class com.bumptech.glide.load.engine.GlideException: Failed to load resource
    There was 1 cause:
    com.bumptech.glide.load.HttpException(Gone)
     call GlideException#logRootCauses(String) for more detail
      Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE
    There was 1 cause:
    com.bumptech.glide.load.HttpException(Gone)
     call GlideException#logRootCauses(String) for more detail
        Cause (1 of 1): class com.bumptech.glide.load.HttpException: Gone
2020-09-02 21:22:26.680 16922-16922/com.blogl10n I/Glide: Root cause (1 of 1)
    com.bumptech.glide.load.HttpException: Gone
        at com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher.onResponse(OkHttpStreamFetcher.java:73)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
2020-09-02 21:22:26.693 16922-16922/com.blogl10n W/Glide: Load failed for https://via.placeholder.com/150/810b14 with size [-2147483648x-2147483648]
    class com.bumptech.glide.load.engine.GlideException: Failed to load resource
    There was 1 cause:
    com.bumptech.glide.load.HttpException(Gone)
     call GlideException#logRootCauses(String) for more detail
      Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE
    There was 1 cause:
    com.bumptech.glide.load.HttpException(Gone)
     call GlideException#logRootCauses(String) for more detail
        Cause (1 of 1): class com.bumptech.glide.load.HttpException: Gone
2020-09-02 21:22:26.695 16922-16922/com.blogl10n I/Glide: Root cause (1 of 1)
    com.bumptech.glide.load.HttpException: Gone
        at com.bumptech.glide.integration.okhttp3.OkHttpStreamFetcher.onResponse(OkHttpStreamFetcher.java:73)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

This is the code to reproduce

<FastImage
    style={{width: 200, height: 200}}
    source={{uri: 'https://via.placeholder.com/150/810b14'}}
    onError={(e) => { console.log('e', e); }}
    resizeMode={FastImage.resizeMode.contain}
/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix iPhone Not Receiving Pictures from Android 2022
How to Fix iPhone Not Receiving Pictures from Android ; You can go to Settings ; Force restart iPhone 8 and later with...
Read more >
Image not displaying on Android simulator and Android device ...
EDIT : I tried with different images and it seems to be working with some images, regardless of the extension of the image...
Read more >
<Image> from url showing on Android, but not iOS?
So in this chunk of code, it's displaying my news object correctly on Android. However on iOS, the image is not being displayed....
Read more >
Images not loading on iPhone? Here's how to fix it
In case the images still fail to load and display correctly, delete the app and install it again. This should fix the issue....
Read more >
Why Can't I See My Pictures in My Gallery? [Causes & Fixes]
Hit "Clear cache" or "Clear data" to delete unnecessary files and potentially fix the Android gallery not showing pictures. clear gallery cache ...
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