-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image component does not load image from specific URI on iOS #29215
Comments
I'm seeing this issue too. Are you running IOS 14 beta? |
@ryanpag3 No, I'm running iOS 13.5 |
Can confirm. I have the same problem on iOS 13.5 and iOS 14. |
All images not loading for me on iOS 14 beta |
Same, uri or local images not working. I have Xcode 12, iOS 14. |
iOS 13.5.1 + XCode 11.5 works fine here, both dev and production builds of our apps. |
Yep, same here. It only started occurring recently, so I think it must be from some dependency RN pulls in. |
This is most likely coming from iOS SDK 14, which comes with XCode 12. Should probably stay away from XCode 12 for a few months for production builds. |
I disagree. Even using the release SDK and toolchain still causes this on my end. |
Hey @SConaway, could you post the output you're getting from executing |
@rdperottoni The issue is reproducible on the snack emulator linked in the original post. I highly doubt that is using pre-release SDKs. |
Sure thing. With the production XCode selected (images don't work):
With the beta XCode (images don't work):
Again, as @rmacqueen, @ryanpag3 and @DennisdeWitNL said, it occurs with the production XCode and iOS 13.x. In the example snack, however, my phone successfully loads the local and base64 images, but not the remote one. I'm able to access it in Chrome on my computer and iPhone Safari, so there's an issue there as well. Clearing my DerivedData seems to have resolved this issue on both SDK versions. Give that a shot. Sorry for the slow response time @rdperottoni, I am a dual-core i5 MBP that builds slowly. |
@SConaway What was your technique for clearing your DerivedData? I deleted my project folder @ |
|
How do we integrate this fix with React Native? Where does React Native keep the SDWebImage library? |
I'm also experiencing this issue, but only on iOS 14. Images are working/loading just fine on iOS 13.x, but as soon as the same app is put on iOS 14 images are not displaying (neither local or remote). |
That's odd. Building with the 13.5 SDK results in working images. Can anyone test building with the 14 SDK and using an iOS 13 (or before) iPhone? |
@SConaway I just switched over to iOS 14 SDK and am running on a 13.5 iPhone 11 Simulator:
When running in 13.5 simulator all images show as intended. You can see a video of it running in iOS 13.5 here. when running in 14.0 simulator with iOS 14.0 SDK none of the images display. You can see a video of that here. |
So, interesting discovery -- I rebuilt the application on another Mac that was using Catalina. Rebuilt with the most recent prod-ready Xcode version and the application built successfully and images are displaying (even in iOS 14.0). So it looks like iOS 14 itself isn't the issue. |
I built the app with iOS 13 SDK and even on iOS 14 the images show perfectly fine. I built the app on Big Sur. The problem either is Xcode 12 or iOS 14 SDK. |
That's what I'm thinking as well. Initially, I thought it was an iOS 14 issue, but that wouldn't have made sense anyway since other apps were loading images just fine. |
if I build an application Xcode 12 beta, images are NOT loading. I downloaded the application from the app store, images render as expected. |
The snack linked in original post does not work on iOS device running iOS 13.4.1 |
RN 0.62.2, iOS 13.5.1 and xcode 11.5 here, working perfectly. But I'm facing issues on local images, only on Android. |
@DennisdeWitNL use patch-package and my patch file (work with rn 0.63)
|
For those running older versions of React Native (e.g., 0.60.6) the patch is not possible since the |
If any one is still facing the problem here are stepwise solution which worked for me :-
|
@VisheshNucleusTeq the issue with editing a node_modules library directly is that after reinstalling with npm install for example, all of those edits are lost. This is a sure way to get very hard to find bugs later on. |
@Dror-Bar |
this worked like butter |
I am still not able to see any images with the iOs 14.2 update. I have implemented:
Is anyone else seeing these solutions not working for them? I am on: |
Finally fixed this by downgrading react-native from Also, remember to set a width and height on the image style as it could be loading but just not displaying properly - this threw me off for a bit during testing. |
Worked like a charm! |
@VisheshNucleusTeq thank you. It is really help me |
I using 0.63.4 and cli 2.0.1. |
I am using RN 0.61.5 and Xcode 11.1, I am still getting this issue, but only when I try to make a Release build. Adding the else to node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m only worked for Debug buids. |
I solved this by using |
Any dev want to https://infinitbility.com/image-not-showing-in-ios-14-react-native |
I'm having this issue with my app on an actual device with the release build (images from URI only). However, on the simulator it works perfectly fine. Would this fix also work for this scenario? Thanks |
URI (from cache or web) image won't load either on physical device ios 14.4 using:
|
That solved for me thank you |
I'm having the same issue. Works fine on simulator. When I release it to TestFlight, it does not show remote images. |
Very strange issue.
|
@AlphaJuliettOmega There needs to be a protocol prefixed to the URI. Try Otherwise it looks like a file path. |
Hi everyone, face this issue today, Xcode 12, and iOS 14.3, tried the patch. without success, So in the end of the url, that was using 'http', I replaced for 'https' and it worked: .replace('http','https') In my case my urls are http. |
I might be in the wrong place, but I am using my android device and when I try to view the screen in my browser I can see the login screen with image file fine, but when I scan the qr code to my phone, the console is telling me that the image file does not exist. I am wondering if this is similar to this issues. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
The
Image
component does not render an image on iOS when loaded from a specific URIReact Native version:
System:
OS: macOS 10.15.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 234.47 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.20.0 - ~/.nvm/versions/node/v10.20.0/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v10.20.0/bin/npm
Watchman: Not Found
SDKs:
iOS SDK:
Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
Languages:
Java: 14.0.1 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.9.0 => 16.9.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
See code snippet below
Expected Results
I would expect the code below to render an image on screen. It does do that on Android, but not on iOS. If i go to that link in a browser or
curl
it from the terminal it renders or downloads as expected. But React Native on iOS does not render it.Snack, code example, screenshot, or link to a repository:
See example here: https://snack.expo.io/QH4nUBfc6
The text was updated successfully, but these errors were encountered: