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

[iOS][Improvement] RCTWebSocketExecutor method could guess the devtools host via the ip.txt file #15943

Closed
yuriy-yarosh opened this issue Sep 14, 2017 · 4 comments
Labels
Help Wanted :octocat: Issues ideal for external contributors. Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@yuriy-yarosh
Copy link

yuriy-yarosh commented Sep 14, 2017

Is this a bug report?

Yes (Mostly)

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v: 0.48.3
  2. node -v: v8.4.0
  3. npm -v: 5.3.0
  4. yarn --version: 0.23.4
  • Target Platform: iOS11
  • Development Operating System: macOS 10.12.6 (16G29)
  • Build tools: XCode 9 beta

Steps to Reproduce

  1. Want to automate the RCTWebSocketExecutor react-devtools host detection.
  2. sed -i '' it all the way... Anyways, I'm using ngrok, so, it's a bit bothersome.
  3. Well, if RCTBundleURLProvider already has guessPackagerHost method which uses ip.txt file in the main bundle, we could use that to pass the hostname for the RCTWebSocketExecutor.

Expected Behavior

Less regex's and manual RCTWebSocketExecutor patching.

Actual Behavior

Official documentation states explicitly to patch the RCTWebSocketExecutor.m file which isn't a great way of handling such things.

@yuriy-yarosh yuriy-yarosh changed the title [Improvement] RCTWebSocketExecutor method could guess the devtools host via the ip.txt file [iOS][Improvement] RCTWebSocketExecutor method could guess the devtools host via the ip.txt file Sep 14, 2017
@radko93
Copy link
Contributor

radko93 commented Sep 14, 2017

@facebook-github-bot bugfix

@facebook-github-bot
Copy link
Contributor

Hey @yuriy-yarosh, if you're sure this is a bug, can you send a pull request with a fix?

@facebook-github-bot facebook-github-bot added Help Wanted :octocat: Issues ideal for external contributors. Ran Commands One of our bots successfully processed a command. labels Sep 14, 2017
@yuriy-yarosh
Copy link
Author

yuriy-yarosh commented Sep 19, 2017

I've fixed it myself, will be making a PR today after looking into the Android counterpart.
Made some amends to docs.

@stale
Copy link

stale bot commented Nov 18, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. 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 18, 2017
@stale stale bot closed this as completed Nov 25, 2017
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted :octocat: Issues ideal for external contributors. Ran Commands One of our bots successfully processed a command. 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

3 participants