open: Incognito Not Working

Following your example for spawning an incognito session in Chrome doesn’t appear to work anymore.

opn('http://sindresorhus.com', {app: ['google chrome', '--incognito']});

The above command, from your readme, opens the window in Chrome, but not in incognito mode.

OSX: 10.12.2 Chrome: 56.0.2924.87

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 1
  • Comments: 15 (1 by maintainers)

Most upvoted comments

@entozoon that doesnt work for me…

opn('http://sindresorhus.com', {app: ['chrome', '--incognito']});

results in:

    at ChildProcess.<anonymous> (/Users/monkeymojo/Dev/alks-cli/node_modules/opn/index.js:83: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:595:12)
(node:49415) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:49415) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

open -n -a "Google Chrome" --args "https://sindresorhus.com" --incognito this will open incognito windows with the url