protractor: WebDriverError: unknown error: cannot determine loading status from unknown error: unhandled inspector error: {"code":-32000,"message":"Inspected target navigated or closed"}
Hi! We started experiencing this problem on latest chrome browser versions
WebDriverError: unknown error: cannot determine loading status
from unknown error: unhandled inspector error: {"code":-32000,"message":"Inspected target navigated or closed"}
(Session info: chrome=78.0.3904.87)
at Object.throwDecodedError (/Users/allamudruk/Projects/support-site-frontend/node_modules/selenium-webdriver/lib/error.js:550:15)
at parseHttpResponse (/Users/allamudruk/Projects/support-site-frontend/node_modules/selenium-webdriver/lib/http.js:542:13)
at Executor.execute (/Users/allamudruk/Projects/support-site-frontend/node_modules/selenium-webdriver/lib/http.js:468:26)
at process._tickCallback (internal/process/next_tick.js:68:7)
- Node Version:
10.13.0
- Protractor Version:
6.0.0
- Angular Version: ``
- Browser(s):
chrome=78.0.3904.87
- Operating System and Version
macOS Mojave 10.14.6
module.exports = {
capabilities: {
browserName: 'chrome',
build: 'cucumber-js-browserstack',
},
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
specs: ['../tests/features/*.feature'],
cucumberOpts: {
require: ['../tests/step_definitions/*.js', '../tests/features/support/*.js'],
tags: false,
profile: false,
'no-source': true,
format: ['json:tests/report/cucumber-report.json', 'rerun:protractor_output/rerun.txt'],
},
theme: 'bootstrap',
jsonFile: path.resolve('tests/report/cucumber-report.json'),
output: path.resolve('tests/report/cucumber-report.html'),
reportSuiteAsScenarios: true,
launchReport: true,
};
onPrepare: async () => {
await browser.waitForAngularEnabled(false);
},
Before({timeout: TIMEOUT}, async () => {
await browser.driver.get(`${browser.logoutUrl}/logout?continue=${browser.baseUrl}`);
await browser.wait(protractor.ExpectedConditions.urlContains(`${browser.baseUrl}/`), 20000);
await browser.driver.get(browser.baseUrl);
await browser.driver.manage().addCookie({
name: 'abcdef',
value: 'true',
domain: '.com',
});
});
It almost always fails on first page load or login step
await formPage.goto()
await loginPage.addUsername(freeUsername);
await loginPage.addUserPassword(password);
return await loginPage.clickLoginButton();
async goto() {
return await browser.get(this.url, this.timeout.xl);
}
async addUsername(username) {
await this.waitForElementAvailable(this.usernameField, this.timeout.l);
await this.usernameField.clear();
return await this.usernameField.sendKeys(username);
}
async addUserPassword(password) {
await this.waitForElementAvailable(this.passwordField, this.timeout.l);
await this.passwordField.clear();
return await this.passwordField.sendKeys(password);
}
async clickLoginButton() {
await this.waitForElementAvailable(this.loginButton, this.timeout.l);
return await this.loginButton.click();
}
async clickElement(locator) {
await browser.executeScript('document.activeElement.blur();');
return await locator.click().then(
async promise => {
return promise;
},
async err => {
console.log('Element is not clickable at point. Other element would receive the click');
}
);
}
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 9
- Comments: 19 (1 by maintainers)
chrome_options.add_argument(‘–disable-site-isolation-trials’)
I had this issue sometimes 3 weeks ago, but now not any more. I remember that an Iframe seems to have been the reason, which I had to look in and did not succeed, because it was in a way not there yet, the loading has slowed down. Because waiting for the iframe to get visible, caused also an error (this or a different; i do not remember) I let my browser sleep for a second, and then wait in a loop for visibility of the iframe and then go on.
Have you had any update regarding this, as we are experiencing the same problem intermittently, having updated to the latest Chrome Browser version (78.0.3904.97).