Giter Club home page Giter Club logo

chromedriver's Introduction

Electron ChromeDriver

CircleCI Status npm:
js-standard-style license:mit
dependencies:?

Simple node module to download the ChromeDriver version for Electron.

The major version of this library tracks the major version of the Electron versions released. So if you are using Electron 2.0.x you would want to use an electron-chromedriver dependency of ~2.0.0 in your package.json file.

This library is used by spectron.

Using

npm install --save-dev electron-chromedriver
chromedriver -h

Custom Mirror

You can set the ELECTRON_MIRROR or NPM_CONFIG_ELECTRON_MIRROR environment variables to use a custom base URL for downloading ChromeDriver zips.

# Electron mirror for China
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"

# Local mirror
# Example of requested URL: http://localhost:8080/1.2.0/chromedriver-v2.21-darwin-x64.zip
ELECTRON_MIRROR="http://localhost:8080/"

Overriding the version downloaded

The version downloaded can be overriden by setting the ELECTRON_CUSTOM_VERSION environment variable.

chromedriver's People

Contributors

clavin avatar codebytere avatar dependabot[bot] avatar dimadeveatii avatar dsanders11 avatar electron-bot avatar electron-roller[bot] avatar erickzhao avatar felixrieseberg avatar jkleinsc avatar jonfen avatar jviotti avatar kevinsawicki avatar lesha1201 avatar marshallofsound avatar nokel81 avatar shiftkey avatar vertedinde avatar yuya-oc avatar zeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chromedriver's Issues

line 6 in chromedriver.js

Hi,

I'm trying to launch Spectron.
app is lauched but webContents and others commands are undefined.

If I understand, chromedriver does the link between electron and spectron.

I remarked that line in the file chromedriver.js: const command = path.join(__dirname, 'bin', 'chromedriver')
The path is then : '/path/to/application/node_modules/electron-chromedriver/bin/chromedriver"

On my system, there is only one file in the bin directory: LICENSES.chromium.html

I was wondering if there isn't a connection with those undefined commands.
Thanks

node ./download-chromedrive.js issue

Node: v6.8.0
NPM: 3.10.8

I am building an electron app in a windows 7 environment. However, when I do npm install electron-chromedriver (version 1.4.0) it outputs an error:

Error: Cannot find module `.src/init`
...
Failed at the [email protected] install script `node ./download-chromedriver.js`

Any ideas?

I already tried setting up some env variables with npm config:

npm config set ELECTRON_MIRROR https://npm.taobao.org/mirrors/electron/

but I get the same error.

Unable to proceed after clicking a button

I am using spectron to simulate a test on Slack as follows:

  1. Open the application.
  2. Type in a valid domain.
  3. Click Continue.

I am using the following script for that purpose:

JavaScript:

var Application = require('spectron').Application
var assert = require('assert')

var app = new Application({
 path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
})

app.start().then(function() {
 // Check if the window is visible
 return app.browserWindow.isVisible()
}).then(function(isVisible) {
 // Verify the window is visible
 assert.equal(isVisible, true)
}).then(function() {
 // Get the window's title
 return app.client.getTitle()
}).then(function(title) {
 // Verify the window's title
 // assert.equal(title, 'My App')
}).catch(function(error) {
 // Log any failures
 console.error('Test failed', error.message)
}).then(function() {
 // Stop the application
 // return app.stop()
})

console.log('Before setTimeout');

setTimeout(function() {
 console.log('Inside setTimeout');
 return app.client.waitUntilWindowLoaded()
 .windowHandles().then(function(session) {
 // Need to return the promise back, if promise is
 // it would wait for the state or else app will exit.
 console.log('Before switchTab, click & keys');
 app.client.switchTab(session.value[1]).click('#domain').keys('testing').click("#submit_team_domain")
 .catch(function(error) {
 console.error('error message->', error.message);
 });
 console.log('After switchTab, click & keys');
 });
}, 5000);

Java:

Set<String> windowHandles = webDriver.getWindowHandles();
Iterator<String> iterator = windowHandles.iterator();
while (iterator.hasNext()) {
  String windowHandle = iterator.next();
  if (!windowHandle.equalsIgnoreCase(webDriver.getWindowHandle()))
    webDriver.switchTo().window(windowHandle);
}

try {
  Thread.sleep(5000);
} catch (InterruptedException e) {
  e.printStackTrace();
}

WebElement textBox = webDriver.findElement(By.id("domain"));
textBox.click();
textBox.sendKeys("testing");

WebElement button = webDriver.findElement(By.id("submit_team_domain"));
button = webDriver.findElement(By.id("submit_team_domain"));
button.click();

I am testing with and without selenium server in between on a Mac and a Linux machine.

The expected result should be that the page should proceed after clicking continue.

What is actually happening is that if a valid domain is provided then it gets stuck and never proceed. The only exception to this is when we use spectron to test without a selenium server in between on a Linux machine which itself fails about 20% of the time.

If we provide an invalid domain in any of the cases, it simply proceeds.

Following are the logs when using Spectron without a Selenium Server:

requestOptions -> {"path":"/session/:sessionId/element"}
data -> {"using":"id","value":"domain"}
_ref -> {"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":{"ELEMENT":"0.006260871409230262-1"}},"response":{"statusCode":200,"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":{"ELEMENT":"0.006260871409230262-1"}},"headers":{"content-length":"104","content-type":"application/json; charset=utf-8","connection":"close"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"127.0.0.1:9515","port":"9515","hostname":"127.0.0.1","hash":null,"search":null,"query":null,"pathname":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element","path":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element","href":"http://127.0.0.1:9515/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element"},"method":"POST","headers":{"Connection":"keep-alive","Accept":"application/json","User-Agent":"webdriverio/webdriverio/4.6.2","Content-Type":"application/json; charset=UTF-8","Content-Length":31}}}}

requestOptions -> {"path":"/session/:sessionId/element/0.006260871409230262-1/click","method":"POST"}
data -> {}
_ref -> {"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":null},"response":{"statusCode":200,"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":null},"headers":{"content-length":"72","content-type":"application/json; charset=utf-8","connection":"close"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"127.0.0.1:9515","port":"9515","hostname":"127.0.0.1","hash":null,"search":null,"query":null,"pathname":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element/0.006260871409230262-1/click","path":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element/0.006260871409230262-1/click","href":"http://127.0.0.1:9515/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element/0.006260871409230262-1/click"},"method":"POST","headers":{"Connection":"keep-alive","Accept":"application/json","User-Agent":"webdriverio/webdriverio/4.6.2","content-type":"application/json","content-length":2}}}}
WARNING: the "keys" command will be depcrecated soon. Please use a different command in order to avoid failures in your test after updating WebdriverIO.

requestOptions -> {"path":"/session/:sessionId/keys"}
data -> {"value":["c","o","s","m","o","t","e","s","t","i","n","g"]}
_ref -> {"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":null},"response":{"statusCode":200,"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":null},"headers":{"content-length":"72","content-type":"application/json; charset=utf-8","connection":"close"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"127.0.0.1:9515","port":"9515","hostname":"127.0.0.1","hash":null,"search":null,"query":null,"pathname":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/keys","path":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/keys","href":"http://127.0.0.1:9515/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/keys"},"method":"POST","headers":{"Connection":"keep-alive","Accept":"application/json","User-Agent":"webdriverio/webdriverio/4.6.2","Content-Type":"application/json; charset=UTF-8","Content-Length":59}}}}

requestOptions -> {"path":"/session/:sessionId/element"}
data -> {"using":"id","value":"submit_team_domain"}
_ref -> {"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":{"ELEMENT":"0.006260871409230262-2"}},"response":{"statusCode":200,"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":{"ELEMENT":"0.006260871409230262-2"}},"headers":{"content-length":"104","content-type":"application/json; charset=utf-8","connection":"close"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"127.0.0.1:9515","port":"9515","hostname":"127.0.0.1","hash":null,"search":null,"query":null,"pathname":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element","path":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element","href":"http://127.0.0.1:9515/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element"},"method":"POST","headers":{"Connection":"keep-alive","Accept":"application/json","User-Agent":"webdriverio/webdriverio/4.6.2","Content-Type":"application/json; charset=UTF-8","Content-Length":43}}}}

requestOptions -> {"path":"/session/:sessionId/element/0.006260871409230262-2/click","method":"POST"}
data -> {}
_ref -> {"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":null},"response":{"statusCode":200,"body":{"sessionId":"bc8bc9abd7a9827258cee72de70d835f","status":0,"value":null},"headers":{"content-length":"72","content-type":"application/json; charset=utf-8","connection":"close"},"request":{"uri":{"protocol":"http:","slashes":true,"auth":null,"host":"127.0.0.1:9515","port":"9515","hostname":"127.0.0.1","hash":null,"search":null,"query":null,"pathname":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element/0.006260871409230262-2/click","path":"/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element/0.006260871409230262-2/click","href":"http://127.0.0.1:9515/wd/hub/session/bc8bc9abd7a9827258cee72de70d835f/element/0.006260871409230262-2/click"},"method":"POST","headers":{"Connection":"keep-alive","Accept":"application/json","User-Agent":"webdriverio/webdriverio/4.6.2","content-type":"application/json","content-length":2}}}}

Following are the logs when using Java Language Bindings with a Selenium Server:

15:11:43.884 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@5d54be3a
15:11:43.884 INFO - Handler thread for session 976706a5ace12e22ec54d9848f21813c (chrome): Executing POST on /session/976706a5ace12e22ec54d9848f21813c/element (handler: ServicedSession)
15:11:43.885 INFO - To upstream: {"using":"id","value":"domain"}
15:11:43.885 DEBUG - sun.net.www.MessageHeader@55edb1c210 pairs: {POST /session/976706a5ace12e22ec54d9848f21813c/element HTTP/1.1: null}{User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)}{Accept-Encoding: gzip,deflate}{Content-Type: application/json; charset=utf-8}{Connection: close}{Cache-Control: no-cache}{Pragma: no-cache}{Host: localhost:25846}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Content-Length: 31}
15:11:43.908 DEBUG - sun.net.www.MessageHeader@61b2a16b4 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 102}{Content-Type: application/json; charset=utf-8}{Connection: close}
15:11:43.908 INFO - To downstream: {"sessionId":"976706a5ace12e22ec54d9848f21813c","status":0,"value":{"ELEMENT":"0.8306467617329649-1"}}

