Network failure after xcode 11.3 (11C29) update
See original GitHub issueSince upgrading to xcode 11.3 (11C29), my app is no longer able to connect to my local api.
React Native version: System: OS: macOS 10.15.2 CPU: (8) x64 Intel® Core™ i7-4980HQ CPU @ 2.80GHz Memory: 399.37 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.8.1 - /usr/local/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.12.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 23, 25, 26, 28 Build Tools: 22.0.1, 23.0.1, 23.0.3, 25.0.2, 26.0.1, 26.0.3, 28.0.1, 28.0.3 System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.1 AI-173.4819257 Xcode: 11.3/11C29 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-app-id: 0.0.5 react-native-git-upgrade: 0.2.7
Steps To Reproduce
use fetch to request from localhost. I’m using a vagrant box and a forwarded host name in /etc/hosts
that was working before the xcode update.
Describe what you expected to happen:
I expect the request to succeed, not Network request failed
my plist info:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>local.app.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
local.app.com, as I said, points to a vagrant box. Calling the api with Postman works and it was working in the simulator before the xcode update.
Is there some change the update brought it that I am unaware of?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top GitHub Comments
Ok, I’ve upgraded to 0.61.5. Still not working.
Turns out, for anyone else having this issue, that you need to have a localhost domain, so app.localhost if you must. You cannot have some arbitrary name like you could before.
This issue persist even in the latest version. Im using 0.61 and add required settings in info.plist. Still not working