Simulator could not connect to development server
See original GitHub issueI tried to change ip address that I could test on the device.
After changing lines in AppDelegate.m I did rebuild the application and restarted the server (npm start).
As you can see, the server is visible from the browser, everything works fine, but inside the app says that cannot connect to the server.
jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.1:8081/index.ios.bundle?platform=ios&dev=true"];
After restart project I see:
2016-07-01 13:12:07.949 PropertyFinder[10626:5440580] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
2016-07-01 13:12:09.964 [fatal][tid:main] 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
URL: http://192.168.1.1:8081/index.ios.bundle?platform=ios&dev=true
Screenshot:
I also tried open this ip in Safari Simulator:
node: v6.2.2 react-native-cli: 1.0.0 react-native: 0.28.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Could not connect to React Native development server on ...
40 Answers 40 · Make sure your laptop and your phone are on the same Wi-Fi network. · Open your React Native app...
Read more >Could not connect to development server #29587 - GitHub
Via the simulator it's working, but with my real device it's not. I have an iPhone XR with iOS 13.6. React Native version:...
Read more >Could not connect to development server : ReactNative
Could not connect to development server : ReactNative · Connection of multiple devices: Enter adb devices command your terminal to a check the...
Read more >could not connect to development server react-native stack ...
Could not connect to development server. Try the following to fix the issue : Ensure the packager server is running. Ensure your device/...
Read more >Running On Device - React Native
You can also connect to the development server over Wi-Fi. You'll first need to install the app on your device using a USB...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
try this: Edit Info.plist to allow transport security:
Here’s mine. You don’t need the goruck-staging.moduscreate.com line. 😉
Hi there! This issue is being closed because it has been inactive for a while.
But don’t worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/simulator-could-not-connect-to-development-server
Product Pains has been very useful in highlighting the top bugs and feature requests: https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix.