WebDriverError: unknown error: cannot determine loading status from unknown error: unhandled inspector error: {"code":-32000,"message":"Inspected target navigated or closed"}
See original GitHub issueHi! 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');
}
);
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:19 (1 by maintainers)
Top Results From Across the Web
Selenium unknown error: unhandled inspector error
I had this issue today exclusively with ChromeDriver on a project that has been working fine. I found that upgrading to the following...
Read more >cannot determine loading status - unhandled inspector error
WebDriverException: unknown error: cannot determine loading status ... inspector error: {"code":-32000,"message":"Inspected target navigated or closed"}
Read more >TestCase cannot load URL due to WebDriverException
WebDriverException: unknown error: cannot determine loading status. But in some TestCases the same Step is working fine.
Read more >A brand new website interface for an even better experience!
WebDriverError : unknown error: cannot determine loading status from unknown error: unhandled inspector error: {"code":-32000,"message":"Inspected target ...
Read more >cannot determine loading status when switching to frame ...
Issue Description: "Unknown error: cannot determine loading" occurs when driver tries to switch to frame that is loading. Log file attached.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.