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

A fallback for when tree-kill fails #2448

Open
sagar2427 opened this issue Sep 1, 2020 · 14 comments
Open

A fallback for when tree-kill fails #2448

sagar2427 opened this issue Sep 1, 2020 · 14 comments
Labels
🐛 Bug Something isn't working 👶 Good first issue Good for newcomers

Comments

@sagar2427
Copy link

i down loaded example code from stryker.io , and i am start doing steps given ,to get the reports but whenever i am doing npm run stryker , i am getting error like above

@nicojs
Copy link
Member

nicojs commented Sep 1, 2020

Ah yes. Couple of work arounds:

  1. Install git and run git init in D:\robobar-example-master.
  2. Install git and create a fresh clone: git clone https://github.com/stryker-mutator/robobar-example.git and use that instead.
  3. Configure files inside the stryker.conf.json. You can use "files": ["**/*", "!node_modules/**/*"]

@sagar2427
Copy link
Author

sagar2427 commented Sep 1, 2020

hey @nicojs thanks for reply ,

based on your reply , i did same thing but still i am facing some issues related to my process id , PFB information for same thing

is this my system related issue or need to do any thing ?

but i killed all the process but still i am facing issue,

ERROR StrykerCli an error occurred { Error: Command failed: taskkill /pid 14880 /T /F
'taskkill' is not recognized as an internal or external command,
operable program or batch file.

at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

killed: false,
code: 1,
signal: null,
cmd: 'taskkill /pid 14880 /T /F' }

@nicojs
Copy link
Member

nicojs commented Sep 1, 2020

Did you install the dependencies?

npm install

@nicojs
Copy link
Member

nicojs commented Sep 1, 2020

Ah, could you try to run taskkill /?, does that print the help for the taskkill command?

@sagar2427
Copy link
Author

sagar2427 commented Sep 1, 2020

yup,
i did npm install for dependencies and i killed all the PIDs available in the task manager.
even i installed stryker global npm install -g stryker-cli

but still i am getting same issue :(

an error occurred { Error: Command failed: taskkill /pid 11856 /T /F
'taskkill' is not recognized as an internal or external command,
operable program or batch file.

at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

killed: false,
code: 1,
signal: null,
cmd: 'taskkill /pid 11856 /T /F' }

@nicojs
Copy link
Member

nicojs commented Sep 1, 2020

Hmm ok, so you are running on windows, yet taskkill isn't available. Could you verify this by running taskkill /??

Could you please provide more information about your system. What windows version are you running?

Taskkill should be installed on almost every windows version: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/taskkill

@sagar2427
Copy link
Author

when ever i am running taskkill command its showing like

D:\robobar-example-master>taskkill
'taskkill' is not recognized as an internal or external command,
operable program or batch file.

D:\robobar-example-master>taskkill /?
'taskkill' is not recognized as an internal or external command,
operable program or batch file.

windows version -- windows 10 pro
64 bit OS, x65-based process

@nicojs
Copy link
Member

nicojs commented Sep 1, 2020

For me, taskkill.exe lives in C:\windows\system32. Could you try to have a look there? If it's there, you might need to add C:\windows\system32 to your PATH environment.

@nicojs
Copy link
Member

nicojs commented Sep 1, 2020

I've also opened pkrumins/node-tree-kill#34

@sagar2427
Copy link
Author

sagar2427 commented Sep 4, 2020

Thanks @nicojs , after adding PATH environment , now able to run with out errors and i am getting coverage report also.

@nicojs nicojs changed the title { Error: Cannot determine input files. Either specify a files array in your stryker configuration, or make sure "D:\robobar-example-master" is located inside a git repository. Inner error: Error: Command failed: git ls-files --others --exclude-standard --cached --exclude /.stryker-tmp/* fatal: not a git repository (or any of the parent directories): .git A fallback for when tree-kill fails Sep 4, 2020
@nicojs
Copy link
Member

nicojs commented Sep 4, 2020

Great! I've renamed the issue, we should implement a fallback for when tree-kill fails (maybe just use process.kill?).

@nicojs nicojs added 🐛 Bug Something isn't working 👶 Good first issue Good for newcomers labels Sep 4, 2020
@stale
Copy link

stale bot commented Sep 4, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the ☠ stale Marked as stale by the stale bot, will be removed after a certain time. label Sep 4, 2021
@stale stale bot closed this as completed Oct 4, 2021
@nicojs
Copy link
Member

nicojs commented Nov 13, 2023

See #4577 for an example where a linux pipeline fails because of tree-kill. I think we should implement a fallback to normal childProcess.kill when tree-kill fails.

@nicojs nicojs reopened this Nov 13, 2023
@nicojs nicojs removed the ☠ stale Marked as stale by the stale bot, will be removed after a certain time. label Nov 13, 2023
@BBoehm
Copy link

BBoehm commented Jan 27, 2024

Hi @nicojs,

I got the same error.

I already added C:\windows\system32 to my PATH variable and can use taskkill /?:

> taskkill /?

TASKKILL [/S System [/U Benutzername [/P [Kennwort]]]]
         { [/FI Filter] [/PID Prozess-ID | /IM Abbildname] } [/T] [/F]

...

However, now I run into another Error, which might be related?

Mutation testing  [                                                  ] 0% (elapsed: <1m, remaining: n/a) 5446/6838 Mutants tested (0 survived, 0 timed out)node:internal/errors:865
              ^

FEHLER: Nicht gefunden

    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'taskkill /pid 1724 /T /F'
}

From the debug output it seems, this is the CheckerWorker he tries to kill

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 👶 Good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants