Selenium: unknown error: session deleted because o

2019-03-30 05:54发布

I get the below error when I run my selenium code on chrome, but it works fine on firefox.

org.openqa.selenium.WebDriverException: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
  (Session info: chrome=51.0.2704.84)
  (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Mac OS X 90.11.4 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 55.19 seconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: ‘mm-MacBook-Pro.local', ip: ’90.0.0.5’, os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.7.0_60'
Session ID: 2618f9cc58558217216fee85102d9a15
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={userDataDir=/var/folders/qg/dycb2gvn04g715_18wlclrrw0000gn/T/.org.chromium.Chromium.CWvi9E}, rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, version=51.0.2704.84, takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, hasTouchScreen=false, applicationCacheEnabled=false, takesScreenshot=true}]

2条回答
来,给爷笑一个
2楼-- · 2019-03-30 06:33

Are you running this using Docker? If so, you may have to increase your shared memory size e.g. shm_size: 1g

查看更多
可以哭但决不认输i
3楼-- · 2019-03-30 06:41

I had the same issue which was caused by a larger background image. Mounting /dev/shm to host system solved the issue.

Docker Compose

  chrome:
    image: selenium/node-chrome:3.14.0
    depends_on:
      - selenium-hub
    environment:
      - HUB_HOST=selenium-hub
      - HUB_PORT=4444
    volumes:
      - /dev/shm:/dev/shm
查看更多
登录 后发表回答