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

"The parameter is incorrect" when launching URLs on Windows 10 Insider Preview (17677.rs_prerelease.180520-0940) #95

Closed
keyz182 opened this issue May 30, 2018 · 4 comments

Comments

@keyz182
Copy link

keyz182 commented May 30, 2018

Steps to recreate:

  • Be on the Windows 10 insider preview
  • Have node 10.3 installed.
  • Create files described below
  • Run node test.js

package.json:

{
  "name": "test",
  "version": "0.0.1",
  "dependencies": {
    "opn": "5.3.0"
  }
}

test.js:

const opn = require('opn');
opn('https://google.com').catch((e)=>{
    console.error(e);
});

Expected - Google opens in the browser set as default
Actual result - Error message "The parameter is incorrect", with the following output from the console:

Error: Exited with code 1
    at ChildProcess.cp.once.code (C:\Users\keyz\Code\untitled\node_modules\opn\index.js:84:13)
    at Object.onceWrapper (events.js:273:13)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Socket.stream.socket.on (internal/child_process.js:380:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close [as _onclose] (net.js:596:12)

I'm currently setting up a VM to test on the latest non insider preview of Win10, then on the insider preview in a clean environment to ensure it's not an issue with my setup.

@keyz182
Copy link
Author

keyz182 commented May 30, 2018

I've confirmed that on a non insider preview of Windows 10, all is fine.

On a clean Windows 10 install, upgraded to insider preview 17677, with installation of Google Chrome, & NodeJS 10.3 being the only changes the error is present, so it seems something has changed in the commands.

Running the following from cmd:

> start "" /b /wait https://google.com

Produces "Access is denied"

And from powershell:

> cmd /c start "" /b /wait https://google.com

Also "Access is denied".

Just to check, I also ran the commands as administrator, and got access denied.

So currently, not sure if this is a bug in the insider preview, or a permanent change of behaviour which will need a fix here.

@keyz182
Copy link
Author

keyz182 commented May 31, 2018

Looks like changes were made to start for the new "sets".

When you execute “start cmd” from a Command Prompt window, a new Command Prompt tab will now be created if you have Sets enabled. This will also work for other start launches, like “start notepad”. To start something in a new window you can use the new /newwindow flag, for example “start /newwindow notepad”.

From https://blogs.windows.com/windowsexperience/2018/05/24/announcing-windows-10-insider-preview-build-17677/

Also, it seems when the default browser is Edge, it works (to open in edge), but not Chrome or Firefox.

I have reported this to Microsoft, I will report back if/when there's feedback and if any changes are needed here.

@trodrigues
Copy link

Just to state that I've found this same issue while running testcafe which also uses opn. I've subscribed to this and can help test out a potential fix when it comes out (or provide any more debugging feedback if necessary).

@krnlde
Copy link

krnlde commented Jul 26, 2018

The windows release RS5 (17723) solved it for me.

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

No branches or pull requests

4 participants