This problem seems to be issue 4309 of selenium, but
unfortunately, it has not been fixed up to now.
https://code.google.com/p/selenium/issues/detail?id=4309&q=NS_ERROR_FAILURE&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary
On Wed, Oct 3, 2012 at 12:38 PM, VINOD KUMAR CHAUHAN
hanks William!
Yes I also found that this is issue with Selenium.
When we switch between windows or window to alert,we get this type of error
randomly with firefox 15 only. and when we use the same code with firefox
14 we get this random error with different name. I installed firefox 12 to
resolve this problem to carry my work.
with Firefox-15 error is---
org.openqa.selenium.WebDriverException: Component returned
failure code: 0x80004005 (NS_ERROR_FAILURE) [xpcIJSWeakReference.get]
with Firefox-14 error is-------
org.openqa.selenium.WebDriverException: Could not convert Native
argument arg 0 [xpcIJSWeakReference.get]
http://grokbase.com/t/gg/selenium-users/129944b11v/need-help-to-resove-the-exception
Could not convert Native argument arg 0' error with Firefox14
+1! Seen on FF14 running on Ubuntu 12.04. It happens when using ID locators
1 - Seen on FF 14.0.1 org.openqa.selenium.WebDriverException: Could not convert Native argument arg 0 [xpcIJSWeakReference.get] System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_03' Driver info: driver.version: RemoteWebDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:498) at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:287) at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:357) at org.openqa.selenium.By$ByXPath.findElements(By.java:338) at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:256)
Are we going to get a fix for this any soon Assuming the issue was FF14 i downgraded to FF13. I still see this issue. As mentioned by other members it is not on a particular action like clicking an element,taking a screenshot or a combination of factors. Consistently able to reproduce.
+1 Seen on FF 14.0.1 and Windows 7 64 bit org.openqa.selenium.WebDriverException: Could not convert Native argument arg 0 [xpcIJSWeakReference.get] Command duration or timeout: 34 milliseconds Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01' System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_31' Driver info: driver.version: RemoteWebDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:498) at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.defaultContent(RemoteWebDriver.java:764)
It looks like all developers are in summer break! :)
Also happens when navigate backward in browser.
Also happens when i use this: driver.navigate().refresh();
Disclaimer: I am pretty novice with selenium and coding But: This was happening to me as I was using br.find_elements_by_class and I just used an xpath instead and now it works fine.
I can't see anything obviously wrong about our xpcIJSWeakReference usage in javascript/firefox-driver/js/wdsession.js:181. I have a feeling this is a bug in Firefox (>= 14), but it's going to be hard to track down unless someone can provide a small example (HTML/JS/CSS + WebDriver code) that will reproduce the problem. Even if it does so only some of the time (e.g. 1/100 runs), it's better than nothing.
I'm not seeing this error anymore in 2.26 + Firefox 16.0 but I noticed some intermittent NoSuchElementException's which don't make sense. The element is clearly there. Again, downgrading Firefox will save your day.https://bugzilla.mozilla.org/show_bug.cgi?id=800957
https://code.google.com/p/selenium/issues/detail?id=4309
https://code.google.com/p/selenium/issues/detail?id=4309&q=NS_ERROR_FAILURE&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary