setEnableNativeEvents()

1,325 views
Skip to first unread message

Itay Braha

unread,
Jun 6, 2011, 8:24:02 AM6/6/11
to webdriver
All the following code lines run perfectly except form:
firefoxProfile.setEnableNativeEvents(true);
The code crashes with the exception below unless I comment that line
out.
Any ideas?

public static WebDriver driver;
protected static FirefoxProfile firefoxProfile;

static {
ProfilesIni allProfiles = new ProfilesIni();
firefoxProfile = allProfiles.getProfile("WebDriverProfile");
firefoxProfile.setEnableNativeEvents(true);
}




org.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:
96)
at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:
148)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
85)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
127)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
82)
at no.xait.LoginSpec.login(LoginSpec.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:
46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
197)
org.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:
96)
at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:
148)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
85)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
127)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
82)
at no.xait.Spec.login(Spec.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:
46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
197)
corg.openqa.selenium.firefox.NotConnectedException: Unable to connect
to host 127.0.0.1 on port 7055 after 45000 ms
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:
96)
at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:
148)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:
85)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
127)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:
82)
at no.xait.Spec.login(Spec.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:
46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
197)

Simon Stewart

unread,
Jun 6, 2011, 5:31:13 PM6/6/11
to webd...@googlegroups.com
You appear to have edited the stacktrace: I don't know what OS you're
on, and you've neglected to tell us which version of Firefox you're
using. Moreover, you've not included the code that actually
instantiates the driver. There's not much we can do to help you
diagnose the issue without this information.

Regards,

Simon

> --
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
>
>

Itay Braha

unread,
Jun 7, 2011, 3:25:02 AM6/7/11
to webd...@googlegroups.com
Terribly sorry for that, I guess this issue has just got me a bit frustrated I forgot about a few things..
I did not edit the stacktrace (at least not on purpose..), I was running on Ubuntu 11.04 and I'm using Firefox 4.

this is the piece of code in the class that fails the tests including the code that instantiates the driver (I hope thats enough):

public class A {

public static WebDriver driver;
protected static FirefoxProfile firefoxProfile;
static {
ProfilesIni allProfiles = new ProfilesIni();
firefoxProfile = allProfiles.getProfile("WebDriverProfile");
firefoxProfile.setEnableNativeEvents(true);
}
@BeforeClass public static void login() throws Exception {
driver = new FirefoxDriver(firefoxProfile);
Text.driver = driver;
AutoLogin.setLoginCookie(driver);
}
@AfterClass public static void close() {
driver.close();
}
}

I ran the tests again and this is the stacktrace I get:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:82)
at no.xait.LoginSpec.login(LoginSpec.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:82)
at no.xait.Spec.login(Spec.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:82)
at no.xait.Spec.login(Spec.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:82)
at no.xait.Spec.login(Spec.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Simon Stewart

unread,
Jun 7, 2011, 4:27:13 AM6/7/11
to webd...@googlegroups.com
Try creating your profile this way:

FirefoxProfile profile = new FirefoxProfile();
profile.setEnableNativeEvents(true);

If your WebDriverProfile has the webdriver extension installed, please
also remove it: the extension can change rapidly between versions, and
the firefox driver will take care of installing it as required.

Simon

Itay Braha

unread,
Jun 7, 2011, 6:30:47 AM6/7/11
to webd...@googlegroups.com
I tried that before with no luck (the way you specified I should create a ff profile), I tried to simplify my tests as well and had no luck there either.. I also checked and I don't have a webdriver extension installed on my firefox.
I'm getting the same exception no matter what I do :S

Thanks for trying to help out btw, I appreciate it :)

Simon Stewart

unread,
Jun 7, 2011, 9:15:48 AM6/7/11
to webd...@googlegroups.com
And you're using rc2?

Simon

Itay Braha

unread,
Jun 7, 2011, 9:21:59 AM6/7/11
to webd...@googlegroups.com
Yes, I'm using selenium-server-standalone-2.0rc2.

Simon Stewart

unread,
Jun 7, 2011, 11:00:50 AM6/7/11
to webd...@googlegroups.com
And does firefox start up at all? Is there anything in its error
console (available from the tools menu)

Simon

Itay Braha

unread,
Jun 7, 2011, 12:00:19 PM6/7/11
to webd...@googlegroups.com
Firefox doesn't start.

Simon Stewart

unread,
Jun 7, 2011, 12:36:19 PM6/7/11
to webd...@googlegroups.com
Ah... that's interesting. Can it start normally?

Simon

Itay Braha

unread,
Jun 7, 2011, 4:57:53 PM6/7/11
to webd...@googlegroups.com
Yes, as I said in my initial post when I comment out - firefoxProfile.setEnableNativeEvents(true); it works like magic.. 

Itay Braha

unread,
Jun 10, 2011, 7:49:58 AM6/10/11
to webd...@googlegroups.com
Anyone have a clue why that is?

Eran M.

unread,
Jun 10, 2011, 10:36:13 AM6/10/11
to webd...@googlegroups.com
The first reason that comes to mind is using an "unofficial" build of Firefox which is not compatible with Gecko 2 SDK. Other options could be incompatibilities between 32-bit Firefox and 64-bit OS.

Here's some information that could be useful in debugging this issue;
* Output of 'which firefox'
* Output of 'uname -m' (to figure out whether it's a 32-bit or 64-bit machine)
* Output of 'file `which firefox-bin`' or 'file `which firefox`'.

Some things to try out:
* Get Firefox 4.0.1 32-bit build from mozilla.org (make sure it's in your $PATH before everything else).
* Get Firefox 4.0.1 64-bit build from ftp.mozilla.org (until Firefox 4, there was no official 64-bit release for Linux).

As a last resort, you could build Selenium on your machine.

If none of these works, exact specifications of your configuration (OS version, which you specified, architecture, java version) may help me reproduce this issue on a VM.

Eran

Itay Braha

unread,
Jun 15, 2011, 10:06:03 AM6/15/11
to webd...@googlegroups.com
Hi Eran,

Thank you for replying, I'm sorry it took so long for me to do the same but I had a bit of a mishap with my machine and had to re-install everything from scratch..
Below, I specified the info to your request, if there's anything else you need I'll be happy to comply. I tried everything short of building selenium since having advanced interaction is not a present priority for the company I work for.


The first reason that comes to mind is using an "unofficial" build of Firefox which is not compatible with Gecko 2 SDK. Other options could be incompatibilities between 32-bit Firefox and 64-bit OS.

Here's some information that could be useful in debugging this issue;
* Output of 'which firefox'
 
/usr/bin/firefox
 
* Output of 'uname -m' (to figure out whether it's a 32-bit or 64-bit machine)

x86_64
 
* Output of 'file `which firefox-bin`' or 'file `which firefox`'.

/usr/bin/firefox: symbolic link to `/usr/lib/firefox-4.0/firefox'
 

Some things to try out:
* Get Firefox 4.0.1 32-bit build from mozilla.org (make sure it's in your $PATH before everything else).
* Get Firefox 4.0.1 64-bit build from ftp.mozilla.org (until Firefox 4, there was no official 64-bit release for Linux).

As a last resort, you could build Selenium on your machine.

If none of these works, exact specifications of your configuration (OS version, which you specified, architecture, java version) may help me reproduce this issue on a VM.

java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

Christoph Neuroth

unread,
Jun 24, 2011, 9:02:47 AM6/24/11
to webdriver
I'm having the same trouble, also on 64bit ubuntu 11.04. I tried using
firefox builds from mozilla instead of the Ubuntu one with no luck.
Exceptions:

=====> 5.0:

org.openqa.selenium.InvalidElementStateException: Cannot perform
native interaction: Could not load native events component.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-8-
generic', java.version: '1.6.0_24'
Driver info: driver.version: RemoteWebDriver
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:
131)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:
105)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
402)
at org.openqa.selenium.remote.RemoteWebDriver
$RemoteMouse.mouseMove(RemoteWebDriver.java:689)
at
org.openqa.selenium.interactions.internal.MouseRelatedAction.moveToLocation(MouseRelatedAction.java:
31)
at
org.openqa.selenium.interactions.DoubleClickAction.perform(DoubleClickAction.java:
37)
at
org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:
31)
at org.openqa.selenium.interactions.Action$perform.call(Unknown
Source)
at GebPlayground$_run_closure1.doCall(GebPlayground.groovy:13)
at GebPlayground$_run_closure1.doCall(GebPlayground.groovy)
at geb.Browser.doDrive(Browser.groovy:262)
at geb.Browser.drive(Browser.groovy:253)
at geb.Browser$drive.call(Unknown Source)
at GebPlayground.run(GebPlayground.groovy:11)
Caused by: org.openqa.selenium.remote.ErrorHandler
$UnknownServerException: Cannot perform native interaction: Could not
load native events component.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-8-
generic', java.version: '1.6.0_24'
Driver info: driver.version: unknown
at <anonymous class>.generateErrorForNativeEvents(file:///tmp/
anonymous6332565497828898781webdriver-profile/extensions/
fxdr...@googlecode.com/components/driver-component.js ->
file:///tmp/anonymous6332565497828898781webdriver-profile/extensions/fxdr...@googlecode.com/components/firefoxDriver.js:1072)
at <anonymous class>.<anonymous method>(file:///tmp/
anonymous6332565497828898781webdriver-profile/extensions/
fxdr...@googlecode.com/components/driver-component.js ->
file:///tmp/anonymous6332565497828898781webdriver-profile/extensions/fxdr...@googlecode.com/components/firefoxDriver.js:1151)
at <anonymous class>.<anonymous method>(file:///tmp/
anonymous6332565497828898781webdriver-profile/extensions/
fxdr...@googlecode.com/components/driver-component.js ->
file:///tmp/anonymous6332565497828898781webdriver-profile/extensions/fxdr...@googlecode.com/components/firefoxDriver.js:1156)
at <anonymous class>.<anonymous method>(file:///tmp/
anonymous6332565497828898781webdriver-profile/extensions/
fxdr...@googlecode.com/components/nsCommandProcessor.js:306)
at <anonymous class>.<anonymous method>(file:///tmp/
anonymous6332565497828898781webdriver-profile/extensions/
fxdr...@googlecode.com/components/nsCommandProcessor.js:320)
at <anonymous class>.<anonymous method>(file:///tmp/
anonymous6332565497828898781webdriver-profile/extensions/
fxdr...@googlecode.com/components/nsCommandProcessor.js:197)

=====> 4.0.1:
Same as with the ubuntu version which is the same as Itay Braha

=====> 3.6.18:

org.openqa.selenium.UnsupportedCommandException: Unrecognized command:
POST /session/023e89a5-c788-458e-b12e-ab1e0c03b3e5/doubleclick
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.38-8-
generic', java.version: '1.6.0_24'
Driver info: driver.version: RemoteWebDriver
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:
131)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:
105)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
402)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:
406)
at org.openqa.selenium.remote.RemoteWebDriver
$RemoteMouse.doubleClick(RemoteWebDriver.java:671)
at
org.openqa.selenium.interactions.DoubleClickAction.perform(DoubleClickAction.java:
38)
at
org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:
31)
at org.openqa.selenium.interactions.Action$perform.call(Unknown
Source)
at GebPlayground$_run_closure1.doCall(GebPlayground.groovy:13)
at GebPlayground$_run_closure1.doCall(GebPlayground.groovy)
at geb.Browser.doDrive(Browser.groovy:262)
at geb.Browser.drive(Browser.groovy:253)
at geb.Browser$drive.call(Unknown Source)
at GebPlayground.run(GebPlayground.groovy:11)

Itay Braha

unread,
Jun 29, 2011, 7:25:37 AM6/29/11
to webd...@googlegroups.com
This still doesn't work with rc3, should I open a bug report?


--

Eran M.

unread,
Jun 30, 2011, 4:43:47 AM6/30/11
to webd...@googlegroups.com
It makes sense to open a bug report only if you can't get it to work with the official Firefox releases. Firefox versions which are shipped with a distribution are usually compiled by that distribution and may not be binary compatible with our native components, which are compiled against the official Gecko SDK. Now that there's an official 64-bit release of Firefox, I'm only building and testing the native components on Linux against the official versions - Previously, I used the Gecko SDK shipped with Ubuntu for the 64-bit binary, which is why it used to work.
The bottom line is that only the official Firefox binaries are supported - so I suggest you try using them and report if native events don't work then.

Eran 

Itay Braha

unread,
Jun 30, 2011, 5:30:26 AM6/30/11
to webd...@googlegroups.com
Can you please send me a link to download one of those official versions you're talking about? I tried both of your earlier suggestions with no luck, maybe I'm doing something wrong..

Christoph Neuroth

unread,
Jun 30, 2011, 1:12:43 PM6/30/11
to webd...@googlegroups.com
Eran: As I wrote, I tried the official releases and it does not work with the 64-bit ones. Also, this should really be mentionened in the documentation, because I don't see any reason why someone should not use the firefox build that came with their distribution, so most linux users will stumble over this problem. I described the issue in #1773 a few days ago and updated it with the 32/64bit information.

Itay: You can find all FF releases on the moziall ftp server: ftp://ftp.mozilla.org/pub/firefox/releases

Chris

Eran Mes

unread,
Jun 30, 2011, 1:44:25 PM6/30/11
to webd...@googlegroups.com
The official 64-bit of Firefox 4 (*not* 5) should work with native events. I'll make a note of including this information in the release notes and on the website.
My plan is that ultimately the following configurations will be supported:
* Firefox 3.6 and below - 32-bit.
* Firefox 4 - 32-bit and 64-bit.
* Firefox 5 - 32-bit and 64-bit.

The reason for the lack of support for the Firefox shipped with various Linux distributions (Debian, Ubuntu, etc) is that each compiles its own and to guarantee binary compatibility with these versions we have to ship binaries compiled on these platforms *and* somehow provide the right one to Firefox when we start it. Firefox's mechanism for controlling which binary component is loaded is not flexible enough to distinguish between distributions and has significantly changed between 3.6 and 4.0. That's why Firefox 3.6 shipped with Ubuntu will not work with the 64-bit binaries compiled with the official, 64-bit Gecko SDK. I'll try to include a 64-bit build of the binary for Firefox 3.6, using Gecko SDK shipped with Ubuntu.
This is an excellent opportunity to contribute to the project - if you know a bit of Ruby and willing to modify our build files to build using a non-official Gecko SDK for Firefox 3.6, join the IRC channel and I can provide some guidelines.

Eran 

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/CdkcQEFsSEEJ.

Itay Braha

unread,
Jun 30, 2011, 2:50:11 PM6/30/11
to webd...@googlegroups.com
Sorry to say I never worked with Ruby before, I program using Java.. I would however like to contribute to the project if you can find something that matches my skill set. As to the problem at hand I was using a firefox 4 that was shipped with Ubuntu 10, then upgraded to Ubuntu 11 where I used firefox 4 still and after that tried to get a 64 bit version from mozila nightly builds list you specified in one of your previous posts. It would be nice if you can direct me to a link where I can get an official firefox 4, 64 bit version that works for Ubuntu 11.

Eugen Paraschiv

unread,
Sep 27, 2011, 11:36:45 AM9/27/11
to webd...@googlegroups.com
Hi,
I'm getting a similar exception. Without
profile.setEnableNativeEvents( true );
Firefox starts up just fine; with it, it doesn't.
My system is: Ubuntu 11.04 32 bit, Firefox 6.0.2 and Selenium 2.7.

Also, from the wiki: http://code.google.com/p/selenium/wiki/NativeEventsOnLinux
running
for i in `pidof firefox`; do cat /proc/${i}//maps |grep "libwebd\|ignore"; done
comes up with nothing, so I may not have everything I need installed.

This is the stack:

org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows:
*** LOG addons.xpi: startup
*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous6282955989889444478webdriver-profile/extensions/webdriver-staging
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: Opening database
*** LOG addons.xpi: No changes found
Failed to dlopen /usr/lib/libX11.so.6
dlerror says: /usr/lib/libX11.so.6: cannot open shared object file: No such file or directory

Build info: version: '2.7.0', revision: '13926', time: '2011-09-23 15:09:51'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.38-11-generic-pae', java.version: '1.6.0_26'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:108)
    at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:149)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:72)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:128)
    at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:83)
    at org.selenium.util.SeleniumComponent.<init>(SeleniumComponent.java:18)
    at com.macys.stella.common.StellaBaseSeleniumTest.before(StellaBaseSeleniumTest.java:17)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
    at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
    ... 30 more



Krishnan Mahadevan

unread,
Sep 27, 2011, 10:52:49 PM9/27/11
to webd...@googlegroups.com
Eugen,
That's a bit strange, because I am not seeing any errors.

My sample code:

FirefoxProfile profile = new FirefoxProfile();
profile.enableNativeEvents();
FirefoxDriver driver = new FirefoxDriver(profile);
driver.get("http://www.google.com");
driver.quit();

Selenium version : 2.6
Firefox : v 6.0.2
OS : Ubuntu 11.04 (32 bit)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/ANcaIxzn2QcJ.

Krishnan Mahadevan

unread,
Sep 27, 2011, 10:56:26 PM9/27/11
to webd...@googlegroups.com
Eugen,

DISREGARD my previous Note.. !! My bad.. I was getting the value of nativeEvents instead of setting them :(

Yes I see and am able to reproduce your error...


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



Krishnan Mahadevan

unread,
Sep 27, 2011, 11:17:05 PM9/27/11
to webd...@googlegroups.com
I decided to upgrade to Selenium 2.7.0 and see if the problem would go away, but it didnot.

My configuration

Build info: version: '2.7.0', revision: '13926', time: '2011-09-23 15:09:51'
Ubuntu (11.04) System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.38-11-generic', java.version: '1.6.0_22' 
Firefox v 6.0.2

After reading through the nativeEvents link given by you, following is what I noticed (I had a firefox that was instantiated via WebDriver and put to sleep for a long time so that I had time to run the troubleshooting command)

Command that I ran : for i in `pidof firefox-bin`; do cat /proc/${i}//maps |grep "libwebd\|ignore"; done

(Note : if you run pidof firefox, nothing comes up. I figured out that firefox is running as firefox-bin and not as firefox on my machine. Perhaps you might want to try the same too and see what comes up)

The output I see is as below:

05405000-05429000 r-xp 00000000 08:01 10485966   /tmp/anonymous9065641800985636689webdriver-profile/extensions/fxdr...@googlecode.com/platform/Linux_x86-gcc3/components/libwebdriver-firefox-ff6.so
05429000-0542a000 r--p 00023000 08:01 10485966   /tmp/anonymous9065641800985636689webdriver-profile/extensions/fxdr...@googlecode.com/platform/Linux_x86-gcc3/components/libwebdriver-firefox-ff6.so
0542a000-0542b000 rw-p 00024000 08:01 10485966   /tmp/anonymous9065641800985636689webdriver-profile/extensions/fxdr...@googlecode.com/platform/Linux_x86-gcc3/components/libwebdriver-firefox-ff6.so


A note says as below:

Note that both x_ignore_nofocus and libwebdriver-firefox should appear on the output. If one (or both) are missing, then native events will not function correctly (or at all).

When I ran the command output, I only see libwedriver-firefox but I dont see "x_ignore_nofocus" at all. Would that be the reason why nativeevents enabled firefox doesnt startup on Ubuntu ?

Complete Error:

org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows: 
*** LOG addons.xpi: startup
*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous6169482547929807427webdriver-profile/extensions/webdriver-staging
*** LOG addons.xpi: checkForChanges
*** LOG addons.xpi: Opening database
*** LOG addons.xpi: No changes found
Failed to dlopen /usr/lib/libX11.so.6
dlerror says: /usr/lib/libX11.so.6: cannot open shared object file: No such file or directory

Build info: version: '2.7.0', revision: '13926', time: '2011-09-23 15:09:51'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.38-11-generic', java.version: '1.6.0_22'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:108)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:149)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:72)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:128)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:83)
at com.driver.parallel.PlayGroundClass.runner(PlayGroundClass.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:685)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:854)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1178)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.runWorkers(TestRunner.java:1182)
at org.testng.TestRunner.privateRun(TestRunner.java:761)
at org.testng.TestRunner.run(TestRunner.java:612)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:335)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:330)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:241)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1169)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1094)
at org.testng.TestNG.run(TestNG.java:1006)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
... 30 more


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



Marc Holden

unread,
Sep 28, 2011, 8:43:52 AM9/28/11
to webd...@googlegroups.com
The problem is the libX11.so.6 library is not located in /usr/lib on Ubuntu 11.04.  To work around this I created a symbolic link the existing libX11.so.6 file.

mholden@mholden-VirtualBox:~$ locate libX11.so.6
/usr/lib/i386-linux-gnu/libX11.so.6

sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/libX11.so.6

Another option is to set the LD_LIBRARY_PATH environment variable to include /usr/lib/i386-linux-gnu but I have not tried this...  This method will not require special privileges on the Ubuntu system.

I hope this helps,

-Marc

Itay Braha

unread,
Sep 28, 2011, 9:00:42 AM9/28/11
to webd...@googlegroups.com
Same workaround Marc mentioned worked for me at the time..

Eran Mes

unread,
Nov 14, 2011, 9:38:46 AM11/14/11
to webd...@googlegroups.com
FYI, I've added several locations where the x_ignore_nofocus library looks for libX11.so.6:

If your distro's location is not there, creating a symlink (as suggested below) is the quickest workaround.

Eran
Reply all
Reply to author
Forward
0 new messages