Note: My question was closed earlier, I tried solutions mentioned here - unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed with ChromeDriver Selenium -- added these options - options.addArguments("--disable-dev-shm-usage"); options.addArguments("--no-sandbox"); -- Still I see the issue
Seeing below errors for single test in some scenarios in between when running in selenium grid:
Hooks method1:
org.openqa.selenium.WebDriverException: unknown error: session deleted because of page crash
from tab crashed
(Session info: chrome=80.0.3987.106)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-37JVVAA', ip: '169.254.210.134', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 80.0.3987.106, chrome: {chromedriverVersion: 80.0.3987.106 (f68069574609..., userDataDir: /tmp/.com.google.Chrome.TQ7Z9v}, goog:chromeOptions: {debuggerAddress: localhost:41695}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: none, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webdriver.remote.sessionid: 2ac66b1a001b0b8c6c24da9821b...}
Session ID: 2ac66b1a001b0b8c6c24da9821b8f1e2
Hooksmethod2:
org.openqa.selenium.NoSuchSessionException: invalid session id
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-37JVVAA', ip: '169.254.210.134', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 80.0.3987.106, chrome: {chromedriverVersion: 80.0.3987.106 (f68069574609..., userDataDir: /tmp/.com.google.Chrome.TQ7Z9v}, goog:chromeOptions: {debuggerAddress: localhost:41695}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: none, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webdriver.remote.sessionid: 2ac66b1a001b0b8c6c24da9821b...}
Session ID: 2ac66b1a001b0b8c6c24da9821b8f1e2
Hooksmethod3:
org.openqa.selenium.WebDriverException: Session [2ac66b1a001b0b8c6c24da9821b8f1e2] was terminated due to BROWSER_TIMEOUT
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-37JVVAA', ip: '169.254.210.134', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 80.0.3987.106, chrome: {chromedriverVersion: 80.0.3987.106 (f68069574609..., userDataDir: /tmp/.com.google.Chrome.TQ7Z9v}, goog:chromeOptions: {debuggerAddress: localhost:41695}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: none, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webdriver.remote.sessionid: 2ac66b1a001b0b8c6c24da9821b...}
Session ID: 2ac66b1a001b0b8c6c24da9821b8f1e2
We have 3 sequential methods in hooks - looks like first issue is the root cause, but am not sure.
Following are the options used for driver:
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
options.addArguments("--disable-infobars");
options.addArguments("--disable-extensions");
options.addArguments("chrome.switches", "--disable-extensions");
options.addArguments("--disable-gpu");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--no-sandbox");
options.addArguments("--disable-notifications");
options.addArguments("--disable-popup-blocking");
options.addArguments("enable-automation");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--disable-browser-side-navigation");
options.addArguments("--dns-prefetch-disable");
options.setPageLoadStrategy(PageLoadStrategy.NONE);
options.setExperimentalOption("useAutomationExtension", false);
driver = new RemoteWebDriver(new URL(AWS_URL), options);
Following are the overrides we used in kubernetest yaml file:
chrome:
## Enable the creation of a node-chrome pod
enabled: true
replicas: 65
javaOpts: "-Xmx1024m -XX:+UseSerialGC"
resources:
limits:
cpu: ".5"
memory: "1000Mi"
env:
sessionTimeout: 60
hub:
env:
sessionTimeout: 60
##gridBrowserTimeout
gridBrowserTimeout: 240
livenessTimeout: 15
readinessTimeout: 15
gridJettyMaxThreads: 1024
gridTimeout: 60
gridCleanUpCycle: 5000
gridNewSessionWaitTimeout: -1
javaOpts: "-Xmx1024m -XX:+UseSerialGC"
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
resources:
limits:
cpu: "3"
memory: "2048Mi"
Please help