Could not connect to development server
See original GitHub issueHello there, i can’t understand why the MetroBundler it’s not working.
Description
As soon as i start the app, it throws me this error that won’t let me connect to my metro bundler. I checked everything, from the port 8081 status and i don’t understand why. 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:
System:
OS: macOS 10.15.5
CPU: (4) x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
Memory: 442.25 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.20.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 28, 29, 30
Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.0, 30.0.1
System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.0 => 0.62.0
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
I tried this steps
- yarn start --reset-cache
- yarn start
- cd ios && pod cache clean --all && pod deintegrate && rm Podfile.lock && pod install
- rebuild from Xcode and clean the build folder
- rm -rf node_modules and yarn to install the packages again
Expected Results
The app should connect to the MetroBundler.
Screenshot:
The ip you see in the image is the right one.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:24 (1 by maintainers)
Top Results From Across the Web
Could not connect to React Native development server on ...
Open the in-app Developer menu. shake your phone or press CMD/ctrl + M · Click on Settings · click on Debug server host...
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 >react-native root error - could not connect to development server
Experts, I was trying to use the native mobile quick start app. First I ran into the build errors, but after doing a...
Read more >Could not connect to development server on android emulator ...
Could not connect to development server on android emulator and on real device. Have the same problem only on real android device. Solution:....
Read more >Unable to load script/could not connect to dev server - Android ...
Please note that the Metro Bundler is in fact running on port 8081. (Opening http://127.0.0.1:8081/ with a browser (or curl) gives me: React ......
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
I did
brew uninstall watchman
and it resolved the issue, thanks @marcosdourado . I’m not quite sure why or how it resolved it. A mystery for another day.I was having similar issues, thought it must be cached versions so cleared everything
It works!