question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Random failure with error "Command failed: cmd.exe /q /c C:\Users\runneradmin\msvc-dev-cmd.bat"

See original GitHub issue

The action randomly fails with the following log, sometimes

2020-06-01T09:22:32.7166338Z     Merge branch 'github-actions' of https://github.com/BoostGSoC20/ublas into github-actions
2020-06-01T09:22:32.7445679Z ##[group]Run ilammy/msvc-dev-cmd@v1.2.0
2020-06-01T09:22:32.7445841Z with:
2020-06-01T09:22:32.7445928Z   toolset: 14.25
2020-06-01T09:22:32.7446020Z   arch: x64
2020-06-01T09:22:32.7446116Z ##[endgroup]
2020-06-01T09:22:40.4214652Z ##[error]Could not setup Developer Command Prompt: Command failed: cmd.exe /q /c C:\Users\runneradmin\msvc-dev-cmd.bat

Check this Job which failed: https://github.com/BoostGSoC20/ublas/runs/726808960?check_suite_focus=true

Check this job with the same configuration that passed: https://github.com/BoostGSoC20/ublas/runs/726808920?check_suite_focus=true

This failure is completely random. I looked into it and found that in the latest release this action still uses some script but after https://github.com/ilammy/msvc-dev-cmd/commit/5a6b51d5acdbbf4e2dc5bfab25a3a015aad5f793, this behaviour changed. Please look into it and if possible you could release a new version with this commit.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:19 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
ilammycommented, May 9, 2021

What if we set the value of those variables to empty?

Then they will be empty. A variable with “empty string” as a value. This is different from “not present in the environment”. How this is handled is up to the software that queries them. It might consider them missing, or it might fail with an “invalid value” error.

While I haven’t noticed any variables so far that could cause problems, the possibility still remains. I thought that it’s better to allow reconfiguration in some way over not allowing it at all. If it works in most cases and no one runs into issues – great. If this does not work for someone – I hope they’ll raise an issue and that specific issues can be addressed, rather then me trying to prevent a hypothetical situations proactively by applying random hacks. (I mean, if there was an obvious documented way to remove variables and if vsvarsall.bat did remove some variables after reconfiguration then I’d do that of course. But there isn’t and it doesn’t.)

1reaction
kwhatcommented, Jul 9, 2020

Seems to only fail after the second usage, order doesn’t appear to matter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Handling in a batch file - Windows CMD - SS64.com
How-to: Error Handling in a batch file. When an executable program runs and completes a task, it will return an Exit Code indicating...
Read more >
Windows 11 CMD error: [process exited with code 1]
I am dealing with an extremely frustrating error with the command prompt in Windows 11. Whenever I try to open cmd.exe or run...
Read more >
Unable to execute a .bat file in post build event command line
It seems like the syntax of the call is correct. Therefore I believe it's failing inside the batch file. I suggest putting the...
Read more >
NGT - The system cannot find the file specified. cmd.exe /c net ...
NGT fails to install if Powershell is not present in PATH environment ... file specified. cmd.exe /c net start "Nutanix Guest Agent"' error, ......
Read more >
Solved: CMD.exe Keeps Popping up in Windows 10 - EaseUS
This article will provide 3 effective methods and 2 reliable options here to help you fix Command Prompt pops up randomly error with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found