question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression: Cannot connect to packager via IP or physical ios devices

See original GitHub issue

💥 Regression Report

Upgraded to RN 0.59.0, and tried to run my app on ios. When I tried to enable remote debugging, I got an error saying that the connection to http://localhost:8081/debugger-proxy?role=client timed out.

I followed the troubleshooting here: http://facebook.github.io/react-native/docs/running-on-device.html#troubleshooting, and confirmed that my local machine’s IP address is being detected correctly.

I then tried opening the debugger-ui on chrome by navigating to my local ip (ie 10.27.79.224:8081/debugger-ui) and it failed to connect. This definitely worked in RN 0.57 (from which I upgraded). Testing on RN 0.58.6, this also works.

Last working version

Worked up to version: 0.58.6

Stopped working in version: 0.59.0

To Reproduce

Install React Native version 0.59.0. Run npm start to start the packager. Obtain the local machine’s IP, and then navigate to the obtained IP:8081/debugger-ui. Connection should be refused, and debugging on a physical ios device is not possible.

Expected Behavior

I expect to be able to debug remotely from a physical ios device.

Code Example

n/a

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
      Memory: 432.55 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.15.0 - ~/.nvm/versions/node/v8.15.0/bin/node
      Yarn: 1.13.0 - ~/.nvm/versions/node/v8.15.0/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.15.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        Build Tools: 23.0.1, 27.0.3, 28.0.3
        API Levels: 23, 26, 27, 28
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5199772
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: 16.3.14 => 16.3.14 
      @types/react-native: 0.57.11 => 0.57.11 
      react: 16.8.4 => 16.8.4 
      react-native: 0.59.0 => 0.59.0 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
Zeldroxecommented, Mar 19, 2019

You just need to add a new line with your device ip into android/app/src/debug/res/xml/react_native_config.xml

Like this :

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
  <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="false">localhost</domain>
    <domain includeSubdomains="false">10.0.2.2</domain>
    <domain includeSubdomains="false">10.0.3.2</domain>
    <domain includeSubdomains="false">192.168.1.38</domain>
  </domain-config>
</network-security-config>`
2reactions
grabboucommented, Apr 16, 2019

Thanks for providing comments and reproductions here. Let’s make sure that this gets fixed in 0.59 / 0.60. I am going to put a todo on this issue and be back to it this week to see what’s going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not connect to React Native development server on ...
Package server is running and I can access it directly from browser on my mobile device. My Android device is connected to computer...
Read more >
Could not connect to development server : ReactNative
Via Wifi: you can find the android device IP address at Settings > Wi-Fi Settings > Advanced > IP address. Enter the following...
Read more >
QEMU - ArchWiki
If you cannot access the shared folder and the guest system is Windows 10 Enterprise or Education or Windows Server 2016, enable guest...
Read more >
Supplemental Document: BIG-IP 16.1.2 Fixes and Known Issues
Multiple BIG-IP devices configured in a sync-only device group, ... Trying to access the LX packages from GUI by navigating to iApps ->...
Read more >
Cisco SD-WAN Getting Started Guide - Cisco
Using this information, the Cisco vEdge router establishes a DTLS connection with Cisco vBond Orchestrator, and the two devices authenticate each other to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found