У меня есть тесты E2E в контейнере docker. После пятничного обновления селен / узел- chrome он больше не будет работать. Я пытался использовать более старые версии selenium / node- chrome, но это не сработало. У меня очень мало опыта работы с docker контейнерами и т. Д. c.
Google Chrome 80.0.3987.106 <- информация получила команду google-chrome --version chromedriver-80.0.3987.106 <- Информация получена из / opt / selenium / folder. </p>
Вот как выглядит мой Dockerfile:
FROM selenium/node-chrome:3.141.59
ENV NODE_VERSION 12.14.1
USER root
RUN apt-get -qqy update \
&& apt-get -qqy --no-install-recommends install xz-utils \
&& apt-get -qqy autoremove \
&& apt-get -qqy clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
&& ARCH= \
&& dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& set -ex \
&& for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
FD3A5288F042B6850C66B31F09FE44734EB7990E \
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
B9AE9905FFD7803F25714661B63B535A4C206CA9 \
77984A986EBC2AA786BC0F66B01FBB92821C587A \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
4ED778F539E3634C779C87C6D7062848A1AB005C \
A48C2BEE680E841632CD4E44F07496B3EB3C1762 \
B9E2F5981AA6E0CD28160D9FF13993A75599653C \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& mkdir /src \
&& chown seluser /src
USER seluser
WORKDIR /src
COPY ./package-lock.json ./package.json ./
RUN npm install && \
npm run wd:update
COPY . ./
CMD ["npm", "test"]
Сборка выглядит нормально go без проблем, но когда при попытке запустить тесты я получаю следующее сообщение об ошибке:
> protractor protractor.conf.js
[13:51:33] I/launcher - Running 1 instances of WebDriver
[13:51:33] I/local - Starting selenium standalone server...
[13:51:35] I/local - Selenium standalone server started at http://XXX.XX.X.X:51473/wd/hub
[13:51:36] E/launcher - unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '8bc3b606ae46', ip: 'XXX.XX.X.X', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '1.8.0_242'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5584b6f867a9 <unknown>
[13:51:36] E/launcher - WebDriverError: unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '8bc3b606ae46', ip: 'XXX.XX.X.X', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '1.8.0_242'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5584b6f867a9 <unknown>
at Object.checkLegacyResponse (/src/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/src/node_modules/selenium-webdriver/lib/http.js:509:13)
at /src/node_modules/selenium-webdriver/lib/http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:97:5)
From: Task: WebDriver.createSession()
at Function.createSession (/src/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/src/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/src/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/src/node_modules/selenium-webdriver/index.js:626:16)
at Local.getNewDriver (/src/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/src/node_modules/protractor/built/runner.js:195:43)
at /src/node_modules/protractor/built/runner.js:339:29
at _fulfilled (/src/node_modules/q/q.js:834:54)
at /src/node_modules/q/q.js:863:30
at Promise.promise.promiseDispatch (/src/node_modules/q/q.js:796:13)
[13:51:36] E/launcher - Process exited with error code 199
npm ERR! Test failed. See above for more details.