Open
Description
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
info Fetching system and libraries information...
System:
OS: macOS 15.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 483.07 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.4.1
path: ~/.nvm/versions/node/v22.4.1/bin/node
Yarn:
version: 1.22.21
path: /usr/local/bin/yarn
npm:
version: 10.8.1
path: ~/.nvm/versions/node/v22.4.1/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.14.3
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.4
- iOS 18.4
- macOS 15.4
- tvOS 18.4
- visionOS 2.4
- watchOS 11.4
Android SDK: Not Found
IDEs:
Android Studio: 2024.3 AI-243.24978.46.2431.13208083
Xcode:
version: 16.3/16E140
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.14
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: ^18.0.0
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.9
wanted: 0.76.9
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
[TypeError: Network request failed]
Reproducer
https://github.com/faustoct1/codes/blob/main/fetch-rn.js
Screenshots and Videos
No response