microsoft / microsoft/vscode-react-native

[Feature] Incorrect log message when Metro process termination fails

Open
#2,952 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement follow-up
Dominant language
TypeScript
Stars
2.7k
Forks
295
Avg merge
11h 17m
Merged PRs (30d)
24

Description

Description

When running Clean & Restart Packager, Metro process lookup and termination are handled in the same try/catch block on both Windows and Unix.

If taskkill or kill fails, for example due to insufficient permissions, the extension incorrectly logs:

No Metro process found on port ...

This hides the actual termination error.

Process lookup and termination should be handled separately:

  • If no process is found, skip termination normally.
  • If a process is found but termination fails, log a warning containing the PID and the original error.
  • Continue the cleanup and restart workflow after the warning.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Clean & Restart Packager command and inspect the Windows and Unix Metro process lookup and termination paths. Verify the lookup and termination errors are handled separately, warnings include the PID and original error, and cleanup and restart continue after a termination failure; run the existing project tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.