RobCherry / docker-chromedriver

Docker container for creating ChromeDriver servers
99 stars 74 forks source link

Session deleted because of page crash #9

Open saschak094 opened 6 years ago

saschak094 commented 6 years ago

Getting the following stacktrace when I try to execute nightwatch tests

INFO Got sessionId from selenium 60486302460536b6afcc4bd6f0d6074b
LOG     → Completed command pause (1004 ms)
INFO Request: POST http://chromedriver:4444/session/60486302460536b6afcc4bd6f0d6074b/url
 - data:  {"url":"http://frontend:80"}
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":28}
INFO Response 200 POST http://chromedriver:4444/session/60486302460536b6afcc4bd6f0d6074b/url (214ms) { sessionId: '60486302460536b6afcc4bd6f0d6074b',
  status: 13,
  value: { message: 'unknown error: session deleted because of page crash\nfrom tab crashed\n  (Session info: chrome=63.0.3239.84)\n  (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.9.60-linuxkit-aufs x86_64)' } }
LOG     → Completed command url (217 ms)
INFO Request: GET http://chromedriver:4444/session/60486302460536b6afcc4bd6f0d6074b/screenshot
 - data:
 - headers:  {"Accept":"application/json"}
INFO Response 200 GET http://chromedriver:4444/session/60486302460536b6afcc4bd6f0d6074b/screenshot (3ms) { sessionId: '60486302460536b6afcc4bd6f0d6074b',
  status: 6,
  value: { message: 'no such session\n  (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.9.60-linuxkit-aufs x86_64)' } }
LOG     → Completed command screenshot (5 ms)
INFO Request: POST http://chromedriver:4444/session/60486302460536b6afcc4bd6f0d6074b/elements
 - data:  {"using":"css selector","value":"body"}
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":39}
INFO Response 200 POST http://chromedriver:4444/session/60486302460536b6afcc4bd6f0d6074b/elements (5ms) { sessionId: '60486302460536b6afcc4bd6f0d6074b',
  status: 6,
  value: { message: 'no such session\n  (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.9.60-linuxkit-aufs x86_64)' } }

I already increased the shm_size of docker to 2gb but the error still persists.

RobCherry commented 6 years ago

Did you check the logs at /var/logs/supervisor/chromedriver.log in the docker container? If those are not helpful, you can try increasing log verbosity (see https://github.com/RobCherry/docker-chromedriver/issues/7#issuecomment-267975414 for info on how to do that).

saschak094 commented 6 years ago

There you go chromedriver.txt

RobCherry commented 6 years ago

This is the problem:

[0126/095231.841233:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly [15.579][INFO]: RESPONSE Navigate unknown error: session deleted because of page crash from tab crashed

I don't have a particularly great solution for you, it appears to be tied to https://github.com/RobCherry/docker-chromedriver/commit/84d8a7e50c369a5a5a52f6d834bc701b5b03f964. You can attempt forking and reverting that change to see if that fixes it.

saschak094 commented 6 years ago

Reverted to Commit 5f89eff267f8fdaaebc6ff444810d385b14c355f, still receiving the same error.