15:11:43.917 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@5d54be3a
15:11:43.917 INFO - Handler thread for session 976706a5ace12e22ec54d9848f21813c (chrome): Executing POST on /session/976706a5ace12e22ec54d9848f21813c/element/0.8306467617329649-1/click (handler: ServicedSession)
15:11:43.918 INFO - To upstream: {"id":"0.8306467617329649-1"}
15:11:43.919 DEBUG - sun.net.www.MessageHeader@3cbdbdb110 pairs: {POST /session/976706a5ace12e22ec54d9848f21813c/element/0.8306467617329649-1/click HTTP/1.1: null}{User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)}{Accept-Encoding: gzip,deflate}{Content-Type: application/json; charset=utf-8}{Connection: close}{Cache-Control: no-cache}{Pragma: no-cache}{Host: localhost:25846}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Content-Length: 29}
15:11:43.986 DEBUG - sun.net.www.MessageHeader@32f13174 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 72}{Content-Type: application/json; charset=utf-8}{Connection: close}
15:11:43.986 INFO - To downstream: {"sessionId":"976706a5ace12e22ec54d9848f21813c","status":0,"value":null}

15:11:43.991 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@5d54be3a
15:11:43.991 INFO - Handler thread for session 976706a5ace12e22ec54d9848f21813c (chrome): Executing POST on /session/976706a5ace12e22ec54d9848f21813c/element (handler: ServicedSession)
15:11:43.992 INFO - To upstream: {"using":"id","value":"domain"} 
15:11:43.992 DEBUG - sun.net.www.MessageHeader@3bf4c11110 pairs: {POST /session/976706a5ace12e22ec54d9848f21813c/element HTTP/1.1: null}{User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)}{Accept-Encoding: gzip,deflate}{Content-Type: application/json; charset=utf-8}{Connection: close}{Cache-Control: no-cache}{Pragma: no-cache}{Host: localhost:25846}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Content-Length: 31}
15:11:43.998 DEBUG - sun.net.www.MessageHeader@4f3986fd4 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 102}{Content-Type: application/json; charset=utf-8}{Connection: close}
15:11:43.998 INFO - To downstream: {"sessionId":"976706a5ace12e22ec54d9848f21813c","status":0,"value":{"ELEMENT":"0.8306467617329649-1"}}

15:11:44.002 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@5d54be3a
15:11:44.002 INFO - Handler thread for session 976706a5ace12e22ec54d9848f21813c (chrome): Executing POST on /session/976706a5ace12e22ec54d9848f21813c/element/0.8306467617329649-1/value (handler: ServicedSession)
15:11:44.003 INFO - To upstream: {"id":"0.8306467617329649-1","value":["cosmotesting"]}
15:11:44.003 DEBUG - sun.net.www.MessageHeader@1eb8ea9e10 pairs: {POST /session/976706a5ace12e22ec54d9848f21813c/element/0.8306467617329649-1/value HTTP/1.1: null}{User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)}{Accept-Encoding: gzip,deflate}{Content-Type: application/json; charset=utf-8}{Connection: close}{Cache-Control: no-cache}{Pragma: no-cache}{Host: localhost:25846}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Content-Length: 54}
15:11:44.032 DEBUG - sun.net.www.MessageHeader@65f4e5f54 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 72}{Content-Type: application/json; charset=utf-8}{Connection: close}
15:11:44.032 INFO - To downstream: {"sessionId":"976706a5ace12e22ec54d9848f21813c","status":0,"value":null}

15:11:44.036 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@5d54be3a
15:11:44.036 INFO - Handler thread for session 976706a5ace12e22ec54d9848f21813c (chrome): Executing POST on /session/976706a5ace12e22ec54d9848f21813c/element (handler: ServicedSession)
15:11:44.036 INFO - To upstream: {"using":"id","value":"submit_team_domain"}
15:11:44.036 DEBUG - sun.net.www.MessageHeader@78955c1310 pairs: {POST /session/976706a5ace12e22ec54d9848f21813c/element HTTP/1.1: null}{User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)}{Accept-Encoding: gzip,deflate}{Content-Type: application/json; charset=utf-8}{Connection: close}{Cache-Control: no-cache}{Pragma: no-cache}{Host: localhost:25846}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Content-Length: 43}
15:11:44.050 DEBUG - sun.net.www.MessageHeader@7b1823924 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 102}{Content-Type: application/json; charset=utf-8}{Connection: close}
15:11:44.050 INFO - To downstream: {"sessionId":"976706a5ace12e22ec54d9848f21813c","status":0,"value":{"ELEMENT":"0.8306467617329649-2"}}

15:11:44.054 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@5d54be3a
15:11:44.054 INFO - Handler thread for session 976706a5ace12e22ec54d9848f21813c (chrome): Executing POST on /session/976706a5ace12e22ec54d9848f21813c/element/0.8306467617329649-2/click (handler: ServicedSession)
15:11:44.055 INFO - To upstream: {"id":"0.8306467617329649-2"}
15:11:44.055 DEBUG - sun.net.www.MessageHeader@22adda7510 pairs: {POST /session/976706a5ace12e22ec54d9848f21813c/element/0.8306467617329649-2/click HTTP/1.1: null}{User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)}{Accept-Encoding: gzip,deflate}{Content-Type: application/json; charset=utf-8}{Connection: close}{Cache-Control: no-cache}{Pragma: no-cache}{Host: localhost:25846}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Content-Length: 29}

