-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
JavaScript server doesn't terminate upon closing terminal #18015
Comments
Any update? |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
Upgraded to react-native version 0.53.3 and the problem still persists. |
Opened new issue |
Facing a similar problem, any updates? |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: Linux 4.13 (Ubuntu 17.10)
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0
Target Platform: android:minSdkVersion="16"
android:targetSdkVersion="23"
Steps to Reproduce
(On a linux machine)
Expected Behavior
There are no processes active on port 8081 and you can run "react-native run-android" any time in the future and it works.
Actual Behavior
The JS server is still running on port 8081. I do not understand why, but this creates a problem when running the app again. After starting the intent (usually the last thing in the terminal after running react-native run-andriod), it just stops automatically as seen in my terminal below:
Versus how I usually stop it as seen in my terminal below:
Reproducible Demo
https://github.com/BWillis98/test
I apologize that I know nothing about "snack", but I've uploaded the test repository I created when going through "Steps to reproduce". I don't think it's really necessary since all I did was run the command "react-native init test" and then push it to a github repository.
Workaround To Problem
Run the command "sudo lsof -i :8081", make note of the PID of the process where the column under "COMMAND" is titled "node", and then run the command "kill -9 [PID]" as demonstrated here:
However, I don't want to do this every time I want to load the app onto my phone and it took a lot of time to narrow down the issue to this and I'd like to save future developers the time of fixing this issue.
The text was updated successfully, but these errors were encountered: