electron / chromedriver Goto Github PK
View Code? Open in Web Editor NEWDownload ChromeDriver for Electron
License: MIT License
Download ChromeDriver for Electron
License: MIT License
I upgraded to electron v27 and chrome driver v118 was found for mac arm. Is there a documented min version of electron for mac arm?
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.)
(this issue was previous reported on electron-electron/electron#25486, but they suggest me to report here)
Start the desktop app normally
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]
Run UI automation test with chromedriver-v9.1.2-win32-x64 for desktop which based on Electron 9.1.2
The latest 25.x release on npm is 25.1.1. https://www.npmjs.com/package/electron-chromedriver?activeTab=versions.
But 25.2.0 was published last week https://github.com/electron/chromedriver/releases/tag/v25.2.0.
Am I missing something or has this one not been published to npm for some reason?
Thanks!
I encountered an issue making an electron build for windows on linux (using the recommended electronuserland/builder:wine
docker container).
Steps to reproduce
electron-chromedriver
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.
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)
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.
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.
Per title, I want to execute logic in the secure isolated context that preload scripts use.
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?
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.
Moving over from electron/electron#7093
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
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
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.
It looks like the latest
tag is accidentally applied to every release. Currently v25.9.8 is tagged as the latest
release which would be installed with npm i electron-chromedriver@latest
. I think it should be v28.0.0 instead.
https://www.npmjs.com/package/electron-chromedriver?activeTab=versions
Currently electron-chromedriver is still in 3.0.0-beta.1 even if Electron 3.0.0 has been released.
I believe that it's because bump is a manual process that takes time to do it.
Can we imagine a script that bump version to package.json and publish electron-chromedriver when a new electron release is published ?
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
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:
`
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
Electron is pegged to v7.1.9 and electron-chromedriver to v7.0.0
electron-chromedriver attempts to download chromdriver v7.0.0 as well, but
https://github.com/electron/electron/releases/tag/v7.1.9
seems there are 7.1.9 binaries of chromedriver which I expected electron-chromedriver to download.
Is this expected behaviour?
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
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?
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:
Here's the npm-debug.log part:
87428 info lifecycle [email protected]install: [email protected]install: unsafe-perm in lifecycle true
87429 verbose lifecycle [email protected]
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_perlinstall: CWD: D:\Desenvolvimento\dotNET\Projetos\Integrador_Fiscal\Codigo\integrador-mfe\node_modules\electron-chromedriver
87431 verbose lifecycle [email protected]
87432 silly lifecycle [email protected]install: Args: [ '/d /s /c', 'node ./download-chromedriver.js' ]install: Returned: code: 1 signal: null
87433 silly lifecycle [email protected]
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! =)
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)
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?
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
?
I am using spectron to simulate a test on Slack as follows:
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}
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!
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!!
[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
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.
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
Hi team,
I am testing an Electron app and there are some libraries I am using:
There are some problems I faced like:
Is there any solution to these issues?
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
?
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}]
Node:-18.16.1
while doing npm install --save-dev electron getting below error
npm WARN deprecated [email protected]: Please use @electron/get moving forward.
npm ERR! code 1
npm ERR! path /Users/2229275/caseys_fe/commerce-oms/node_modules/spectron/node_modules/electron-chromedriver
npm ERR! command failed
npm ERR! command sh -c node ./download-chromedriver.js
npm ERR! /Users/2229275/caseys_fe/commerce-oms/node_modules/spectron/node_modules/electron-chromedriver/download-chromedriver.js:30
npm ERR! if (err != null) throw err
npm ERR! ^
npm ERR!
npm ERR! Error: Failed to find Electron v1.8.0 for darwin-arm64 at https://github.com/electron/electron/releases/download/v1.8.0/chromedriver-v1.8.0-darwin-arm64.zip
npm ERR! at Request. (/Users/2229275/caseys_fe/commerce-oms/node_modules/nugget/index.js:197:61)
npm ERR! at Request.emit (node:events:513:28)
npm ERR! at Request.onRequestResponse (/Users/2229275/caseys_fe/commerce-oms/node_modules/request/request.js:1059:10)
npm ERR! at ClientRequest.emit (node:events:513:28)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:701:27)
npm ERR! at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
npm ERR! at TLSSocket.socketOnData (node:_http_client:542:22)
npm ERR! at TLSSocket.emit (node:events:513:28)
npm ERR! at addChunk (node:internal/streams/readable:324:12)
npm ERR! at readableAddChunk (node:internal/streams/readable:297:9)
npm ERR!
npm ERR! Node.js v18.16.1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/2229275/.npm/_logs/2024-07-17T04_21_09_136Z-debug-0.log
same issue getting when i switched to rosetta 2 from terminal
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.