-
Notifications
You must be signed in to change notification settings - Fork 24.6k
fetch [TypeError: Network request failed] on iOS 18.4 #50510
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
Comments
@faustoct1 Can you also try once on latest react-native version: |
Same error on ios 18.4:
|
Also experiencing this issue! I'm getting errors from |
Running into this too with Expo using the The only way i've found to "get around" this via the iOS simulator is to hit Restarting the app with |
Hi, I'm running in a deadline I can't upgrade it for now. I'll do it as soon as I get free time. If there's a patch I can try, since it's just run a command meanwhile I'm using rn+expo, it's quite painful to upgrade, and make sure everything is working fine ! I tested on my published app and it's working, it seems to be a problem on simulator. |
I had the same problem with auth. I did exactly this and it worked! I tested on my published app and it's working on a real device, the problem only happened on simulator for me. I reported this issue here since I faced it first before the fetch issue react-native-google-signin/google-signin#1419 |
I can confirm that it works fine on an iOS 18.4 physical device, but there is an error when using the iOS 18.4 simulator. I erased the 18.4 simulator, rebuilt and installed my app; it worked for about 5 minutes, and then the same problem returned. I went back to the 18.3 simulator, and all is good. Running React Native 0.77.2 |
I kept iOS 18.4 due it's not happening on physical device. Those are the related issues I found on 18.4 ios simulator beside the fetch.. RevenueCat/purchases-ios#4954 They can somehow be related, all of them seem to happen over the network. |
Same for me. Was also able to reproduce it on physical ios devices Steps to reproduce:
The request fails with a network error, despite the network being available (confirmed by successfully making a request using axios) Error code:
Additional Notes: |
Same problem for us. We have this in revenue cat (react-native-purchases) and firebase (react-native-firebase) also sometimes acts up. |
This is an issue that affects iOS 18.4 simulators only. Check this thread for more info. |
I had the same problem, but for a website running through Cloudflare - React Native app does requests to it. I temporarily disabled HTTP 3 there and everything worked. Not the best way, but there are too many problems with HTTP 3, as everyone has their own implementation of the protocol. I'll wait for a fix from Apple for 18.4 at least. Rolling back to old xcode to use old simulators is much longer and will only hinder development if working on multiple projects. |
I have the same issue. When I build the new app by uninstalling and reinstalling it, it works fine. However, after reloading, the network stops working. |
Same here |
same here using |
Have same issue on 18.3 and 18.4 simulators and one real device (18.3). This issue appears periodically and resolves automatically. On last week I faced with this issue on real device on application version from App Store |
I have this issue on: IOS simulator version 18.3
React Native: 0.74.1
Expo: "^51.0.5" android emulator works fine. |
Same issue here. I was also able to reproduce it on a real device and emulator. Axios requests work, but fetch does not.
|
"expo": "^52.0.46", Same here, it happens after a few refreshes. Tried with node 18, node 20.18 and node 20.19. Safari wont open the page because the network connectin was lost. This may be an IOS 18.4 simulator issue or Xcode 16.3 issue. Either way you cant install an older IOS simulator if you have Xcode 16 installed... I may wait for a fix or downgrade to Xcode 17.5 |
yes I had to downgrade Xcode to 16.2 and use a simulator with iOS 18.3 |
My observations on the problem: Simulator: iOS 18.4 (Xcode 16.3, macOS 15.4) url's: In the application, a network error occurs when executing the fetch function. There is no problem when opening the same link in Simulator's Safari browser. |
Xcode 16.3 and iOS 18.3 sim is a working combo for me. As already pointed out, this is most likely an issue with 18.4 sim. |
Came back to give my feedback and indeed I downgraded to IOS18.3 with Xcode 16.3 and the network error is gone. No need to downgrade Xcode, only the IOS for the simulator. I use the iPhone 15 Pro with IOS 18.3 and Xcode 16.3 and no error so far. The problem seems to be the IOS 18.4 |
same issue fixed by downgrading to iOS 18.3 on sim. |
No need to downgrade Xcode folks, just download iOS Sim 18.3.1 using Xcode. |
I can attest, this is a IOS 18.4 simulator issue, im also having issues with authentication using firebase and i just keep getting unknown network errors. Downgrading to 18.2 works fine. Need to test on real device but assuming itll be okay. |
same |
Hitting the same problems - network errors when app runs in Simulator with iOS 18.4. |
Description
fetch() was working on 18.2 and older but in the new 18.4 ios is not working it gives the error
[TypeError: Network request failed]
I ran the same code on both simulators and the desirable result didn't work as expected. It happened to me in specific apis like google maps, I tried wikipedia api, it worked! I tested with axios/fetch.
Steps to reproduce
just call google maps fetch(
https://maps.googleapis.com/maps/api/place/autocomplete/json?sessiontoken=${sessionToken}&input=${text.replace(/\s+/g,"+")}&key=${this.API_KEY}&limit=10${t}&language=en
) it works on ios 18.2 but fails on 18.4. it fails specifically for google maps but works to other endpoints.React Native Version
0.76.9
Affected Platforms
Runtime - iOS
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://github.com/faustoct1/codes/blob/main/fetch-rn.js
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: