Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not connect to development server #28152

Closed
abdulbasit1248 opened this issue Feb 22, 2020 · 9 comments
Closed

Could not connect to development server #28152

abdulbasit1248 opened this issue Feb 22, 2020 · 9 comments
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@abdulbasit1248
Copy link

Description:
Could not connect to development server:
Ensure the following
-Node server is running & available on the same network -run npm start from react native root.
-Node server URL is correctly setup in app delegate
-wifi is enabled & connected to same network as node server

React Native version:
"react-native": "0.61.5",
"node": "10.14.1"

Steps To Reproduce

1.Running app using Xcode & using iphone X simulator
2.Not testing the app on any physical device
3.Changed the ports as well for the specific project.
4. But metro bundler not working

Expected Results

Metro bundler should connect and app should run

Snack, code example, screenshot, or link to a repository:

Screenshot 2020-02-21 at 10 06 02 PM

elp/mcve
@abdulbasit1248
Copy link
Author

I tried multiple solutions for the above issue.

  1. rm -rf node_modules/ && rm -rf yarn_lock/ && yarn install && cd ios && pod install
  2. checking out the specific process & cancel that thread/process by specifying the p_id
  3. nmp audit --fix

None of the above solution worked for me except this command
Screenshot 2020-02-22 at 1 25 16 PM

After all you have to do
yarn add react-native-gesture-handler react-native-reanimated react-native-screens

Close bundler & shift +cmd + k on xcode and run the app by cmd + R

@ardyfeb
Copy link

ardyfeb commented Mar 11, 2020

You can access the developer menu by shaking your device or by selecting "Shake Gesture" inside the Hardware menu in the iOS Simulator. You can also use the ⌘D keyboard shortcut when your app is running in the iOS Simulator, or ⌘M when running in an Android emulator on Mac OS and Ctrl+M on Windows and Linux. Alternatively for Android, you can run the command adb shell input keyevent 82 to open the dev menu (82 being the Menu key code).

After dev menu open, press Settings -> Debug server host & port for device fill with <your computer ip>:8081 then reload

@skaynetmen
Copy link

Description:
I have the same problem.
Could not connect to development server:

React Native version:
"react-native": "0.62.0"
node --version
v10.18.1
Xcode Version 11.4 (11E146)
Mac OS Catalina 10.15.3

Steps To Reproduce

  1. npx react-native init newProject
  2. cd newProject
  3. npx react-native start
  4. npx react-native run-ios

Expected Results
Metro bundler should connect and app should run

Snack, code example, screenshot, or link to a repository:
Screenshot 2020-03-29 at 20 53 22

sudo lsof -i :8081
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Google 901 skavenger 23u IPv6 0x1c2e5b32b49e681 0t0 TCP localhost:49841->localhost:sunproxyadmin (ESTABLISHED)
node 24899 skavenger 24u IPv6 0x1c2e5b32b4a29e1 0t0 TCP *:sunproxyadmin (LISTEN)
node 24899 skavenger 31u IPv6 0x1c2e5b32b49eca1 0t0 TCP localhost:sunproxyadmin->localhost:49836 (ESTABLISHED)
node 24899 skavenger 32u IPv6 0x1c2e5b32b4a1781 0t0 TCP localhost:sunproxyadmin->localhost:49837 (ESTABLISHED)
node 24899 skavenger 33u IPv6 0x1c2e5b32b49f8e1 0t0 TCP localhost:sunproxyadmin->localhost:49838 (ESTABLISHED)
node 24899 skavenger 39u IPv6 0x1c2e5b32b4a1161 0t0 TCP localhost:sunproxyadmin->localhost:49841 (ESTABLISHED)
newProjec 25153 skavenger 25u IPv4 0x1c2e5b321f07241 0t0 TCP localhost:49836->localhost:sunproxyadmin (ESTABLISHED)
newProjec 25153 skavenger 26u IPv4 0x1c2e5b321f07241 0t0 TCP localhost:49836->localhost:sunproxyadmin (ESTABLISHED)
newProjec 25153 skavenger 29u IPv4 0x1c2e5b3222604e9 0t0 TCP localhost:49837->localhost:sunproxyadmin (ESTABLISHED)
newProjec 25153 skavenger 30u IPv4 0x1c2e5b3222604e9 0t0 TCP localhost:49837->localhost:sunproxyadmin (ESTABLISHED)
newProjec 25153 skavenger 31u IPv4 0x1c2e5b321f4f879 0t0 TCP localhost:49838->localhost:sunproxyadmin (ESTABLISHED)
newProjec 25153 skavenger 32u IPv4 0x1c2e5b321f4f879 0t0 TCP localhost:49838->localhost:sunproxyadmin (ESTABLISHED)

@JBerendes
Copy link

JBerendes commented Jun 18, 2020

Having the exact same problem. Dead in the water atm. I can't build any React Native apps.

@JBerendes
Copy link

#28786 Might be the same issue

@JBerendes
Copy link

@skaynetmen @abdulbasit1248 did either of you ever get it working?

@JBerendes
Copy link

pending_forever

@stale
Copy link

stale bot commented Sep 20, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 20, 2020
@stale
Copy link

stale bot commented Oct 4, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Oct 4, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants