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

Trying to deploy and getting "ended with error spawn C:\WINDOWS\system32\cmd.exe ENOENT" #737

Closed
taalgaard opened this issue Nov 9, 2018 · 17 comments
Labels

Comments

@taalgaard
Copy link

Trying to deploy and getting "ended with error spawn C:\WINDOWS\system32\cmd.exe ENOENT"

Started occurring yesterday after the new update.

I am on Windows 10

Originally posted by @skygiven in #734 (comment)

@ericrsmith35
Copy link

I am having this same issue on Windows 10

@ntotten
Copy link
Contributor

ntotten commented Nov 9, 2018

Can you provide more information on how HOW you are deploying? Are you right-clicking a folder, is it deploying to a scatch org or sandbox? Are you using a package.xml file? Exact repro steps will be helpful.

Thanks!

@ntotten
Copy link
Contributor

ntotten commented Nov 9, 2018

Moving comment from other issue:

I am getting same issue as skygiven and taalgaard and ericrsmith35.

When I right click an Apex class , when I select "SFDX: Deploy Source to Org", I get:

C:\WINDOWS\system32\cmd.exe ENOENT

however if I select "SFDX: Retrieve Source from Org", it completes successfully

If I copy the sfdx force:source:deploy --sourcepath command from the output into the terminal, it completes successfully.

In other words I am able to successfully push the code to my sandbox from VS Code from the CLI, however when running the command directly from VS Code using the "SFDX: Deploy Source to Org", it fails and says that the path to my cmd.exe does not exist.

@taalgaard
Copy link
Author

taalgaard commented Nov 9, 2018

Exact same scenario and test results as ntotten. Wednesday it worked fine. Now I cannot right click and deploy the file. I can retrieve files by right clicking. I did notice that there was an extension upgrade yesterday. Wonder if that had anything to do with it?

I also did a new install on Windows 8 computer to see if it was just an issue with my Windows 10 system and am receiving the same error when trying to deploy a file.

For those who are also experiencing the issue was it working for you before yesterdays update?

@matthewjcavalier
Copy link

I am experiencing the same issue, and I am pretty sure that the deploy source to org was working yesterday.

@arodriguez-cvent
Copy link

My first attempts to deploy from VS Code were made yesterday 8 PM EST and I was getting this same error from the start.

@lcampos
Copy link
Contributor

lcampos commented Nov 9, 2018

Hi, sorry for the problems you're experiencing. We're currently working on a fix and will release it as soon as possible. We'll keep this thread up to date.

@protivakid
Copy link

Same issue on Windows 7. I wasted my time trying to debug. Is there someplace that lists issues so I don't spend my time thinking it was just my machine. Guess i'll have to check here

@ntotten
Copy link
Contributor

ntotten commented Nov 9, 2018

@protivakid This is the place that lists issues.

We will have the fix released soon. Apologies for the problems.

@lcampos
Copy link
Contributor

lcampos commented Nov 9, 2018

We have a fix for this now, it's currently going through our test/release pipeline and should be available soon in the marketplace.

@lcampos
Copy link
Contributor

lcampos commented Nov 9, 2018

The fix is out now in the marketplace as part of version 44.6.1. Again, apologies to everyone impacted and thanks for your patience.

@arodriguez-cvent
Copy link

Thanks @lcampos ... both the deploy and retrieve commands are working from VS Code for me now

@Tanisha123
Copy link

getting same error on authorizing the org. Please help

@Vru70
Copy link

Vru70 commented Jul 18, 2021

If you still got the same error, you can Goto > Control Panel\System and Security\System\Advance system setting\Enviroment variable and set system variables path C:\Windows\System32\ variable and restart your System. It will fix this error, and you will be able to Authorize an Org.

@Vru70
Copy link

Vru70 commented Jul 18, 2021

Also verify the following
Please try and kill the taks running parallel in the task manager, relaunch cmd/visual studio and try again (If you see any node.exe file, kill it)
Once we create the SFDX project , there will be an attribute called: oauth local port - please update it with any combination 4 digit number and retry.
{
"packageDirectories": [
{
"path": "force-app",
"default": true
}
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"oauthLocalPort": "7717",
"sourceApiVersion": "45.0"
}

@generalmad
Copy link

@Vru70

I'm having the same problem. Just downloaded and updated yesterday. Followed your advice on changing the system32 path, but it still won't let update the organization. I'm working off of trailhead. I am unfamiliar with what you mean by

(If you see any node.exe file, kill it)

Also, I don't see the OAuth Local Port anywhere in the workspace.

Once we create the SFDX project , there will be an attribute called: oauth local port - please update it with any combination 4 digit number and retry.

Please send help.

@mohanraj-r
Copy link
Contributor

@generalmad This issue should be fixed now. Can you please check with the latest version of the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests