New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling driver.quit() fails on "Aborting on channel error." #387

Closed
juperala opened this Issue Dec 9, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@juperala

juperala commented Dec 9, 2016

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:

capture

[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?

@juperala

This comment has been minimized.

Show comment
Hide comment
@juperala

juperala Dec 12, 2016

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?

juperala commented Dec 12, 2016

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?

@andreastt

This comment has been minimized.

Show comment
Hide comment
@andreastt

andreastt Dec 13, 2016

Member

Duplicate of #210.

Member

andreastt commented Dec 13, 2016

Duplicate of #210.

@andreastt andreastt closed this Dec 13, 2016

@qfyxixi

This comment has been minimized.

Show comment
Hide comment
@qfyxixi

qfyxixi Jan 15, 2017

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:

image

untitled

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

image

qfyxixi commented Jan 15, 2017

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:

image

untitled

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

image

@mozilla mozilla locked and limited conversation to collaborators Jan 18, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.