0

I am trying to run this file in a docker container (I also leave the dockerfile after the error) and I can't figure out the reason for this error.

Error:

$ node main.js
Webdriver started
/Discord-Screenshare/node_modules/selenium-webdriver/remote/index.js:248
                reject(Error(e.message))
                       ^

Error: Server terminated early with status 127
    at /Discord-Screenshare/node_modules/selenium-webdriver/remote/index.js:248:24
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Node.js v17.9.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn start' returned a non-zero code: 1

Dockerfile:

FROM ubuntu:20.04

# Install dependencies
RUN apt-get update
RUN apt-get install -y curl git unzip wget
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN curl -fsSL https://deb.nodesource.com/setup_17.x | bash -
RUN apt-get install -y nodejs
RUN npm i -g yarn

# Clone Repo
RUN git clone https://github.com/MainSilent/Discord-Screenshare.git
WORKDIR Discord-Screenshare
RUN yarn install
COPY .env .

# Install chrome 88
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

# Install chromedriver 88
RUN wget https://chromedriver.storage.googleapis.com/88.0.4324.27/chromedriver_linux64.zip
RUN unzip chromedriver_linux64.zip
RUN mv chromedriver /bin

# Start Bot
RUN yarn start

I tried installing the latest version of google chrome drivers for linux and also checked if selenium was at the latest version.

vicco
  • 1
  • 2
  • https://stackoverflow.com/questions/36429436/how-do-i-solve-server-terminated-early-with-status-127-when-running-node-js-on – KoVadim Nov 05 '22 at 11:36

0 Answers0