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

Changing bundler location with dev menu broken when changing port #25772

Closed
elicwhite opened this issue Jul 22, 2019 · 8 comments
Closed

Changing bundler location with dev menu broken when changing port #25772

elicwhite opened this issue Jul 22, 2019 · 8 comments
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@elicwhite
Copy link
Member

elicwhite commented Jul 22, 2019

When changing the port of the bundler by using the devmenu, ios tries to connect to an invalid URL.

This functionality was added in #21970 and never worked for changing ports.

When paused in the debugger, this is the url of metro that it is trying to connect to:

Screen Shot 2019-07-22 at 2 54 29 PM

Set with this:
Simulator Screen Shot - iPhone X - 2019-07-22 at 15 24 48

React Native version:

System:
    OS: macOS 10.14.5
    CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
    Memory: 1.46 GB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.7.0 - ~/.yarn/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
    Watchman: 4.9.4 - /opt/facebook/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28
      Build Tools: 23.0.1, 25.0.0, 25.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.0
      System Images: android-24 | Intel x86 Atom, android-24 | Google APIs Intel x86 Atom_64, android-25 | Google APIs Intel x86 Atom, android-25 | Google Play Intel x86 Atom
      Android NDK: 15.2.4203891
  IDEs:
    Android Studio: 3.3 AI-182.5107.16.33.5314842
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.4 => 0.60.4
@elicwhite elicwhite added the Bug label Jul 22, 2019
@elicwhite
Copy link
Member Author

@chubakueno, would you be able to help dig in and fix this?

@react-native-bot react-native-bot added the Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. label Jul 22, 2019
@dratwas
Copy link
Contributor

dratwas commented Jul 24, 2019

@TheSavior I tried it with and without remote debugger connected on fresh RN 0.60.4 project and it seems to work. I'm able to start 2 packagers on different ports and switch between them. However it never stops when i set the breakpoint in RCTReconnectingWebSocket.m:109

Do i need to do something to reproduce it?

@elicwhite
Copy link
Member Author

@dratwas, can you try rebasing on top of this PR? #25803 It should allow it to pause at the breakpoint.

@chubakueno
Copy link
Contributor

Hi @TheSavior , i cant reproduce the error you are describing. Just downloaded a fresh 0.60.4 and tested it both in emulator (using localhost) and in physical (using my computer private IP), both using remote debugging and not, both using hot reloading and not. May you please tell me which specific commit are you in?

@chubakueno
Copy link
Contributor

chubakueno commented Aug 11, 2019

Found a tiny(separate) issue during testing though: If you don't write the host, it correctly loads the js from the bundler but it fails to connect to the debugger if debugging is enabled (it searches for http://:8081, for example). I would prefer to debug the issue you refer to before landing this minor fix (master...chubakueno:master) on a pull request on master.

@elicwhite
Copy link
Member Author

elicwhite commented Aug 11, 2019

Thanks for investigating. I don’t think the PR I mentioned shipped in a release yet so I’d recommend making this one line change locally in order to be able to hit the breakpoint on the line I was able to. 4ab9da1

Hopefully that works! 🤞😀

@stale
Copy link

stale bot commented Nov 9, 2019

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 Nov 9, 2019
@stale
Copy link

stale bot commented Nov 16, 2019

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 Nov 16, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Nov 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

4 participants