Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Error trying to start a custom browser in version 2.17.0 #3274

Closed
lukeis opened this issue Mar 3, 2016 · 16 comments
Closed

Error trying to start a custom browser in version 2.17.0 #3274

lukeis opened this issue Mar 3, 2016 · 16 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 3274


I am using the version selenium-2.17.0

I need to test using the arora web browser. So I start the server (java -jar selenium-server-standalone-2.17.0.jar)

After that I execute the code which try to start arora.

File arora = new File("C:/Arora/arora.exe");
HttpCommandProcessor proc = new HttpCommandProcessor("localhost", 4444, "*custom \""
+ appup.getAbsolutePath() + "\"", "http://www.google.com");
Selenium selenium = new DefaultSelenium(proc);
selenium.start();

I am getting the following error

10:08:51.542 INFO - Allocated session 977ae917506e4cc787ce9b8224a62603 for http://www.google.com,
launching...
10:08:51.573 ERROR - Failed to start new browser session, shutdown browser and clear
all session data
java.lang.RuntimeException: Error starting browser by executing command "C:\Program
Files (x86)\Intel\IntelAppStore\bin\AppUpLauncher.bat" http://www.google.com/selenium-server/core/RemoteRunner.html?sessionId=977ae917506e4cc787ce9b82
24a62603&multiWindow=true&baseUrl=http%3A%2F%2Fwww.google.com&debugMode=false: java.lang.IllegalArgumentException:
Executable can not be null
        at org.openqa.selenium.server.browserlaunchers.CustomBrowserLauncher.exec(CustomBrowserLauncher.java:60)
        at org.openqa.selenium.server.browserlaunchers.CustomBrowserLauncher.launch(CustomBrowserLauncher.java:52)
        at org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher.launchRemoteSession(AbstractBrowserLauncher.java:38)
        at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:374)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:125)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:86)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:809)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:435)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:405)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:149)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
        at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
        at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
        at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
        at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
        at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
10:08:51.589 INFO - Got result: Failed to start new browser session: Error while launching
browser on session null


If I do the same but using the version selenium-2.12.0 it is working ok and arora is
being open well.

Reported by sergiocazzolato on 2012-01-25 13:15:26

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

The exception shown in the issue happened testing other browser made with QTWebkit,
the same error is got using arora.

Reported by sergiocazzolato on 2012-01-25 13:17:39

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2012-01-26 09:04:57

  • Labels added: Component-RC

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Any news about if this issue is going to be fixed? 

Reported by sergiocazzolato on 2012-02-24 18:23:07

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I have noticed this to be a problem as well on since 2.12.0
The following is a snippet of the command log failing against the selenium standalone
server 2.20.0:
---------------------------------------------------------------------------------
09:45:18.175 INFO - Allocated session 8c0ceb80a972494a97ff635951fb9d39 for http://www.google.com,
launching...
09:45:18.181 ERROR - Failed to start new browser session, shutdown browser and c
lear all session data
java.lang.RuntimeException: Error starting browser by executing command C:\brows
erLauncher.bat http://www.google.com/selenium-server/core/RemoteRunner.html?sessi
onId=8c0ceb80a972494a97ff635951fb9d39&multiWindow=true&baseUrl=http%3A%2F%2Fwww.google.com
&debugMode=false: java.lang.NullPointerException: Unable to find execut
able for: C:\browserLauncher.bat http://www.google.com/selenium-server/core/Remot
eRunner.html?sessionId=8c0ceb80a972494a97ff635951fb9d39&multiWindow=true&baseUrl
=http%3A%2F%2Fwww.google.com&debugMode=false
        at org.openqa.selenium.server.browserlaunchers.CustomBrowserLauncher.exe
c(CustomBrowserLauncher.java:60)
        at org.openqa.selenium.server.browserlaunchers.CustomBrowserLauncher.lau
nch(CustomBrowserLauncher.java:52)
        at org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher.l
