-
Notifications
You must be signed in to change notification settings - Fork 78
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
spawn EPERM error on Windows if user does not have powershell access #2768
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
This has been reported in the past. Unfortunately, that's not code we own. It's the There might be something in that issue thread to workaround it or somehow use cmd.exe instead. Getting powershell access is the quickest way forward though. |
The CLI currently uses open v9.1.0 and v10.1.0 was just released, and it looks like it addresses this. If you want to try it out temporarily, you could modify that file you mentioned so that line 172 looks like this:
|
This issue has been linked to a new work item: W-15235605 |
The library will be updated in the next CLI release candidate being promoted tomorrow, but I don't think this will solve the problem for you. The best solution is to get access to powershell. |
Thanks Shetzel! Certainly appreciate you looking into this one. I've requested Powershell access for the device in question - so that will likely fix the issue. If I get time I'll look into whether there is anyway for me to identify if powershell access is available and submit a fix to the open library on github. |
Hi Team, Greetings! Can anyone confirm whether we can try downgrading to v7.10.1 since this version is available on the node's official site which includes npm of 4.2.0. We are not able to find the exact version of node v7.1.0. As one of my customers is from the banking sector, so according to RBI guidelines they are restricted from accessing the PowerShell. So they can't give access to the PowerShell due to company policies. On a similar issue: sindresorhus/open#205 shared it shows one of the users has tried "downgrading to v7.1.0, and it works without giving access to PowerShell". Thank You! |
@Saipraneeth-hub that comment referst to v7.10.1 of the sfdx is deprecated and installing a 4y old version will probably not work as expected and/or even might include vulnerable dependencies. |
Summary
When attempting to authorise and org on a machine that does not have Powershell access receive a spawn EPERM(1) error.
Steps To Reproduce
Attempt the command 'sf org login web' (you do not even need any further parameters) on a machine that does not have permission to run powershell, and the error spawn EPERM(1) is received.
Expected result
Web browser should open and allow an org to be authorised.
Actual result
spawn EPERM (1) error message
System Information
cmd.exe
Additional information
Error seems to be in the @salesforce/plugin-auth/node_modules/open/index.js file, lines 171,172,173, where the command is set to powershell without checking if powershell is accessible by the user. This appears to be the cause of the issue. Unsure whether there is an option to set this to CMD if powershell is blocked?
The text was updated successfully, but these errors were encountered: