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

Don't kill node.js / REPL #11342

Closed
pannous opened this issue Feb 13, 2017 · 7 comments
Closed

Don't kill node.js / REPL #11342

pannous opened this issue Feb 13, 2017 · 7 comments
Labels
repl Issues and PRs related to the REPL subsystem.

Comments

@pannous
Copy link

pannous commented Feb 13, 2017

Version: v7.5.0
Platform: Darwin iMac.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64

Somehow a broken promise kills the whole REPL:

> /usr/local/lib/node_modules/selenium-webdriver/lib/promise.js:2517
        throw error;
        ^

InvalidArgumentError: Missing required parameter: sessionId
    at buildPath (/usr/local/lib/node_modules/selenium-webdriver/lib/http.js:552:15)
    at toHttpRequest (/usr/local/lib/node_modules/selenium-webdriver/lib/http.js:367:16)
    at Executor.execute (/usr/local/lib/node_modules/selenium-webdriver/lib/http.js:433:19)
    at process._tickDomainCallback (internal/process/next_tick.js:129:7)
From: Task: WebDriver.findElement(By(css selector, *[name="login"]))
    at WebDriver.findElement (/usr/local/lib/node_modules/selenium-webdriver/lib/webdriver.js:1023:17)
    at repl:1:5
    at sigintHandlersWrap (vm.js:98:12)
    at REPLServer.defaultEval (repl.js:307:29)
    at bound (domain.js:280:14)
    at REPLServer.onLine (repl.js:506:10)
    at emitOne (events.js:101:20)
    at REPLServer.emit (events.js:188:7)
    at REPLServer.Interface._onLine (readline.js:247:10)
    at REPLServer.Interface._line (readline.js:591:8)
From: Task: WebElement.sendKeys()
    at repl:1:42
    at sigintHandlersWrap (vm.js:98:12)
    at REPLServer.defaultEval (repl.js:307:29)
    at bound (domain.js:280:14)
    at REPLServer.onLine (repl.js:506:10)
    at emitOne (events.js:101:20)
    at REPLServer.emit (events.js:188:7)
    at REPLServer.Interface._onLine (readline.js:247:10)
    at REPLServer.Interface._line (readline.js:591:8)
    at REPLServer.Interface._ttyWrite (readline.js:870:14)
home:~/

This must never occur!

@bnoordhuis
Copy link
Member

Easy way to reproduce? Is this with the built-in promises implementation or a custom one?

@bnoordhuis bnoordhuis added the repl Issues and PRs related to the REPL subsystem. label Feb 13, 2017
@pannous
Copy link
Author

pannous commented Feb 13, 2017

Oh, I assumed it had to do with the previous node.js warning similar to "soon every promise not handled will result in a bluescreen" Let me check... You mean it could be a hidden SEGFAULT?

@pannous
Copy link
Author

pannous commented Feb 13, 2017

require('child_process').exec("chromedriver")
const driver = require('selenium-webdriver')
let doc = new driver.Builder() .usingServer('http://localhost:9515') .withCapabilities({chromeOptions: {binary: '/usr/local/bin/Electron'} }) .forBrowser('electron') .build()
doc.get("http://xyz.com")
doc.findElement(driver.By.name('abc'))

forgive my ignorance: is there a kind of error which makes the REPL quit by design?

@bnoordhuis
Copy link
Member

When I said 'easy', I was hoping for something that doesn't involve all of selenium... Can you reproduce with just a bare REPL, no third-party dependencies?

@pannous
Copy link
Author

pannous commented Feb 13, 2017

I was hoping it had to do with this warning:

> new Promise(function (fulfill, reject){throw 0})
Promise { <rejected> 0 }
> (node:22916) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): 0
(node:22916) 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.

looks like this is a separate issue.

however since the warning indicates a horrible plan to make node.js terminate ever so often, is there any (other) place to petition against this planned behavior?

@pannous pannous changed the title Don't kill REPL! Don't kill node.js / REPL Feb 13, 2017
@bnoordhuis
Copy link
Member

See #8217 and the issues linked therein. Can this issue be closed then?

@pannous
Copy link
Author

pannous commented Feb 13, 2017

thx

@pannous pannous closed this as completed Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants