Hi All (1st post)
We run Nightwatch via Jenkins using a Ubuntu docker image. The nightwatch Jenkins build pipeline does an 'npm i' to install Nightwatch on the docker image. I'll add the Dockerfile at the bottom for reference. Historically this has worked very well whilst Chrome needed Chromedriver <= 79.
However I have recently tried to build a new image, removing a dependency on docker-hub. Only to discover that both my new image and the original, during 'npm i' throw an error when trying to install chromedriver >=80
Where chromedriver is defined in package.json
"devDependencies": { "chromedriver": "^83.0.0",
Both images will complete the '
npm i' and install the chrome driver providing the driver version is 79 or lower.
Any help would be gratefully received as I think I've exhausted everything I can think of and this is a potential showstopper for us to continue using Nightwatch if we can't test the latest.
FYI for security reasons pulling a third-party image from docker-hub would not be allowed.
Thanks
Brian
Jenkins output from the build pipeline
09:55:21 + npm i
09:55:29
09:55:29 > chromedriver@80.0.2 install /home/jenkins/workspace/watch-signin_NT-312_docker_image/node_modules/chromedriver
09:55:29 > node install.js
09:55:29
09:55:29 internal/util.js:209
09:55:29 throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
09:55:29 ^
09:55:29
09:55:29 TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
09:55:29 at promisify (internal/util.js:209:11)
09:55:29 at Object.<anonymous> (/home/jenkins/workspace/watch-signin_NT-312_docker_image/node_modules/extract-zip/index.js:11:18)
09:55:29 at Module._compile (module.js:652:30)
09:55:29 at Object.Module._extensions..js (module.js:663:10)
09:55:29 at Module.load (module.js:565:32)
09:55:29 at tryModuleLoad (module.js:505:12)
09:55:29 at Function.Module._load (module.js:497:3)
09:55:29 at Module.require (module.js:596:17)
09:55:29 at require (internal/module.js:11:18)
09:55:29 at Object.<anonymous> (/home/jenkins/workspace/watch-signin_NT-312_docker_image/node_modules/chromedriver/install.js:14:20)
09:55:29 npm WARN eslint-plugin-prettier@3.0.1 requires a peer of prettier@>= 1.13.0 but none is installed. You must install peer dependencies yourself.
09:55:29 npm WARN nightwatch-signin@0.1.0 No repository field.
09:55:29
09:55:29 npm ERR! code ELIFECYCLE
09:55:29 npm ERR! errno 1
09:55:29 npm ERR! chromedriver@80.0.2 install: `node install.js`
09:55:29 npm ERR! Exit status 1
09:55:29 npm ERR!
09:55:29 npm ERR! Failed at the chromedriver@80.0.2 install script.
09:55:29 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
09:55:29
09:55:29 npm ERR! A complete log of this run can be found in:
09:55:29 npm ERR! /home/jenkins/.npm/_logs/2020-06-29T08_55_29_853Z-debug.log
Post stage
[Pipeline] echo
09:55:30 Failure
Dockerfile build by Jenkins
echo "FROM ubuntu:18.04
RUN apt update -y
RUN apt-get install -y npm nodejs curl wget jq git unzip zip maven default-jdk firefox libpython-dev python-dev python-pip
RUN export PATH=/usr/local/bin:/usr/bin:$PATH
RUN npm install -g n n...@6.4.1 --unsafe-perm
RUN apt-get update
RUN apt-get -y install google-chrome-stable
RUN pip install awscli
# RUN npm install -g n n...@6.4.1 --unsafe-perm
RUN npm install -g npm@latest
RUN mkdir /root/.ssh
RUN ln -s /run/secrets/host_ssh_key /root/.ssh/id_rsa
RUN touch /root/.ssh/known_hosts
RUN groupadd --gid 1001 jenkins && useradd -G jenkins -m -N --uid 1001 jenkins
USER jenkins
" > Dockerfile