aunchRemoteSession(AbstractBrowserLauncher.java:38)
        at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSessi
on(BrowserSessionFactory.java:374)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession
(BrowserSessionFactory.java:125)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession
(BrowserSessionFactory.java:86)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowse
rSession(SeleniumDriverResourceHandler.java:811)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(Se
leniumDriverResourceHandler.java:437)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleComman
dRequest(SeleniumDriverResourceHandler.java:407)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(Selen
iumDriverResourceHandler.java:151)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
        at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
        at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)

        at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:9
86)
        at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
        at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.
java:243)
        at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
09:45:18.183 INFO - Got result: Failed to start new browser session: Error while
 launching browser on session null
---------------------------------------------------------------------------------

Any help or clarification on the issue would be appreciated. I don't want to be stuck
on an old version of your code if I can help it.

Thanks

Reported by AndrewJPSkelton on 2012-03-09 14:51:41

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

This is still an issue from v2.13.0 on.

Reported by aahznotoz on 2012-04-03 14:22:19

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I have also hit this problem in v2.21.0.

It would appear that this is an issue in CustomBrowserLauncher. The launcher is passing
both the executable name and the argument into the constructor of CommandLine.

I have modified the source locally to address this issue by updating CustomBrowserLauncher
to pass the command and the argument separately. This appears to resolve this issue.

Having modified this I noticed that the class java/client/src/org/openqa/selenium/os/CommandLine.java
was only attempting to launch Unix processes which means that it failed on my windows
clients. I added some code to determine the current operating system and then create
the correct OsProcess instance.

I have attached a diff of the changes from my local svn repository. Hopefully this
will help.

Mike


Reported by mike@dohertysoftware.com on 2012-05-01 15:16:14


- _Attachment: [CommandLine diff.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-3274/comment-6/CommandLine diff.txt)_ - _Attachment: [CustomBrowserLaunch diff.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-3274/comment-6/CustomBrowserLaunch diff.txt)_

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Mike,

Thanks for finding the issue and fixing it. Now how do we get them to roll in the fixes?
;-)

Dan

Reported by aahznotoz on 2012-05-02 19:12:22

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I was thinking the exact same thing Dan.

Reported by AndrewJPSkelton on 2012-05-02 20:23:45

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Since fixing this issue I've found lots more when using the legacy chrome and firefox
launchers. Looks like we won't be upgrading after all :(

Reported by mike@dohertysoftware.com on 2012-05-04 15:06:58

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

great job, all. When will this change make release?

Reported by lemmon.warren on 2012-05-15 22:46:58

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Is there any update on this? With the release of Firefox 13, I can no longer run both
my custom browser and firefox on the same machine. I would prefer not to have to modify
the jar file if at all possible.

Reported by AndrewJPSkelton on 2012-07-04 14:30:07

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Still waiting on a fix.  Coming up on a year since it was broken in code and still not
even assigned to anyone to be fixed yet?  One of the reasons I always tell people to
use commercial tools.  Looks like QTP is suporting Chrome and custom browsers now.
 May be time to get more licenses and switch.

Reported by aahznotoz on 2012-08-27 23:27:08

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by jmleyba on 2013-01-26 22:10:09

  • Labels added: Priority-Low
  • Labels removed: Priority-Medium

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I'm also seeing this on Windows on Selenium Server standalone 2.33.0. We're attempting
to use PhantomJS to run htmlSuites. 

We can't use WebDriver because it doesn't support execution of html (selenese) test
suites. We have thousands of them, and the test authors wish to maintain them in HTML
format via the IDE. FireFox is crashing during the result reporting phase, so we're
attempting to switch to PhantomJS.

Reported by roytinker on 2013-06-26 19:02:37

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Selenium RC is deprecated and we're not going to add support for new browsers.

Reported by barancev on 2013-10-25 08:13:41

  • Status changed: WontFix

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

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

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ 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.
Projects
None yet
Development

No branches or pull requests

1 participant