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

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

Closed
cpojer opened this issue Apr 17, 2019 · 7 comments
Closed
Labels
bug Something isn't working platform: ios
Milestone

Comments

@cpojer
Copy link
Member

cpojer commented Apr 17, 2019


This issue was originally created by @FrikkieSnyman as facebook/react-native#24002.


💥 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
@FrikkieSnyman
Copy link

Any progress on this?

@thymikee
Copy link
Member

AFAIK nobody is currently working on this. The blocker for us internally was that we couldn't find a reliable way to test the start command locally after migration to monorepo. Thankfully we've recently found a way to do it, so if anybody is interested in investigating this, please use one of these commands:

# when @react-native-community/cli is `yarn link`ed
REACT_NATIVE_APP_ROOT=/path/to/react-native-cli yarn react-native start
# or when it's not
REACT_NATIVE_APP_ROOT=/path/to/react-native-cli node /path/to/react-native-cli/packages/cli/build start

The REACT_NATIVE_APP_ROOT flag lets Metro resolve local paths inside this directory.

@FrikkieSnyman would you like to give it a shot?

@tientruongvan1995
Copy link

yeah still getting this in RN 0.60.5. I updated from 0.58.5 and everything's corrupted :'(

@thymikee thymikee added bug Something isn't working and removed Type: Bug Report labels Sep 8, 2019
@MrLoh
Copy link

MrLoh commented Dec 16, 2019

Hi, I realize this is just an open source project. But this bug has been lying around since April, and its about a broken core functionality (debugging on an iOS device). It's also not something someone who is new to this repo can easily tackle with a PR. I am really surprised there hasn't been more traction on this issue, as I imagine every react native developer must run into it. @grabbou you had mentioned in April that you were looking into it. Is there any chance this issue will get tackled, or is there any known workaround. Or anything one ca do to help to get this fixed.

@Esemesek Esemesek added this to the 4.x milestone Mar 11, 2020
@grabbou
Copy link
Member

grabbou commented Mar 19, 2020

Unfortunately, I can't reproduce this issue anymore. Everything works fine on the latest React Native (0.61).

I tested by turning on Chrome Debugger, accessing it from both the localhost and my phone (via IP address).

I am going to close this issue for now and in case you are still experiencing this, please comment and I will reopen and look into why this is happening.

@grabbou grabbou closed this as completed Mar 19, 2020
@MrLoh
Copy link

MrLoh commented Mar 19, 2020

@grabbou I still cannot get it to work on 61.5 but maybe just what needs to be configured changed. What did you do to access the Bundler from your phone (Issue has always been to not be able to connect to the Metro Bundler, not the Chrome Debugger, though that of course doesn't work either). I am looking at the trouble shooting instructions here but there is no output containing xip.io. Probably the problem has to do with some change in macOS rather than RN.

@grabbou
Copy link
Member

grabbou commented Mar 20, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: ios
Projects
None yet
Development

No branches or pull requests

7 participants