Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selenium-side-runner container fail to run .side file #1809

Open
jackchuong opened this issue Apr 10, 2024 · 1 comment
Open

selenium-side-runner container fail to run .side file #1809

jackchuong opened this issue Apr 10, 2024 · 1 comment

Comments

@jackchuong
Copy link

jackchuong commented Apr 10, 2024

Hi all,
I want to try automation test by integrating selenium and gitlab ci.
I don't know Java and I'm selenium newbie , so on my windows 10 , with chrome browser version 123.0.6312.107 (Official Build) (64-bit) , I installed selenium ide extension , recorded a test script , run test script and check it worked ok.
This is my Dockerfile

FROM node

USER root

RUN apt-get update && \
    apt-get install -y wget zip unzip curl libnss3-dev

RUN npm install -g selenium-side-runner chromedriver

WORKDIR /app

ENTRYPOINT ["/usr/bin/sh"]

I run container with above image and exec into it

docker run -dit --name jack -v /home/jack/selenium-side-runner/ewms.side:/app/ewms.side my-selenium-side-runner:latest
docker exec -it jack bash
root@92be2e224158:/app# chromedriver --version
ChromeDriver 123.0.6312.105 (399174dbe6eff0f59de9a6096129c0c827002b3a-refs/branch-heads/6312@{#761})

root@92be2e224158:/app# selenium-side-runner -c "browserName=chrome chromeOptions.args=[disable-infobars, headless, disable-dev-shm-usage]" -o ./reports ewms.side
info: Running test ewms
 FAIL  ../usr/local/lib/node_modules/selenium-side-runner/dist/main.test.js
  Running project ewms
    Running suite Default Suite
      ✕ Running test ewms (308 ms)

  ● Running project ewms › Running suite Default Suite › Running test ewms

    SessionNotCreatedError: session not created: Chrome failed to start: exited normally.
      (session not created: DevToolsActivePort file doesn't exist)
      (The process started from chrome location /root/.cache/selenium/chrome/linux64/123.0.6312.122/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

      at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:521:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:513:13)
      at Executor.execute (node_modules/selenium-webdriver/lib/http.js:446:28)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        0.91 s, estimated 1 s
Ran all test suites within paths "/usr/local/lib/node_modules/selenium-side-runner/dist/main.test.js".
Test results written to: reports/results-2024-04-11T02-51-24.168Z.json


root@92be2e224158:/app# cat reports/results-2024-04-11T02-51-24.168Z.json
{"numFailedTestSuites":1,"numFailedTests":1,"numPassedTestSuites":0,"numPassedTests":0,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":1,"numTotalTests":1,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1712803884642,"success":false,"testResults":[{"assertionResults":[{"ancestorTitles":["Running project ewms","Running suite Default Suite"],"duration":308,"failureDetails":[{"name":"SessionNotCreatedError","remoteStacktrace":"#0 0x563d78cfc873 <unknown>\n#1 0x563d789f28c6 <unknown>\n#2 0x563d78a26d34 <unknown>\n#3 0x563d78a22d3d <unknown>\n#4 0x563d78a6baed <unknown>\n#5 0x563d78a5f343 <unknown>\n#6 0x563d78a30593 <unknown>\n#7 0x563d78a30f5e <unknown>\n#8 0x563d78cc085b <unknown>\n#9 0x563d78cc47b5 <unknown>\n#10 0x563d78cae581 <unknown>\n#11 0x563d78cc5342 <unknown>\n#12 0x563d78c9388f <unknown>\n#13 0x563d78ceb738 <unknown>\n#14 0x563d78ceb90b <unknown>\n#15 0x563d78cfb9c4 <unknown>\n#16 0x7f707cae1134 <unknown>\n"}],"failureMessages":["SessionNotCreatedError: session not created: Chrome failed to start: exited normally.\n  (session not created: DevToolsActivePort file doesn't exist)\n  (The process started from chrome location /root/.cache/selenium/chrome/linux64/123.0.6312.122/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)\n    at Object.throwDecodedError (/usr/local/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/error.js:521:15)\n    at parseHttpResponse (/usr/local/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:513:13)\n    at Executor.execute (/usr/local/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:446:28)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)"],"fullName":"Running project ewms Running suite Default Suite Running test ewms","invocations":1,"location":null,"numPassingAsserts":0,"retryReasons":[],"status":"failed","title":"Running test ewms"}],"endTime":1712803885546,"message":"\u001b[1m\u001b[31m  \u001b[1m● \u001b[22m\u001b[1mRunning project ewms › Running suite Default Suite › Running test ewms\u001b[39m\u001b[22m\n\n    SessionNotCreatedError: session not created: Chrome failed to start: exited normally.\n      (session not created: DevToolsActivePort file doesn't exist)\n      (The process started from chrome location /root/.cache/selenium/chrome/linux64/123.0.6312.122/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)\n\u001b[2m\u001b[22m\n\u001b[2m      \u001b[2mat Object.throwDecodedError (\u001b[22m\u001b[2mnode_modules/selenium-webdriver/lib/error.js\u001b[2m:521:15)\u001b[22m\u001b[2m\u001b[22m\n\u001b[2m      \u001b[2mat parseHttpResponse (\u001b[22m\u001b[2mnode_modules/selenium-webdriver/lib/http.js\u001b[2m:513:13)\u001b[22m\u001b[2m\u001b[22m\n\u001b[2m      \u001b[2mat Executor.execute (\u001b[22m\u001b[2mnode_modules/selenium-webdriver/lib/http.js\u001b[2m:446:28)\u001b[22m\u001b[2m\u001b[22m\n","name":"/usr/local/lib/node_modules/selenium-side-runner/dist/main.test.js","startTime":1712803884690,"status":"failed","summary":""}],"wasInterrupted":false}

I tried with some other selenium-side-runner image on hub.docker.com but still same errors.
How can I make it work ? Please give me some advice , thank you very much.

@jackchuong jackchuong changed the title Cannot run .side file in container - no gui Cannot run .side file inside container - no gui Apr 10, 2024
@jackchuong jackchuong changed the title Cannot run .side file inside container - no gui selenium-side-runner container fail to run .side file Apr 11, 2024
@toddtarsi
Copy link
Contributor

@jackchuong - Ah! Sorry I missed this. Did this ever clear up for you or is it still blocked?

This is a disgusting confession, but I got a ps5 a week ago, and so I have been useless at night for about a week. The blush is off the rose a bit now, so I'll be around more often again 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants