.WebDriverException: '[JavaScript Error: "Permission denied to access property 'blur' from a non-chrome context"]' when calling method: [wdIMouse::click] #2112

Closed
lukeis opened this Issue Mar 2, 2016 · 8 comments

Comments

Projects
None yet
1 participant
Owner

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 2112

Symptoms:
org.openqa.selenium.WebDriverException: '[JavaScript Error: "Permission denied to access
property 'blur' from a non-chrome context"]' when calling method: [wdIMouse::click]


What steps will reproduce the problem?
I get this error from different invocations in the code. Following, two examples:

Example [1]:        driver.findElement(By.xpath("//*[@id='uploadAP01_rig']/option[text()='"
+ rigName + "']")).click();
Example [2]:        driver.findElement(By.xpath("//*[@id='uploadAP01_rig']/option[text()='No
RIG required']")).click();

I cannot find anything relevant prior these invocations, as there are some other tests
executing similar calls that do not fail. The error is not deterministic, but within
my few tests the error always appears in some of them.

What is the expected output?

In previous Selenium 2.0rc3, everything has worked fine. In Debian wheezy + Iceweasel
5.0 it also works with the current Selenium 2.1.0

 What do you see instead?
Part of the stacktraces (I'm also attaching the selenium reports for one of these tests):

Stacktrace of example [1]:
org.openqa.selenium.WebDriverException: '[JavaScript Error: "Permission denied to access
property 'blur' from a non-chrome context"]' when calling method: [wdIMouse::click]
Build info: version: '2.1.0', revision: '12971', time: '2011-07-19 23:39:39'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32.36-0.5-default',
java.version: '1.6.0_24'
Driver info: driver.version: RemoteWebDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    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.RemoteWebElement.execute(RemoteWebElement.java:213)
    at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:49)
    at org.lila_project.selenium_tests.Llo.upload(Llo.java:75)
[cropped]
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: '[JavaScript
Error: "Permission denied to access property 'blur' from a non-chrome context"]' when
calling method: [wdIMouse::click]
Build info: version: '2.1.0', revision: '12971', time: '2011-07-19 23:39:39'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32.36-0.5-default',
java.version: '1.6.0_24'
Driver info: driver.version: unknown

Stacktrace of example [2]:
org.openqa.selenium.WebDriverException: '[JavaScript Error: "Permission denied to access
property 'blur' from a non-chrome context"]' when calling method: [wdIMouse::click]
Build info: version: '2.1.0', revision: '12971', time: '2011-07-19 23:39:39'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32.36-0.5-default',
java.version: '1.6.0_24'
Driver info: driver.version: RemoteWebDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    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.RemoteWebElement.execute(RemoteWebElement.java:213)
    at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:49)
    at org.lila_project.selenium_tests.contribute.TestUploadInvalidLlo.uploadInvalidLlo(TestUploadInvalidLlo.java:38)
[cropped]
Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: '[JavaScript
Error: "Permission denied to access property 'blur' from a non-chrome context"]' when
calling method: [wdIMouse::click]
Build info: version: '2.1.0', revision: '12971', time: '2011-07-19 23:39:39'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32.36-0.5-default',
java.version: '1.6.0_24'
Driver info: driver.version: unknown



Selenium version: 2.1.0
OS: SUSE Linux Enterprise Server 11 (x86_64) PATCHLEVEL = 1
Browser: Firefox
Brower version: 3.6.18 + Firebug 1.7.3



Reported by argrico on 2011-07-22 13:28:46


- _Attachment: [TestAccessRRLlo-selenium-issue.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-2112/comment-0/TestAccessRRLlo-selenium-issue.txt)_ - _Attachment: [TestAccessRRLlo-selenium-issue.xml](https://storage.googleapis.com/google-code-attachments/selenium/issue-2112/comment-0/TestAccessRRLlo-selenium-issue.xml)_

lukeis self-assigned this Mar 2, 2016

lukeis added the Type-Defect label Mar 2, 2016

Owner

lukeis commented Mar 2, 2016

Please can you give us a reduced test case for this so that we can replicate it locally

Reported by david.burns@theautomatedtester.co.uk on 2011-07-22 17:57:14

  • Status changed: NeedsClarification
  • Labels added: Browser-Firefox
Owner

lukeis commented Mar 2, 2016

Ok. It seems that the error has to do with the way I'm using the driver. I have downloaded
the content of the page under test before the test fails, and it turns out that it's
not yet complete. Thus, the invocation:
    driver.findElement(By.xpath("//*[@id='compID']/option[text()='Option Text']")).click();

is "clicking" an option of a select that is still not downloaded.

I don't know why this has worked with the previous Selenium 2.0rc3, nor why it didn't
fail in other O.S. Maybe has to do with the way Selenium detects that the page was
loaded correctly?

I'm working on the "reduced" test. I'll send it when its ready.

Reported by argrico on 2011-07-25 11:31:38

Owner

lukeis commented Mar 2, 2016

After a few hours trying to write a simplified test case, I'm afraid I have to abandon
--I cannot afford it--: the error seems to depend on how the html is generated, and
the code producing this html is quite complicated.

In any case, I attach the html of the "page under test" as the driver has seen it before
failing, and the (too much simplified) relevant code that exercised it, just to be
"visually" inspected. If I ever get a simpler test failing, I'll send it.

As a note about the unpredictable "reproducibility", I run the test 20 times, failing
8 times with the mentioned error and 9 time with a timeout.

Reported by argrico on 2011-07-25 14:54:42


- _Attachment: [content.html](https://storage.googleapis.com/google-code-attachments/selenium/issue-2112/comment-3/content.html)_ - _Attachment: [TestUploadRFLlo.java](https://storage.googleapis.com/google-code-attachments/selenium/issue-2112/comment-3/TestUploadRFLlo.java)_
Owner

lukeis commented Mar 2, 2016

Ok. I have tried a bit more and found that if I "click" the "select" before "click"ing
the option, the test succeeds:


        // First click the select
        driver.findElement(By.xpath("//select[@id='uploadAP01_rig']")).click();

        // Then click the option
        driver.findElement(By.xpath("//select[@id='uploadAP01_rig']/option[text()='"
+ rigName + "']")).click();


In any case, the error happened only on a 30-40% of the times I run the test (more
than 50). It depends also on the time it takes to execute its actions.

Reported by argrico on 2011-07-25 16:06:23

Owner

lukeis commented Mar 2, 2016

Reported by barancev on 2011-10-13 06:38:03

  • Labels added: Component-WebDriver
Owner

lukeis commented Mar 2, 2016

A lot of work has been done on this area and with Firefox. Please can you retest and
let us know if it is still an issue

Reported by david.burns@theautomatedtester.co.uk on 2012-06-08 09:19:48

Owner

lukeis commented Mar 2, 2016

Closing bug due to inactivity

Reported by jmleyba on 2012-11-20 05:30:11

  • Status changed: WontFix
Owner

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 18:13:17

  • Labels added: Restrict-AddIssueComment-Commit

lukeis closed this Mar 2, 2016

lukeis locked and limited conversation to collaborators Mar 4, 2016

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