[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0 when run chromedriver from terminal

I use the command you provide in the readme.md and install the spectron all using nom.
When I use the terminal to run chromedrive, it provides the following msg:

imac:Desktop denny$ chromedriver
Starting ChromeDriver (v2.6.232908) on port 9515
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0

Those commands used to install chromedriver and spectron are the followings:
npm install --save-dev electron-chromedriver
npm install --save-dev spectron

My operation system is Mac OS Sierra.

Actually, I have tried to solve this problems through almost any methods I searched, but failed, please tell me.

Cannot launch Electron Application in Remote Machines using RemoteWebDriver

While trying to launch Electron Application using in Remote Machine.My Application is Launching and after few seconds getting

org.openqa.selenium.WebDriverException: Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: C:\Program Files\SelfCheckout\SelfCheckout.exe (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 41.62 seconds
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_191'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command duration or timeout: 77.42 seconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$errorHandler$0(JsonWireProtocolResponse.java:54)
at org.openqa.selenium.remote.JsonWireProtocolResponse$$Lambda$200/2130772866.apply(Unknown Source)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.HandshakeResponse$$Lambda$197/1224347463.apply(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake$$Lambda$198/1966250569.apply(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at TEST001_LaunchingSCO.doPresetep(TEST001_LaunchingSCO.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.openqa.selenium.WebDriverException: Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: C:\Program Files\SelfCheckout\SelfCheckout.exe (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 41.62 seconds
Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_191'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'VGFCVIEW01216', ip: '10.110.112.188', os.name: 'Windows Vista', os.arch: 'amd64', os.version: '6.0', java.version: '1.8.0_25'
Driver info: driver.version: ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:115)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:150)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:129)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.server.DefaultDriverFactory.callConstructor(DefaultDriverFactory.java:57)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:51)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:215)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I think WebDriver is not able to identify the electron as a chrome. Hence it is failing, but while trying to trigger in localhost everthing looks fine. Can someone please give inputs
?

Unable to download

[email protected] install 
/node_modules/electron-chromedriver
 node ./download-chromedriver.js

/node_modules/electron-chromedriver/download-chromedriver.js:19
  if (err != null) throw err
                   ^
Error: connect ECONNREFUSED 0.0.0.0:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1163:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./download-chromedriver.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in

Not able to use webdriver / protractor for electron app test automation

An existing angularjs was converted as electron application by following the steps in the site.
The application is working fine and it is possible to navigate through the pages.
But not able to execute automation tests with 'protractor'.

**
1.Had downloaded 'electron-chromedriver' and launched the server.'electron-chromedriver' is listening on port 9515.

2.The conf.js file for protractor is given below
**

exports.config = {
    ...
    seleniumAddress:'http://localhost:9515/',
    capabilities: {
        browserName: 'electron',
        chromeOptions: {
            binary:"<path>\\node_modules\\.bin\\electron",
            args: [" <path>"]
        },
    ...
    }
};

Following error is obtained on executing the tests.

Debugger listening on ws://127.0.0.1:26008/a0465e09-2522-4ccc-ad0e-6423002c1b8e

(node:6456) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[13:50:44] I/launcher - Running 1 instances of WebDriver
[13:50:44] I/hosted - Using the selenium server at http://localhost:9515/
[13:50:44] E/runner - Unable to start a WebDriver session.
(node:6456) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: Failed to create a Chrome process.
  (Driver info: chromedriver=76.0.3783.1 (e74cdb57d7c7a6c37e9b21d8557e53bbdba17e42-refs/branch-heads/3783@{#2}),platform=Windows NT 10.0.15063 x86_64)
    at Object.checkLegacyResponse (<path>\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (<path>\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (<path>\node_modules\selenium-webdriver\lib\http.js:441:30)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:6456) 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:6456) [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.
[13:50:44] E/launcher - Error: WebDriverError: unknown error: Failed to create a Chrome process.
  (Driver info: chromedriver=76.0.3783.1 (e74cdb57d7c7a6c37e9b21d8557e53bbdba17e42-refs/branch-heads/3783@{#2}),platform=Windows NT 10.0.15063 x86_64)
    at Object.checkLegacyResponse (<path>\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (<path>\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (<path>\node_modules\selenium-webdriver\lib\http.js:441:30)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
[13:50:44] E/launcher - Process exited with error code 100

Thanks in Advance!!

Specify ELECTRON_MIRROR to a directory/or file on disk

Our build system is reproducible so it does not allow any network access. Is there a way to specify that the installation should just a prespecified file that's on disk or a directory? Similar to the electronZipDir used by @electron-forge/cli?

ChromeDriver crashes when trying to start the exe program

(this issue was previous reported on electron-electron/electron#25486, but they suggest me to report here)

Issue Details

  • Electron Version:
    • Desktop app based on Electron 9.1.2, and UI automation test with chromedriver-v9.1.2-win32-x64
  • Operating System:
    • Windows Server 2019, os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_261'
  • Last Known Working Electron version:
    • Desktop app based on Electron 7.1.14, and UI automation test with chromedriver-v7.1.11-win32-x64

Expected Behavior

Start the desktop app normally

Actual Behavior

With chromedriver-v9.1.2-win32-x64, when running UI automation test it always failed, below is the error stack related to the ChromeDriver:
(PS. I also tried the chromedriver-v9.0.2-win32-x64, it fails frequently but sometimes success, it's weried)

[INFO] Running TestSuite
OS is: windows server 2019
The current git commit id is: fd7dca80
Starting ChromeDriver 83.0.4103.94 (8bd9e77c4b04cfdc0d98ce2ab9f1af8e6e457869-refs/heads/master@{#759982}) on port 11376
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.

[TestRunnerListener] Running 31 tests in 'Neuron UI Tests' using 1 threads
....
....
....

[ERROR] com.cryptape.neuron.CreateWalletTest.globalSetup  Time elapsed: 47.775 s  <<< FAILURE!
org.openqa.selenium.WebDriverException: 
unknown error: Chrome failed to start: crashed.
  (unknown error: unable to discover open pages)
  (The process started from chrome location C:\Users\Administrator\AppData\Local/Programs/Neuron/Neuron.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'EC2AMAZ-BU3BFBB', ip: '172.31.34.110', os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_261'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
	Ordinal0 [0x00007FF711D322E2+3220194]
	Ordinal0 [0x00007FF711BFFD12+1965330]
	Ordinal0 [0x00007FF711AC1B15+662293]
	Ordinal0 [0x00007FF711A3156D+71021]
	Ordinal0 [0x00007FF711A57B70+228208]
	Ordinal0 [0x00007FF711A54DCF+216527]
	Ordinal0 [0x00007FF711A3658F+91535]
	Ordinal0 [0x00007FF711A3774E+96078]
	Ordinal0 [0x00007FF711C18311+2065169]
	GetHandleVerifier [0x00007FF711E80FB9+1233401]
	GetHandleVerifier [0x00007FF711E80D40+1232768]
	GetHandleVerifier [0x00007FF711E8C09C+1278684]
	GetHandleVerifier [0x00007FF711E815C8+1234952]
	Ordinal0 [0x00007FF711C0F00A+2027530]
	Ordinal0 [0x00007FF711C19AF6+2071286]
	Ordinal0 [0x00007FF711C3280D+2172941]
	BaseThreadInitThunk [0x00007FFEB1CE7974+20]
	RtlUserThreadStart [0x00007FFEB3CBA261+33]

To Reproduce

Run UI automation test with chromedriver-v9.1.2-win32-x64 for desktop which based on Electron 9.1.2

arm64 version?

Hi there,

I'm trying to build the Atom IDE on Ubuntu on an Odroid-C2 -- it's arm64 based.

It's failing because -- by the looks of the error message below -- there is no arm64 version of chromedriver v2.21. Would you please build an arm64 version?

Thanks, Phil

`odroid@odroid64:~/Downloads/atom$ script/build --create-debian-package
Node: v6.9.5
Npm: v4.1.2
Installing script dependencies
Downloading https://github.com/electron/electron/releases/download/v1.3.0/chromedriver-v2.21-linux-arm64.zip failed: Non-200 response (404)
npm ERR! Linux 3.14.79-105
npm ERR! argv "/usr/bin/node" "/home/odroid/.npm-global/bin/npm" "--loglevel=error" "install"
npm ERR! node v6.9.5
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node ./download-chromedriver.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./download-chromedriver.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./download-chromedriver.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
`

Download script fails when behind proxy

The download script fails behind a corporate proxy despite setting npm proxy & https-proxy variables. Npm works okay for downloading other required packages.

[email protected] install C:\electron-api-demos\node_modules\electron-chromedriver
node ./download-chromedriver.js

C:\electron-api-demos\node_modules\electron-chromedriver\download-chromedriver.js:19
if (err != null) throw err
^

Error: tunneling socket could not be established, statusCode=407
at ClientRequest.onConnect (C:\electron-api-demos\node_modules\tunnel-agent\index.js:166:19)
at ClientRequest.g (events.js:291:16)
at emitThree (events.js:116:13)
at ClientRequest.emit (events.js:194:7)
at Socket.socketOnData (_http_client.js:395:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:548:20)

npm install electron-chromedriver failing

This is on windows

(node:1652) ExperimentalWarning: The fs.promises API is experimental
(node:1652) UnhandledPromiseRejectionWarning: Error: EEXIST: file already exists, mkdir 'C:\Users\Jonty\Documents\github\Osso-Spectron\node_modules\electron-chromedriver\bin'
(node:1652) 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:1652) [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.
npm WARN [email protected] No description

+ [email protected]
updated 1 package and audited 272 packages in 1.318s
found 4 vulnerabilities (3 low, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

Any ideas? Have tried deleting node_modules and rebooting

Can't install on ubuntu

Maybe because the node package on ubuntu is nodejs instead of only node.

Any help?

Log:

$ npm install electron-chromedriver 
npm WARN package.json [email protected] scripts['tests'] should probably be scripts['test'].
npm WARN package.json [email protected] No repository field.
npm WARN engine [email protected]: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.25","npm":"1.4.21"})
|
> [email protected] install /home/ubuntu/Projects/myproject/node_modules/electron-chromedriver
> node ./download-chromedriver.js


/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_transform.js:159
  throw new Error('not implemented');
        ^
Error: not implemented
    at Transform._transform (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_transform.js:159:9)
    at Transform._read (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Transform.Writable.write (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at write (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (/home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_readable.js:632:7)
    at /home/ubuntu/Projects/myproject/node_modules/readable-stream/lib/_stream_readable.js:600:7
    at process._tickCallback (node.js:415:13)
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: `node ./download-chromedriver.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the electron-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./download-chromedriver.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls electron-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-15-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "electron-chromedriver"
npm ERR! cwd /home/ubuntu/Projects/myproject
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/ubuntu/Projects/myproject/npm-debug.log
npm ERR! not ok code 0

Error install on Windows

Here's the npm-debug.log part:

87428 info lifecycle [email protected]install: [email protected]
87429 verbose lifecycle [email protected]
install: unsafe-perm in lifecycle true
87430 verbose lifecycle [email protected]install: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\Desenvolvimento\dotNET\Projetos\Integrador_Fiscal\Codigo\integrador-mfe\node_modules\electron-chromedriver\node_modules.bin;D:\Desenvolvimento\dotNET\Projetos\Integrador_Fiscal\Codigo\integrador-mfe\node_modules.bin;D:\Users\008188L1\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;D:\Users\008188L1\bin;C:\oracle\ora92\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\DMIX;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Program Files\nodejs;C:\Program Files (x86)\Microsoft VS Code\bin;D:\Users\008188L1\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
87431 verbose lifecycle [email protected]
install: CWD: D:\Desenvolvimento\dotNET\Projetos\Integrador_Fiscal\Codigo\integrador-mfe\node_modules\electron-chromedriver
87432 silly lifecycle [email protected]install: Args: [ '/d /s /c', 'node ./download-chromedriver.js' ]
87433 silly lifecycle [email protected]
install: Returned: code: 1 signal: null
87434 info lifecycle [email protected]~install: Failed to exec install script
87435 verbose unlock done using D:\Users\008188L1\AppData\Roaming\npm-cache_locks\staging-c221d9790d1cd1b7.lock for D:\Desenvolvimento\dotNET\Projetos\Integrador_Fiscal\Codigo\integrador-mfe\node_modules.staging
87436 silly rollbackFailedOptional Starting
87437 silly rollbackFailedOptional Finishing
87438 silly runTopLevelLifecycles Finishing
87439 silly install printInstalled
87440 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
87441 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
87442 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
87442 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
87442 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
87442 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
87443 warn optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules\7zip-bin\node_modules\7zip-bin-mac):
87444 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
87445 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
87445 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
87445 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
87445 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
87446 warn optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@^1.1.0 (node_modules\7zip-bin\node_modules\7zip-bin-linux):
87447 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
87448 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: linux
87448 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
87448 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
87448 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
87449 warn [email protected] requires a peer of ajv@>=5.0.0 but none was installed.
87450 verbose If you need help, you may report this error at:
87450 verbose https://github.com/npm/npm/issues
87451 warn [email protected] No repository field.
87452 verbose If you need help, you may report this error at:
87452 verbose https://github.com/npm/npm/issues
87453 warn [email protected] No license field.
87454 verbose If you need help, you may report this error at:
87454 verbose https://github.com/npm/npm/issues
87455 verbose stack Error: [email protected] install: node ./download-chromedriver.js
87455 verbose stack Exit status 1
87455 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
87455 verbose stack at emitTwo (events.js:106:13)
87455 verbose stack at EventEmitter.emit (events.js:191:7)
87455 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
87455 verbose stack at emitTwo (events.js:106:13)
87455 verbose stack at ChildProcess.emit (events.js:191:7)
87455 verbose stack at maybeClose (internal/child_process.js:891:16)
87455 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
87456 verbose pkgid [email protected]
87457 verbose cwd D:\Desenvolvimento\dotNET\Projetos\Integrador_Fiscal\Codigo\integrador-mfe
87458 error Windows_NT 6.1.7601
87459 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--verbose"
87460 error node v6.11.1
87461 error npm v3.10.10
87462 error code ELIFECYCLE
87463 error [email protected] install: node ./download-chromedriver.js
87463 error Exit status 1
87464 error Failed at the [email protected] install script 'node ./download-chromedriver.js'.
87464 error Make sure you have the latest version of node.js and npm installed.
87464 error If you do, this is most likely a problem with the electron-chromedriver package,
87464 error not with npm itself.
87464 error Tell the author that this fails on your system:
87464 error node ./download-chromedriver.js
87464 error You can get information on how to open an issue for this project with:
87464 error npm bugs electron-chromedriver
87464 error Or if that isn't available, you can get their info via:
87464 error npm owner ls electron-chromedriver
87464 error There is likely additional logging output above.
87465 verbose exit [ 1, true ]

Can someone help me out with this? Thanks in advance! =)

Update electron-chromedriver to use Chromedriver v2.38 for Electron 3

Hi,

I had some issues using Spectron with Electron 3 and from what I found those issue are related to the chromedriver version that is used in electron-chromedriver. All the issues were related to "unknown session ID" and "cannot determine loading status".

I tried using electron-chromedriver ^3.0.0-beta.1 but my issues were still present.

I saw here http://chromedriver.chromium.org/downloads that Chromedriver v2.38 is supposed to contain fixes for the 2 issues above (see changelog for Chromedriver v2.38) and indeed, it worked perfectly, no more "unknown session ID" and "cannot determine loading status" errors.

Can you update to use Chromedriver v2.38 please?

Thanks!

[Bug] electron download electron-chromedriver version mismatch

reproduce steps:
set 5.0.8 electron in package.json and set ELECTRON_CUSTOM_DIR.

expect: It still download chrome-driver 5.0.0, It should be also specified the fixed version to download electron chrome-driver.
actual: It still download 5.0.0 chrome driver version.
I suggest to change the version download logical, with ELECTRON_CUSTOM_DIR.
https://github.com/electron/chromedriver/blob/3807adbf7adbb4f778dcb35999e99dbf90760d41/download-chromedriver.js#L30

Cannot get automation extension

Hey there,

I'm getting this issue while using electron chromedriver while following this tutorial;

unknown error: cannot get automation extensionfrom unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html

Any idea what this means?

Conflict binary name with regular chromedriver

I try use this package with chromedriver
Both packages has same binary name. As workaround I use full paths node_modules/chromedriver/lib/chromedriver/chromedriver and node_modules/electron-chromedriver/bin/chromedriver but it a little inconvenient.
Maybe rename binary of this package?

Download failed

When running npm install the following error occurs:

node ./download-chromedriver.js

internal/util.js:209
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
at promisify (internal/util.js:209:11)
at Object. (G:\code\js\angular-electron\node_modules\electron-chromedriver\node_modules\extract-zip\index.js:11:18)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (G:\code\js\angular-electron\node_modules\electron-chromedriver\download-chromedriver.js:4:20)

Cannot install 1.8.0 on Linux

npm install [email protected] always fails with:

Error: Generated checksum for "chromedriver-v1.8.0-linux-x64.zip" did not match expected checksum.

Q. Is there a way to be told the two checksums, so I can try and find out which one is correct?

Inspired by electron-userland/spectron#265 I have been deleting node_modules of my project, and I also deleted ~/.npm/. But neither helped.

I also tried as root, doing a global install:

 sudo npm install -g [email protected]

It fails with:

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/electron-chromedriver/.electron'

This seems like a simple bug, as /usr/lib/node_modules/ currently only contains an "npm" directory. I.e. mkdir needs to be set to make parent directories as needed. (mkdir -p if it is using the bash command.)

error on npm install on OSX

Hi,
Getting following error :

npm install --save-dev electron-chromedriver npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-zapTJKvK4eACcTgBVlyeFaJ63cXujpWjOLKKRHL8uYOHLp5CYHYgXlM6kN8L7zjz5uVjA51hy9NsSyIQZ8S3Mw== integrity checksum failed when using sha512: wanted sha512-zapTJKvK4eACcTgBVlyeFaJ63cXujpWjOLKKRHL8uYOHLp5CYHYgXlM6kN8L7zjz5uVjA51hy9NsSyIQZ8S3Mw== but got sha1-WmNWbkpGhUE4Yerwh9yqmg42KgM=. (18302 bytes) > [email protected] install /Users/johnny/git/vanilla/node_modules/electron-chromedriver > node ./download-chromedriver.js module.js:487 throw err; ^ Error: Cannot find module 'process-nextick-args' at Function.Module._resolveFilename (module.js:485:15)at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/johnny/git/vanilla/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js:6:23) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) npm WARN [email protected] No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/7zip-bin-win): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"darwin","arch":"x64"}) npmERR!code ELIFECYCLE npmERR!errno 1 npmERR! [email protected] install:node ./download-chromedriver.jsnpmERR! Exit status 1 npmERR!npmERR! Failed at the [email protected] install script. npmERR! This is probably not a problem with npm. There is likely additional logging output above. npmERR! A complete log of this run can be found in: npmERR!/Users/johnny/.npm/_logs/2017-07-01T10_42_37_269Z-debug.log

Trying to manually install the missing 'process-nextick-args' throws more missing module errors, and so on.

Thanks.

electron_mirror is not honored on OS X due to process.env being case-sensitive

It looks like process.env is case-insensitive on Windows but case-sensitive on OS X. When download-chromedriver.js runs on OS X, the process.env.npm_* variables are lower case and therefore process.env.NPM_CONFIG_ELECTRON_MIRROR equates to undefined and baseUrl defaults to https://github.com/electron/electron/release/download/v.

-- steps to reproduce --

npm config set electron_mirror http://nothingtoseehere.com
node ./download-chromedriver.js

The above should fail on OS X but does not.

I'm using:

  • OS X 10.11.6
  • node 4.4.7 (I've also tested it on 6.4.0 and the issue still exists)
  • npm 2.15.8

'node ./download-chromedriver.js' fails while installing MagicMirror²

magic_mirror_debug.txt

I'm not sure why this happens.
NPM version: 4.5.0
Node Version: 6.10.2

Last lines after install fails, full debug.txt is attached:

[email protected] install /root/MagicMirror/node_modules/electron-chromedriver
node ./download-chromedriver.js

module.js:471
    throw err;
    ^

Error: Cannot find module '/root/MagicMirror/node_modules/electron-chromedriver/download-chromedriver.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:393:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:508:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./download-chromedriver.js`
npm ERR! Exit status 1

Version override not implemented?

Documentation states that:

The version downloaded can be overriden by setting the ELECTRON_CUSTOM_VERSION environment variable.

Although I cannot find a place where this variable is used in the code.

I've tried to specify the version, but it does not change anything.

ELECTRON_CUSTOM_VERSION=10.0.0-beta.17 yarn install

Is this feature not implemented or am I missing something?

Chromedriver cannot get window size from Electron Application using Java API

While testing a packaged Electron Application with Java, Chromedriver,
and trying to get the current window size using this code:

    WebDriver driver;
    ...
    Window aWindow = driver.manage().window();
    Dimension size = aWindow.getSize();

getSize() fails with the error below.
Can the Electron chromedriver.exe be configured to set/get window positition?
Also, can chromedriver for Electron be configured to execute JavaScript experessions?

Error:
EXCEPTION:org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
(Session info: content shell=)
(Driver info: chromedriver=2.21
(eda589282bd7729f36960d2e669d4b81375b897c),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.11 seconds

Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: . . . os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_31'

Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={chromedriverVersion=2.21 (eda589282bd7729f36960d2e669d4b81375b897c), takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]

Offline builds requiring electron-chromedriver

I am trying to produce a flatpak out of an electron application which uses spectron and therefore depends on electron-chromedriver transitively. For reproducibility purposes, the build is done offline using a cache containing a pre-fetched download of all dependencies listed in package-lock.json.

However, the build fails since chromedriver cannot be downloaded in offline mode:

npm info lifecycle [email protected]~install: [email protected]

> [email protected] install /run/build/zulip/main/node_modules/electron-chromedriver
> node ./download-chromedriver.js

Downloading tmp-13-1-chromedriver-v1.8.0-linux-x64.zip
Error: getaddrinfo EAI_AGAIN github.com:443
/run/build/zulip/main/node_modules/electron-chromedriver/download-chromedriver.js:30
  if (err != null) throw err
                   ^

Error: getaddrinfo EAI_AGAIN github.com:443
    at Object._errnoException (util.js:992:11)
    at errnoException (dns.js:55:15)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
npm info lifecycle [email protected]~install: Failed to exec install script

I was wondering whether there is a way to specify a local install of chromedriver to electron-chromedriver and bypass the download step, and how hard this would be to implement?

Another solution may be to patch the upstream build system in order to remove occurrences of spectron / electron-chromedriver from the npm files, but I'd rather prioritize on solutions which do not involve messing with what upstream provides.

Support proxy configs

Moving over from electron/electron#7093


  • Electron version:0.37.8
  • Operating system:win7 32bit

spectron downloading failed 【getaddrinfo ENOTFOUND】
I have set the proxy in my PC as following。
proxy=http://username:password@proxy-url:8080/
https-proxy=http://username:password@proxy-url:8080/


C:\tool\spectron-master\spectron-master>npm install

[email protected] install C:\tool\spectron-master\spectron-master\no
de_modules\electron-chromedriver
node ./download-chromedriver.js

Downloading https://github.com/electron/electron/releases/download/v1.3.0/chrome
driver-v2.21-win32-ia32.zip failed: getaddrinfo ENOTFOUND github.com github.com:
443

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v5.10.0
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node ./download-chromedriver.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./downlo
ad-chromedriver.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-chromedriver
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./download-chromedriver.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\tool\spectron-master\spectron-master\npm-debug.log

Running with npm_config_platform=win32 on linux fails

I encountered an issue making an electron build for windows on linux (using the recommended electronuserland/builder:wine docker container).

Steps to reproduce

  • Use a linux machine to install electron-chromedriver
  • Install with command: npm_config_platform=win32 npm i electron-chromedriver

Actual result
Installation fails with error:

/app/node_modules/electron-chromedriver/download-chromedriver.js:24
        if (error != null) throw error
                           ^

[Error: ENOENT: no such file or directory, chmod '/app/node_modules/electron-chromedriver/bin/chromedriver'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'chmod',
  path: '/app/node_modules/electron-chromedriver/bin/chromedriver'
}

Expected result
Installation finishes successfully with win32 driver downloaded.

I think the problem is in this line:

if (process.platform !== 'win32') {
  await fs.chmod(path.join(targetFolder, 'chromedriver'), 0o755)
}

Shouldn't it be process.env.npm_config_platform instead of process.platform?
Or at least, in case of windows it should chmod the chromedriver.exe file.

npm install error in local/mirror setup

Hello,

Can you help with the following error:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-mac@^1.0.1 (node_modules\7zip-bin\node_modules\7zip-bin-mac):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: 7zip-bin-linux@^1.0.3 (node_modules\7zip-bin\node_modules\7zip-bin-linux):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of ajv@>=5.0.0 but none was installed.
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\tools\\nodejs\\node-v7.9.0-win-x64\\node.exe" "C:\\tools\\nodejs\\node-v7.9.0-win-x64\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: `node ./download-chromedriver.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./download-chromedriver.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./download-chromedriver.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\AppData\Roaming\npm-cache\_logs\2017-05-19T17_50_30_285Z-debug.log

I have the dependencies on a local repo:

set ELECTRON_MIRROR=http://10.186.80.45/
set ELECTRON_CUSTOM_DIR=peach/notifier/electron-repo

Many thanks in advance.

2017-05-19T17_50_30_285Z-debug.log.txt

Chromedriver exited with error code: null error (MacOS)

For a project, I am trying to run electron-chromedriver but I am getting these errors:

./node_modules/.bin/chromedriver -h                   

dyld: Library not loaded: @rpath/libffmpeg.dylib
  Referenced from: /Users/cxe10/workspace/FluxToolUiTests/node_modules/electron-chromedriver/bin/chromedriver
  Reason: image not found
/Users/cxe10/workspace/FluxToolUiTests/node_modules/electron-chromedriver/chromedriver.js:18
    throw new Error(`Chromedriver exited with error code: ${code}`)
    ^

Error: Chromedriver exited with error code: null
    at ChildProcess.chromeDriverProcess.on.code (/Users/cxe10/workspace/FluxToolUiTests/node_modules/electron-chromedriver/chromedriver.js:18:11)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

MacOSX Version: 10.14.4 (18E226)
Node Version: v10.15.3
Npm Version: 6.4.1
electron-chromedriver version: ^5.0.0-beta.1

Can't install chromedriver

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node ./download-chromedriver.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./download-chromedriver.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./download-chromedriver.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/evan/Documents/Project/MyProject/electron-react-boilerplate.git/npm-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.