when selenium node is run as a Windows service, I get unable to discover open pages error

1,662 views
Skip to first unread message

ASK

unread,
Aug 2, 2016, 9:21:24 AM8/2/16
to Selenium Users
Hi,

I have looked around the net and this forum for the issue I am writing about and there seems to be a workaround of no-sandbox to be used. I am reluctant to use it because it is a WAR and I have to make sure that all the nodes get this change or all the tests are updated

In Chrome browser when selenium node is run as a Windows service, I get InitSession unknown error: unable to discover open pages

I am a Selenium newbie. In fact I am covering for another automation tester.

I am trying to setup Selenium Grid, I have successfully setup Hub and node. 
When I run Selenium node as a Windows Service, for chrome browser I get following error.


[0.535][INFO]: Launching chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-logging --ignore-certificate-errors --load-extension="C:\Windows\TEMP\scoped_dir1396_19904\internal" --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12964 --safebrowsing-disable-auto-update --test-type --use-mock-keychain --user-data-dir="C:\Windows\TEMP\scoped_dir1396_21178" data:,
[60.676][INFO]: RESPONSE InitSession unknown error: unable to discover open pages


When I run node as a java program in command line (note - without windows service) it works fine. 

Service is running as system user and I want to run the service as system user so that browsers don't show up when I remote login to the machine. 
I have also tried it using a different admin account, the result is the same. 

These are the versions I am using

Selenium 2.53.1
Firefox version 45.2.0
Chrome Version  52.0.2743.82  (Chrome driver 2.22)

These are the commands I run to complete the setup. Note, I am using NSSM to setup Windows Services.

I am setting up node and hub on the same machine for the initial setup using following command.

C:\Selenium\nssm-2.24\win32\nssm.exe install GridNode java -Dwebdriver.chrome.driver="C:\Selenium\chromedriver-2.22\chromedriver.exe" -Dwebdriver.ie.driver="C:\Selenium\iedriver-2.53.1\IEDriverServer.exe" -jar C:\Selenium\selenium-server-standalone-2.53.1.jar -role webdriver -hub http://x.x.x.x:4444/grid/reg -Dwebdriver.chrome.logfile=C:\Selenium\chromedriver.log

Any help is appreciated.

When I add no-sandbox option, it works smoothly but I am thinking that this issue might be related to the system account and the privileges. 

⇜Krishnan Mahadevan⇝

unread,
Aug 2, 2016, 9:32:22 AM8/2/16
to Selenium Users
Ajith,

I think this is a bug with Chrome Browser itself.

I have added the bug links in this SO reply. Please see here : http://stackoverflow.com/a/38721806/679824

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3b1c267c-9a69-4240-9b8c-25388e9bb425%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Jervis

unread,
Aug 2, 2016, 12:40:22 PM8/2/16
to Selenium Users
Ajith

As Krishnan says this may be a bug with Chrome Browser

However, it may be worth upgrading Firefox to Firefox 47

As of 30 June 2016 Firefox 47 should be OK with Selenium 2.53.1

Regards, Andrew Jervis

⇜Krishnan Mahadevan⇝

unread,
Aug 2, 2016, 12:43:32 PM8/2/16
to Selenium Users
Andrew,

I think the OP is having issues with Chrome and not firefox. 
For Firefox, one needs to be using Firefox 47.0.1 with Selenium 2.53.1

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Andrew Jervis

unread,
Aug 4, 2016, 11:20:13 AM8/4/16
to Selenium Users
Krishnan,

Agreed: For Firefox, one needs to be using Firefox 47.0.1 with Selenium 2.53.1

Andrew Jervis
Reply all
Reply to author
Forward
0 new messages