vscode-react-native icon indicating copy to clipboard operation
vscode-react-native copied to clipboard

Stop packager logs error

Open dlebu opened this issue 10 years ago • 4 comments

Steps to reproduce:

  1. Open RN project.
  2. Start packager from command palette.
  3. Stop package from command palette.

After stopping the packger, an error is logged: ######### Error while executing: react-native start --port 8081 [object Object] ##########

dlebu avatar Feb 16 '16 22:02 dlebu

I hit this as well

meenakb avatar Feb 16 '16 22:02 meenakb

I just tried this out and saw something else strange: When starting, I saw it print out the Executing command: react-native start --port 8081 line twice, and then after I stopped it a while later the extension threw an exception stating that it couldn't start the packager. This error was the one from awaitStart failing all its retries.

MSLaguana avatar Feb 16 '16 22:02 MSLaguana

The command executor for the packager doesn't actually ever finishes... The way we are killing it it's probably returning an error code, so CommandExecutor shows that error code. Is it possible to terminate the packager in a nicer way? So it'll exit with an 0 error code?

digeff avatar Feb 17 '16 16:02 digeff

The problem is actually with the previous "unfinished" promise for "react-native start --port 8081". So, when the second command for killing the started process is triggered, the unfinished promise is flushed and is causing an error to be printed. I have a fix for it.

meenakb avatar Feb 17 '16 17:02 meenakb