Calling driver.quit() fails on "Aborting on channel error."
Firefox version: 50.0.2 (also seems to occur with any Firefox 48+ version) Geckodriver: v0.11.1 Platform: Windows 7 64bit Selenium Java libraries: 3.0.1
After updating to Selenium 3 and Geckodriver we have been experiencing random failures on calling driver.quit(). In case of failures (approximately 20-60% of test runs) the Firefox prompts an error dialog and error is shown in geckodriver log:
[Child 11304] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-rel-w64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2056 joulukuuta 09, 2016 4:15:36 IP. org.openqa.selenium.os.UnixProcess destroy SEVERE: Unable to kill process with PID 12796
The example test code causing these random failures:
package test;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class SeleniumTest {
private WebDriver driver;
@Before
public void before() {
driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
}
@After
public void tearDown() throws InterruptedException {
driver.manage().deleteAllCookies();
driver.quit();
}
@Test
public void test1() throws InterruptedException {
driver.get("http://www.google.com");
driver.findElement(By.name("btnI")).click();
}
}
Anyone experienced anything similar?
Tested also on Windows 10 (Firefox 50.0.2, Geckodriver 0.11.1).
With this configuration the Firefox does shutdown without hanging on error dialog (which makes issue less blocking). However, in the geckodriver log similar errors are shown during driver.quit() indicating failure to close Firefox process gracefully:
[Child 11888] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2056 joulukuuta 12, 2016 9:49:28 IP. org.openqa.selenium.os.UnixProcess destroy SEVERE: Unable to kill process with PID 5964
Also, on some executions geckodriver log showed different types of errors while calling driver.quit():
[Child 13296] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-rel-w32-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2056 ###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv ###!!! [Child][MessageChannel] Error: (msgtype=0x1060003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv ###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv ###!!! [Child][MessageChannel] Error: (msgtype=0x1060003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv ###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv ###!!! [Child][MessageChannel] Error: (msgtype=0x1060003,name=PTexture::Msg_Destroy) Channel error: cannot send/recv ###!!! [Child][MessageChannel] Error: (msgtype=0x420003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
Not exactly sure whether this is an geckodriver, Firefox or Selenium issue? Any ideas?
Duplicate of https://github.com/mozilla/geckodriver/issues/210.
Firefox version: 50.1.0 Geckodriver: v0.11.1-win64 Platform: Windows 7 64bit Selenium Java libraries: 3.0.1 The example test code causing these failures:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class FirefoxTestBaidu {
public static void main(String[] args) {
System.setProperty("webdriver.firefox.driver", "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
System.setProperty("webdriver.gecko.driver", "C:\\Users\\book\\tool\\geckodriver.exe");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
WebDriver dr = new FirefoxDriver(capabilities);
dr.get("http://www.baidu.com");
try {
Thread.sleep(300);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
dr.quit();
}
}
In case of failures (approximately 100% of test runs) ,the Firefox prompts an error dialog and error is shown in geckodriver log:


Inspired by @juperala , After comment:dr.quit(); The example test code running without failure
