Issue 1594 in selenium: "java.lang.UnsupportedOperationException: Bad request" with FireFoxDriver using selenium-2.0b3

26 views
Skip to first unread message

sele...@googlecode.com

unread,
Apr 24, 2011, 7:53:32 PM4/24/11
to selenium-deve...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1594 by
winterst...@gmail.com: "java.lang.UnsupportedOperationException: Bad
request" with FireFoxDriver using selenium-2.0b3
http://code.google.com/p/selenium/issues/detail?id=1594

What steps will reproduce the problem?
1. Create sample application:
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
//import org.openqa.selenium.htmlunit.HtmlUnitDriver;

public class test {
public static void main(String[] args) {
// Create a new instance of the Firefox driver
// Notice that the remainder of the code relies on the interface,
// not the implementation.
WebDriver driver = new org.openqa.selenium.firefox.FirefoxDriver();
//WebDriver driver = new HtmlUnitDriver();

// And now use this to visit Google
driver.get("http://www.google.com");

// Find the text input element by its name
WebElement element = driver.findElement(By.name("q"));

// Enter something to search for
element.sendKeys("Cheese!");

// Now submit the form. WebDriver will find the form for us from
the element
element.submit();

// Check the title of the page
System.out.println("Page title is: " + driver.getTitle());

//Close the browser
driver.quit();
}
}
2. Run it

What is the expected output? What do you see instead?
I expect a FireFox window to appear with a google search for "Cheese!".
Instead I see a blank firefox window and the following error in the console:

Exception in thread "main" java.lang.UnsupportedOperationException: Bad
request

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:131)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:409)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:103)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:86)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:121)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:77)
at test.main(test.java:13)


What version of the product are you using? On what operating system?
selenium-2.0b3
Windows XP SP3
Firefox 3.6.16

Please provide any additional information below.
If I comment out the FireFoxDriver and use the HtmlUnitDriver instead, the
application outputs the title of the page as expected.


sele...@googlecode.com

unread,
Apr 25, 2011, 5:39:10 AM4/25/11
to selenium-deve...@googlegroups.com
Updates:
Labels: Component-WebDriver Browser-Firefox

Comment #1 on issue 1594 by
jari.bakken: "java.lang.UnsupportedOperationException: Bad request" with

Do you see any output in Firefox' error console?

sele...@googlecode.com

unread,
Apr 26, 2011, 12:13:37 AM4/26/11
to selenium-deve...@googlegroups.com

Comment #2 on issue 1594 by
winterst...@gmail.com: "java.lang.UnsupportedOperationException: Bad
request" with FireFoxDriver using selenium-2.0b3
http://code.google.com/p/selenium/issues/detail?id=1594

Here is the ouput of the error console:

Registering Override Certificate service.
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\dispatcher.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\firefoxDriver.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\json2.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\request.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\response.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\screenshooter.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\socketListener.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\webdriverserver.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\webLoadingListener.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\components\wrappedElement.js
Failed to load XPCOM component:
C:\DOCUME~1\Family\LOCALS~1\Temp\anonymous3932585652881919940webdriver-profile\extensions\fxdr...@googlecode.com\platform\WINNT_x86-msvc\components\imehandler.dll
Found preference for webdriver_accept_untrusted_certs: true
Found preference for webdriver_assume_untrusted_issuer: true
Accept untrusted certificates: true
webdriverserver.js:62 - Using native events: true
utils.js:9315 - Loading: resource://fxdriver/evaluate.js
utils.js:9326 - Done reading: resource://fxdriver/evaluate.js
promptService.js:108 - Spoofing prompt service
promptService.js:131 - Found implementation at:
{A2112D6A-0E28-421f-B46A-25C0B308CBD0}
promptService.js:148 - Unable to locate original prompter
promptService.js:159 - Finished initializing spoofed prompt service


sele...@googlecode.com

unread,
May 3, 2011, 9:56:06 AM5/3/11
to selenium-deve...@googlegroups.com

Comment #3 on issue 1594 by
your...@gmail.com: "java.lang.UnsupportedOperationException: Bad request"
with FireFoxDriver using selenium-2.0b3
http://code.google.com/p/selenium/issues/detail?id=1594

I have a similar issue (Bad request exception), on Linux (64bits).

In the error log I also have:
Error: uncaught exception: [Exception... "Component returned failure code:
0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXPCComponents_Utils.import]"
nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::
file:///tmp/anonymous7451213068086379965webdriver-profile/extensions/fxdr...@googlecode.com/components/wrappedElement.js ::
<TOP_LEVEL> :: line 20" data: no]

sele...@googlecode.com

unread,
May 3, 2011, 10:57:12 AM5/3/11
to selenium-deve...@googlegroups.com

Comment #4 on issue 1594 by
dste...@gmail.com: "java.lang.UnsupportedOperationException: Bad request"
with FireFoxDriver using selenium-2.0b3
http://code.google.com/p/selenium/issues/detail?id=1594

Issue 1609 might be a duplicate of this one. I get a different error in the
console output (on Linux), but I am seeing the same type of behavior and
this message in the Firefox error console. It's as if the Firefox
extension is misbehaving in 3.6.16.


Error: uncaught exception: [Exception... "Component returned failure code:
0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXPCComponents_Utils.import]"
nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame ::

file:///tmp/anonymous5291075954681468816webdriver-profile/extensions/fxdr...@googlecode.com/components/wrappedElement.js ::

sele...@googlecode.com

unread,
Jul 29, 2011, 4:44:29 PM7/29/11
to selenium-deve...@googlegroups.com

Comment #5 on issue 1594 by
dilettan...@gmail.com: "java.lang.UnsupportedOperationException: Bad
request" with FireFoxDriver using selenium-2.0b3
http://code.google.com/p/selenium/issues/detail?id=1594

Firefox 5.0.1 on Windows XP with Selenium 2.2.0 lists these selected
messages/errors (Screenshot attached):

Warning: Trying to re-register CID '{e26dbdcd-d3ba-4ded-88c3-6cb07ee3e9e0}'
already registered by
C:\DOCUME~1\twitmer\LOCALS~1\Temp\anonymous4746553246038970209webdriver-profile\extensions\fxdr...@googlecode.com\components\promptService.js.
Source File:
C:\DOCUME~1\twitmer\LOCALS~1\Temp\anonymous4746553246038970209webdriver-profile\extensions\fxdr...@googlecode.com\chrome.manifest
Line: 31

Error: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
Source File: chrome://jqs/content/overlay.js
Line: 9

Error: uncaught exception: [Exception... "Component returned failure code:

0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIWebNavigation.loadURI]"
nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame ::
chrome://global/content/viewSource.js :: viewSource :: line 179" data: no]


Attachments:
ErrorConsole.png 46.8 KB

sele...@googlecode.com

unread,
Nov 20, 2011, 3:52:16 PM11/20/11
to selenium-deve...@googlegroups.com
Updates:
Status: NeedsClarification

Comment #6 on issue 1594 by
barancev: "java.lang.UnsupportedOperationException: Bad request" with

Is this still an issue?

Reply all
Reply to author
Forward
0 new messages