webdriverio-community / node-geckodriver Goto Github PK
View Code? Open in Web Editor NEWMozilla's Geckodriver for Node.js
License: Mozilla Public License 2.0
Mozilla's Geckodriver for Node.js
License: Mozilla Public License 2.0
UnknownCommandError: POST /session/f4d187e1-c7f7-4c2f-b56d-5284af8fac88/moveto did not match a known command
at WebDriverError (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\error.js:27:5)
at UnknownCommandError (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\error.js:296:5)
at Object.throwDecodedError (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\error.js:477:11)
at parseHttpResponse (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\http.js:499:15)
at doSend.then.response (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\http.js:440:13)
at process.tickCallback (internal/process/next_tick.js:103:7)
From: Task: mouseMove
at thenableWebDriverProxy.schedule (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\webdriver.js:816:17)
at actions.map.action (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\actions.js:124:23)
at Array.map (native)
at C:\UI_Automation_New\node_modules\selenium-webdriver\lib\actions.js:123:29
at TaskQueue.execute (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at asyncRun (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:2860:25)
at C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:676:7
at process.tickCallback (internal/process/next_tick.js:103:7)
From: Task: ActionSequence.perform
at ActionSequence.perform (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\actions.js:122:33)
at C:\UI_Automation_New\page-objects\addPerson_page.js:56:78
at ManagedPromise.invokeCallback (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:1366:14)
at TaskQueue.execute_ (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:2970:14)
at TaskQueue.executeNext_ (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:2953:27)
at asyncRun (C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:2813:27)
at C:\UI_Automation_New\node_modules\selenium-webdriver\lib\promise.js:676:7
at process._tickCallback (internal/process/next_tick.js:103:7)
Please update this for the latest geckodriver
After the installation does not automatically extract the zip package, We need to manually extract to use.
Hi folks, my tests were running locally against my platform this past Friday. But now on Tuesday they are no longer executing.
Error: Error: Failed to download binary (statusCode 404): Not Found
at download (file:////test-root//node_modules/geckodriver/src/install.ts:58:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async Promise.all (index 0)
at async Launcher.run (file:////test-root//node_modules/@wdio/cli/build/launcher.js:102:13)
at async Module.run (file:////test-root//node_modules/@wdio/cli/build/run.js:64:20)
Error: Failed to download binary (statusCode 404): Not Found
at download (file:////test-root//node_modules/geckodriver/src/install.ts:58:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async Promise.all (index 0)
at async Launcher.run (file:////test-root//node_modules/@wdio/cli/build/launcher.js:102:13)
at async Module.run (file:////test-root//node_modules/@wdio/cli/build/run.js:64:20)
2024-01-03T05:01:22.930Z INFO @wdio/cli:launcher: Run onPrepare hook
2024-01-03T05:01:22.931Z INFO @wdio/utils: Setting up browser driver for: firefox@stable
2024-01-03T05:01:22.931Z INFO @wdio/utils: Setting up browser binaries for: firefox@stable
2024-01-03T05:01:25.369Z INFO geckodriver: Detected Geckodriver v0.34.0 to be latest
2024-01-03T05:01:25.370Z INFO geckodriver: Downloading Geckodriver from https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux-aarch64.tar.gz
2024-01-03T05:01:25.576Z INFO @wdio/local-runner: Shutting down spawned worker
2024-01-03T05:01:25.827Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
Last release of geckodriver is 33.0 : https://github.com/mozilla/geckodriver/releases
npm i --save-dev geckodriver
geckodriver to be downloaded and installed
pm ERR! path /Users/.../src/.../node_modules/geckodriver/bin/geckodriver
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/.../src/.../node_modules/geckodriver/bin/geckodriver'
npm ERR! enoent This is related to npm not being able to find a file.
chmod
Geckodriver 0.22 was released 2018-09-16: https://github.com/mozilla/geckodriver/releases
Hi, Version 1.10.0 started to use new tar package, what started to require Node.js 6+
Previously this package was Node.js 4x compatible.
Legal policy at work requires a valid LICENSE file for importing external libraries. Love to leverage this library if we can add one. Perhaps MIT for popularity https://github.com/blog/1964-open-source-license-usage-on-github-com :)
node:9.11.2
protractor:5.4.1
geckodriver:0.23.0
Firefox : 63.0.1
I am using protractor-cucumber with the above versions for test suit.while running the test in firefox browser ,
when perform below the actions.
browser.actions().mouseMove().perform();
browser.actions().click(protractor.button.RIGHT).perform();
nothing to be happend..
Hi :)
I noticed you updated the code five days ago to use the latest geckodriver. However, the version in NPM hasn't been updated, so it downloads the 0.10.0 version instead.
Cheers! :)
So that it shows up on https://www.npmjs.com/package/geckodriver
This was just released:
https://github.com/mozilla/geckodriver/releases/tag/v0.32.0
It supports Linux aarch64 architecture, which does not seem to be currently detectable by this node-geckodriver package.
Can you make the Linux aarch64 architecture-compatible tar downloadable via this package?
It's located here: https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux-aarch64.tar.gz
Note this is the earliest version available for the Linux aarch64, if you want to throw an error message if an earlier version is requested, that would be nice.
I see with #69 that this package was updated for the security advisory. Could you please release a new version so npm can easily pick it up?
Thanks!
The changes to tsconfig.json in d335c34 cause the resulting index.d.ts file in the build to break in a strict type checking environment with the following error message: 'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`.ts(1452)
I checked out the repo and attempted to build geckodriver with tsconfig.json set with {"module": "ESNext", "moduleResolution": "Node"}
(i.e., reverting the change to that file in d335c34) - this is the resulting diff of the output:
diff [email protected]/dist/index.d.ts node-geckodriver@HEAD/dist/index.d.ts
1c1
< /// <reference types="node" resolution-mode="require"/>
---
> /// <reference types="node" />
diff [email protected]/dist/cjs/index.d.ts node-geckodriver@HEAD/dist/cjs/index.d.ts
1d0
< export {};
diff [email protected]/dist/cjs/index.js node-geckodriver@HEAD/dist/cjs/index.js
1,2d0
< "use strict";
< Object.defineProperty(exports, "__esModule", { value: true });
So, this definitely fixes index.d.ts, but also makes changes to cjs/index.js and cjs/index.d.ts that I can't evaluate (though those removed lines didn't exist in the cjs files in release 4.2.1, for what it's worth)
Would it make sense to revert those tsconfig.json changes?
got, used by node-geckodriver for the http requests, does not appear to work when behind a proxy, without code change - https://www.npmjs.com/package/got#proxies
Ideally it should support proxy settings via environment variables such as https://www.npmjs.com/package/request#controlling-proxy-behaviour-using-environment-variables, but that doesn't seam to be an option.
tar 6.1.0 has a high vulnerability and should be upgraded to >= 6.1.2
see:
https://npmjs.com/advisories/1770
https://npmjs.com/advisories/1771
Producible with both v1.13.* and v1.14.*. Last version to work correctly is v1.12.2.
Possibly related to #53.
#29 didn't work quite as well as I thought at first. It does make geckodriver.exe available on the PATH, and I thought that enabled selenium-webdriver to successfully find and run it in my tests last week.
But I tested again this morning, and selenium-webdriver now silently fails after I install geckodriver via this NPM package. So perhaps I made a mistake last week when running tests on my modified version of this package.
In MozillaBuild, running geckodriver.exe complains:
$ geckodriver.exe
bash: /c/Users/myk/AppData/Roaming/npm/geckodriver.exe: /bin/sh: bad interpreter: Bad file number
In a standard cmd.exe terminal, running geckodriver.exe complains:
C:\Users\myk\project-dir>geckodriver.exe
This version of C:\Users\myk\AppData\Roaming\npm\geckodriver.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
It also displays an Unsupported 16-Bit Application
dialog window with the message:
The program or feature "??\C:\Users\myk\AppData\Roaming\npm\geckodriver.exe" cannot start or run due to incompatibility with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available."
I suspect this is due to the .exe file extension overriding the shebang line in the Node script that NPM installs as geckodriver.exe, and we'll need a different solution for the problem, perhaps copying the actual geckodriver.exe file to a location in the PATH in the postinstall.js script.
We're seeing this postinstall issues with version 2
Downloading geckodriver... node_modules/geckodriver/node_modules/got/dist/source/create.js:121
throw error;
^
TypeError: Expected the `options.agent` properties to be `http`, `https` or `http2`, got `_events`
at normalizeArguments (node_modules/geckodriver/node_modules/got/dist/source/core/index.js:679:27)
Seems to be related to https://github.com/vladikoff/node-geckodriver/blob/main/index.js#L44
Can this be wrapped in a try/catch and attempt to keep going with installation on proxy set error?
The got library that is used to download the binary does not seem to respect http_proxy or https_proxy meaning that this package cannot be downloaded behind our corporate proxy.
I don't know if this should be considered a geckodriver problem or a chromedriver problem or whatever, but I guess the behavior should be consistent. I'm using javascript bindings, maybe its even in them ...
In geckodriver the caret will jump to the end on an input each time sendKeys
is called (before actually sending the keys). In chromedriver the caret will be at the start of the input and it will stay in one place between calls.
Workaround: start key sequence with something the puts the caret where you expect it.
Node v8.9.4 during npm install
This just started happening this AM.
I tried on several machines but always get this error:
$ npm -g install geckodriver
/usr/bin/geckodriver -> /usr/lib/node_modules/geckodriver/bin/geckodriver
> [email protected] postinstall /usr/lib/node_modules/geckodriver
> node index.js
Downloading geckodriver... events.js:165
throw er; // Unhandled 'error' event
^
Error: EACCES: permission denied, open 'geckodriver.tar.gz'
Emitted 'error' event at:
at WriteStream.onerror (/usr/lib/node_modules/geckodriver/node_modules/readable-stream/lib/_stream_readable.js:640:52)
at WriteStream.emit (events.js:180:13)
at fs.open (fs.js:2224:12)
at FSReqWrap.oncomplete (fs.js:153:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
a vuln has been found: https://nvd.nist.gov/vuln/detail/CVE-2018-20834
can you update your dependencies ?
https://github.com/vladikoff/node-geckodriver/blob/master/package.json#L31
Trying to install latest version throws an error:
$ npm install geckodriver
npm WARN [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path /Users/efrain/Documents/automation/kp/js-automation/ylva/node_modules/geckodriver/bin/geckodriver
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/efrain/Documents/automation/kp/js-automation/ylva/node_modules/geckodriver/bin/geckodriver'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/efrain/.npm/_logs/2019-02-15T23_27_38_892Z-debug.log
Installing the previous version works fine.
$ npm install [email protected]
> [email protected] postinstall /Users/efrain/Documents/automation/kp/js-automation/ylva/node_modules/geckodriver
> node index.js
Downloading geckodriver... Extracting... Complete.
npm WARN [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
+ [email protected]
added 2 packages from 9 contributors in 14.268s
$ npm ls geckodriver
[email protected] /Users/efrain/Documents/automation/kp/js-automation/ylva
└── [email protected]
EDIT: Adding OS
Attempting to install on both Linux (Redhat) with Node v8.11.3 and npm v3.10.10
Mac OS 10.14.3 - Node v8.14.0, npm 6.4.1
Unzipper uses deprecated module fstream
(https://www.npmjs.com/package/fstream ZJONSSON/node-unzipper#261), therefore we should replace it with jszip.
I will create a pull request to fix this deprecated dependency.
What is missing before a new release making available the new 0.15.0 release of the geckodriver?
Do you need help with anything before cutting a new release?
Hello,
I'm facing an issue since I updated my WebDriver (and co) version from 8.11.2
to 8.16.11
.
When running my tests in firefox I often get this error : FetchError: request to https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/geckodriver/Cargo.toml failed, reason: Client network socket disconnected before secure TLS connection was established
.
My CI fails very often because of this, but sometimes it's good.
Here is the complete error stack :
FetchError: FetchError: request to https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/geckodriver/Cargo.toml failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (file:///xxxx/repo/main/node_modules/geckodriver/node_modules/node-fetch/src/index.js:108:11)
at ClientRequest.emit (node:events:517:28)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:517:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
FetchError: request to https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/geckodriver/Cargo.toml failed, reason: Client network socket disconnected before secure TLS connection was established
at ClientRequest.<anonymous> (file:///xxxxx/repo/main/node_modules/geckodriver/node_modules/node-fetch/src/index.js:108:11)
at ClientRequest.emit (node:events:517:28)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:517:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET',
erroredSysCall: undefined
}
Error: exit status 123
Thank you for your help
Installing the latest version of node-geckodriver
fails in the install step.
STR:
npm init
npm i geckodriver --save
Expected:
Geckodriver dependency installs successfully.
Actual:
Installation fails with the following error:
npm ERR! code 1
npm ERR! path /tmp/geckotest/node_modules/geckodriver
npm ERR! command failed
npm ERR! command sh -c node index.js
Verbose log (including version info):
296 verbose stack Error: command failed
296 verbose stack at ChildProcess.<anonymous> (/snap/node/6488/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
296 verbose stack at ChildProcess.emit (node:events:527:28)
296 verbose stack at maybeClose (node:internal/child_process:1092:16)
296 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
297 verbose pkgid [email protected]
298 verbose cwd /tmp/geckotest
299 verbose Linux 5.15.0-41-generic
300 verbose node v16.16.0
301 verbose npm v8.11.0
302 error code 1
303 error path /tmp/geckotest/node_modules/geckodriver
304 error command failed
305 error command sh -c node index.js
306 verbose exit 1
307 timing npm Completed in 2310ms
308 verbose unfinished npm timer reify 1658146046761
309 verbose unfinished npm timer reify:build 1658146048856
310 verbose unfinished npm timer build 1658146048856
311 verbose unfinished npm timer build:deps 1658146048856
312 verbose unfinished npm timer build:run:postinstall 1658146048859
313 verbose unfinished npm timer build:run:postinstall:node_modules/geckodriver 1658146048859
314 verbose code 1
When I check out https://github.com/vladikoff/node-geckodriver/ and download geckodriver via the install step it works just fine.
Hi, @vladikoff, I'd like to report a vulnerability introduced by package [email protected]:
I noticed that a vulnerability is introduced in [email protected]:
Vulnerability SNYK-JS-TAR-1536758 affects package tar (versions:<4.4.16,>=5.0.0 <5.0.8,>=6.0.0 <6.1.4): https://snyk.io/vuln/SNYK-JS-TAR-1536758
The above vulnerable package is referenced by [email protected] via:
[email protected] ➔ [email protected]
Since [email protected] (6,876 downloads per week) is referenced by 166 downstream projects (e.g., @bigtest/server 0.24.2 (latest version), @bigtest/cli 0.19.0 (latest version), @bigtest/webdriver 0.8.4 (latest version), bigtest 0.14.3 (latest version), @justindiveshanchetty/automation_framework 1.0.27 (latest version)), the vulnerability SNYK-JS-TAR-1536758 can be propagated into these downstream projects and expose security threats to them via the following package dependency paths:
(1)@bigtest/[email protected] ➔ @bigtest/[email protected] ➔ @bigtest/[email protected] ➔ [email protected] ➔ [email protected]
(2)@faltest/[email protected] ➔ @faltest/[email protected] ➔ [email protected] ➔ [email protected]
......
If [email protected].* removes the vulnerable package from the above version, then its fixed version can help downstream users decrease their pain.
Given the large number of downstream users, could you help update your package to remove the vulnerability from [email protected] ?
In [email protected], maybe you can kindly try to perform the following upgrade(not crossing major version) :
tar 6.1.2 ➔ 6.1.4
;
Note:
[email protected](>=6.1.4) has fixed the vulnerability SNYK-JS-TAR-1536758.
Thank you for your attention to this issue and welcome to share other ways to resolve the issue.^_^
Hello, people!
It seems like offered environment variables are not taken into consideration during an installation of the driver.
For instance, in PowerShell $env:GECKODRIVER_VERSION="0.30.0"; npm install geckodriver
still installs the latest version.
Same for $env:GECKODRIVER_FILEPATH="C:/Jenkins/geckodriver-v0.30.0-win64.zip"; npm install geckodriver
.
So what's the point of those variables? Or I'm doing it wrong?
I'm troubleshooting an issue that I got in generating Nightwatch e2e with Angular CLI via @nightwatch/schematics. The scripts there cannot find geckodriver
. I've managed to address this issue by downgrading node-geckodriver to version 3.
While trying to pinpoint the source of the issue, I've noticed the node_modules/.bin
is missing geckodrive
script when version 4 is installed. I installed v3 and v4 as sole dependencies of in two separate packages. The resulting files:
$ ls v3/node_modules/.bin
geckodriver mkdirp
$ ls v4/node_modules/.bin
mkdirp node-which rimraf
My test repository: https://github.com/marcin-wosinek/geckodriver-test.
I'm on MacOS, I'm using npm 9.5.0 and node v18.15.0
Hi All,
Here is a typescript definition for the library.
To use, add the contents to the file typings/geckodriver.d.ts
at the root of your project (next to package.json
)
declare module "geckodriver" {
import { ChildProcess } from 'node:child_process';
global {
namespace NodeJS {
interface ProcessEnv {
PATH: string
}
}
}
/**
* @summary
* Version of geckodriver installed
*/
export const version: string
/**
* @summary
* The install path and name of the geckodriver.
*
* @example
* // windows
* "./node_modules/geckodriver/bin/geckodriver.exe"
*
* @example
* // non-windows
* "./node_modules/geckodriver/bin/geckodriver"
*/
export const path: string
/**
* @summary
* The childProcess that starting the geckodriver executable returns.
*
* This value is defined only when `start` has been called.
*/
export const defaultInstance: ChildProcess | undefined
/**
* @summary
* Start the geckodriver executable, returning the `defaultInstance`, which is a `childProcess`
*
* @param args Arguments used for the `geckodriver` executable.
*
* @example ["-p", "4000", "-h", "127.0.0.1"]
*
* @description
* USAGE:
* geckodriver [FLAGS] [OPTIONS]
*
* FLAGS:
* - `--connect-existing` - Connect to an existing Firefox instance
* - `-h`, `--help` - Prints this message
* - `--jsdebugger` - Attach browser toolbox debugger for Firefox
* - `-v` - Log level verbosity (-v for debug and -vv for trace level)
* - `-V`, `--version` - Prints version and copying information
*
* OPTIONS:
* - `--android-storage <ANDROID_STORAGE>` - Selects storage location to be used for test data. [default: auto] [possible values: auto, app, internal, sdcard]
* - `-b`, `--binary <BINARY>` - Path to the Firefox binary
* - `--log <LEVEL>` - Set Gecko log level [possible values: fatal, error, warn, info, config, debug, trace]
* - `--marionette-host <HOST>` - Host to use to connect to Gecko [default: 127.0.0.1]
* - `--marionette-port <PORT ` - Port to use to connect to Gecko [default: system-allocated port]
* - `--host <HOST>` - Host IP to use for WebDriver server [default: 127.0.0.1]
* - `-p`, `--port <PORT>` - Port to use for WebDriver server [default: 4444]
*/
export function start(...args: string[]): ChildProcess
/**
* @summary
* Kills the geckodriver instance
*/
export function stop(): void
}
Your docs say to use the binary in /bin/, but the path returned by the module is different, and doesn't lead to anything. I'm basing this expectation on my understanding of how chromedriver works.
For example, if I open up a node process to investigate:
> var geckodriver = require('geckodriver');
undefined
> geckodriver
{ path: '/Sites/vue2/node_modules/geckodriver/geckodriver',
version: '0.14',
start: [Function],
stop: [Function] }
So when I try to pass require('geckodriver').path
to Selenium, it can't find the executable.
Do you know what it would take for this module to be automatically picked up by selenium?
I was originally downloading geckodriver and then renaming it to wires which was the name for geckodriver / marionette at one point (or that's the impression I get). The advantage of this is that I didn't need to define a path for geckodriver.
Using geckodriver
1.12.2 and Firefox 57, a subsequent call to WebElement.takeScreenshot()
for the same element responds with a different image if the appearance of the element changed (expected). However, if I update either geckodriver
or Firefox to any newer version, it seems like the element's screenshot is cached and the same image is returned again after the element's appearance changed.
npm install --save-dev geckodriver is failing with below error
PS D:\cloud-lab\test> npm install --save-dev geckodriver
> [email protected] postinstall D:\cloud-lab\test\node_modules\geckodriver
> node index.js
Downloading geckodriver...
events.js:174
throw er; // Unhandled 'error' event
^
RequestError: connect ETIMEDOUT 13.250.177.223:443
at ClientRequest.<anonymous> (D:\cloud-lab\test\node_modules\got\index.js:69:21)
at Object.onceWrapper (events.js:286:20)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at EventEmitter.emit (events.js:198:13)
at ClientRequest.<anonymous> (D:\cloud-lab\test\node_modules\got\index.js:69:7)
at Object.onceWrapper (events.js:286:20)
[... lines matching original stack trace ...]
at process._tickCallback (internal/process/next_tick.js:63:19)
npm WARN enoent ENOENT: no such file or directory, open 'D:\cloud-lab\test\package.json'
npm WARN test No description
npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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:
npm ERR! C:\Users\srmuppal\AppData\Roaming\npm-cache\_logs\2019-11-08T13_36_11_494Z-debug.log
Steps to reproduce:
mkdir reproduce-eisgit
cd reproduce-eisgit/
npm install vladikoff/node-geckodriver --save-dev
ls -l node_modules/geckodriver/.git/ # shows a .git-folder being included
npm install
Fails with:
npm ERR! path /Users/motin/tmp/reproduce-eisgit/node_modules/geckodriver
npm ERR! code EISGIT
npm ERR! git /Users/motin/tmp/reproduce-eisgit/node_modules/geckodriver: Appears to be a git repo or submodule.
npm ERR! git /Users/motin/tmp/reproduce-eisgit/node_modules/geckodriver
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
Added gulp-galenframework 2.3.6 to packages.json in Visual Studio 2017 which triggered npm.
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Web\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Web\External\npm.CMD" install
> [email protected] postinstall C:\Users\USER\source\repos\Appliction\Application.Tests\node_modules\geckodriver
> node index.js
C:\Users\USER\source\repos\Application\Application.Tests\node_modules\tar\lib\pack.js:32
const EOF = Buffer.alloc(1024)
^
TypeError: Buffer.alloc is not a function
at Object.<anonymous> (C:\Users\USER\source\repos\Application\Application.Tests\node_modules\tar\lib\pack.js:32:20)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\Users\USER\source\repos\Application\Application.Tests\node_modules\tar\lib\create.js:6:14)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
npm WARN EPACKAGEJSON [email protected] No description
npm WARN EPACKAGEJSON [email protected] No repository field.
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Web\\External\\Node.exe" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.4.1
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node index.js'.
npm ERR! This is most likely a problem with the geckodriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get their info via:
npm ERR! npm owner ls geckodriver
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\USER\source\repos\Application\Application.Tests\npm-debug.log
npm-debug.log available upon request.
Platform: Windows 10
NodeJS version: 8.9.3
npm version: 5.5.1
Gulp version: 3.9.1
Java version: 8 Update 151
The code at
node-geckodriver/src/constants.ts
Line 3 in 61bb323
Cargo.toml
file on mozilla-central. We are not releasing geckodriver from this repository and that file contains information that hasn't been released yet.
Is there a reason why this check is done, and not GitHub is used where we actually release geckodriver from? The URL would be: https://github.com/mozilla/geckodriver/blob/release/Cargo.toml.
I'm asking because we are seeing a huge amount of requests for that file since yesterday, which negatively impacts our performance for tooling.
Thanks.
When we try to download the Geckodriver from a local CDN, we have a custom certificate on that CDN. Unfortunately the cafile (https://docs.npmjs.com/cli/v6/using-npm/config#cafile) setting from npmrc is not checked and used while downloading.
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.