iOS: Could not connect to development server.
See original GitHub issuename: iOS – Could not connect to development server. about: Something is not working as expected.
- I have reviewed the documentation
- I have searched existing issues
- I am using the latest React Native version
After I upgrade the node version(brew upgrade) and delete the old version(brew cleanup), my project can not run.When I create a new project again, it does not still work ,The error is the same。 The error:
2018-05-29 11:56:56.492993+0800 WFNowRupiah[53558:479116] Task <8C75D585-C49B-43A7-9660-CCA1575E61BB>.<1> finished with error - code: -1001 2018-05-29 11:56:56.556 [error][tid:NSOperationQueue 0x604000222120 (QOS: UNSPECIFIED)][RCTCxxBridge.mm:420] Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(Could not connect to development server. Ensure the following:
- Node server is running and available on the same network - run ‘npm start’ from react-native root
- Node server URL is correctly set in AppDelegate
- WiFi is enabled and connected to the same network as the Node Server
URL: http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false The operation couldn’t be completed. (NSURLErrorDomain error -999.))
Environment
Environment: OS: macOS High Sierra 10.13.4 Node: 10.2.1 Yarn: 1.7.0 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.3.1 Build version 9E501 Android Studio: Not Found
Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 => 0.55.4
Steps to Reproduce
Xcode / react-native run-ios
Expected Behavior
Hope it works!
Actual Behavior
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Please use Stack Overflow for this type of question.
Try changing “localhost” (in http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) to your IP address. Type into terminal ifconfig and under en0 you will find your ipaddress next to inet (and before netmask).