'Angular could not be found' when integrating Travis/Sauce Labs - angularjs

I'm working to get Travis CI to run Protractor tests using Sauce Labs. The tunneling works fine, and my Express server clearly starts and stays up at http://localhost:9000, but my Protractor tests quickly fail with the error Error: Angular could not be found on the page http://localhost:9000/ : retries looking for angular exceeded. All the suggestions on the Internet usually involve not using Angular 1.0 (using 1.3), extending time outs (doing that), or forcing Protractor to look at <html> for the ng-app directive (doing that). I'm out of ideas.
Relevant config:
protractor.conf.js
exports.config = {
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
baseUrl: 'http://localhost:9000',
specs: ['e2e/**/*.spec.js'],
framework: 'jasmine',
maxSessions: 1,
allScriptsTimeout: 30000,
rootElement: 'html',
multiCapabilities: [
{'browserName': 'chrome'},
{'browserName': 'firefox'},
{'name': 'diplomacy'},
{'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER ? process.env.TRAVIS_JOB_NUMBER : null},
{'build': process.env.TRAVIS_BUILD_NUMBER ? process.env.TRAVIS_BUILD_NUMBER : null}
],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 360000,
includeStackTrace: true
}
}
main.spec.js
'use strict';
describe('Home page', function() {
var page;
beforeEach(function() {
browser.get(browser.baseUrl);
});
it('should pass', function() {
expect(true).toBe(true);
});
});
Travis log
Go here for the complete log. The highlights:
Extracting Sauce Connect
Waiting for Sauce Connect readyfile
08 Mar 16:30:00 - Sauce Connect 4.3.6, build 1628 8a5c837
08 Mar 16:30:00 - Using CA certificate bundle /etc/ssl/certs/ca-certificates.crt.
08 Mar 16:30:00 - Starting up; pid 3519
08 Mar 16:30:00 - Command line arguments: sc-4.3.6-linux//bin/sc -i 42.1 -f sauce-connect-ready-21801 -l /home/travis/sauce-connect.log
08 Mar 16:30:00 - Using no proxy for connecting to Sauce Labs REST API.
08 Mar 16:30:00 - Resolving saucelabs.com to 162.222.73.28 took 17 ms.
08 Mar 16:30:01 - Started scproxy on port 37246.
08 Mar 16:30:01 - Please wait for 'you may start your tests' to start your tests.
08 Mar 16:30:01 - Starting secure remote tunnel VM...
08 Mar 16:30:11 - Secure remote tunnel VM provisioned.
08 Mar 16:30:11 - Tunnel ID: 3cc5fd5b59984957831d125617c7d4f6
08 Mar 16:30:11 - Secure remote tunnel VM is now: booting
08 Mar 16:30:14 - Secure remote tunnel VM is now: running
08 Mar 16:30:14 - Remote tunnel host is: maki76159.miso.saucelabs.com
08 Mar 16:30:14 - Using no proxy for connecting to tunnel VM.
08 Mar 16:30:14 - Resolving maki76159.miso.saucelabs.com to 162.222.76.159 took 48 ms.
08 Mar 16:30:14 - Starting Selenium listener...
08 Mar 16:30:14 - Establishing secure TLS connection to tunnel...
08 Mar 16:30:14 - Selenium listener started on port 4445.
08 Mar 16:30:16 - Sauce Connect is up, you may start your tests.
08 Mar 16:30:16 - Connection established.
[unit tests here...all passing!]
[chrome #1] PID: 3621
[chrome #1] Specs: /home/travis/build/spamguy/diplomacy/e2e/main/main.spec.js
[chrome #1]
[chrome #1] Using SauceLabs selenium server at http://ondemand.saucelabs.com:80/wd/hub
[chrome #1] [31mF[0m
[chrome #1]
[chrome #1] Failures:
[chrome #1]
[chrome #1] 1) Home page should pass
[chrome #1] Message:
[chrome #1] [31mError: Angular could not be found on the page http://localhost:9000/ : retries looking for angular exceeded[0m
[chrome #1] Stacktrace:
[chrome #1] Error: Angular could not be found on the page http://localhost:9000/ : retries looking for angular exceeded
[chrome #1] ==== async task ====
[chrome #1] Protractor.get(http://localhost:9000/) - test for angular
[chrome #1] at [object Object].<anonymous> (/home/travis/build/spamguy/diplomacy/e2e/main/main.spec.js:7:13)
[chrome #1] ==== async task ====
[chrome #1] Asynchronous test function: beforeEach()
[chrome #1] Error
[chrome #1] at [object Object].<anonymous> (/home/travis/build/spamguy/diplomacy/e2e/main/main.spec.js:6:3)
[chrome #1] at Object.<anonymous> (/home/travis/build/spamguy/diplomacy/e2e/main/main.spec.js:3:1)
[chrome #1]
[chrome #1] Finished in 11.877 seconds
[chrome #1] [31m1 test, 2 assertions, 1 failure
[0m[chrome #1]
[chrome #1] SauceLabs results available at http://saucelabs.com/jobs/c0eed61d95044f77b200a7b21d2443a3
[launcher] 1 instance(s) of WebDriver still running
[two more WebDriver instances fail with similar errors]

FWIW, I eventually got everything working correctly. There is no 'one fix' I made so I can't really clarify the solution easily. The following files are from my repository with which I set up continuous integration.
protractor-travis.conf.js
exports.config = {
// sauce plz
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,
baseUrl: 'http://localhost',
specs: ['e2e/**/*.po.js', 'e2e/**/*.spec.js'],
framework: 'jasmine',
maxSessions: 1,
allScriptsTimeout: 40000,
getPageTimeout: 40000,
rootElement: 'html',
multiCapabilities: [
capabilitiesForBrowser('chrome', '41'),
capabilitiesForBrowser('firefox'),
capabilitiesForBrowser('safari')
],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 360000,
includeStackTrace: true
}
};
function capabilitiesForBrowser(browserName, browserVersion) {
var capabilities = {
'browserName': browserName,
'build': process.env.TRAVIS_BUILD_NUMBER,
'name': 'dipl.io'
};
if (browserVersion)
capabilities.version = browserVersion;
return capabilities;
}
Gruntfile.js
protractor: {
travis: {
options: {
configFile: 'protractor-travis.conf.js',
args: {
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY
}
}
},
local: {
options: {
configFile: 'protractor-local.conf.js'
//,debug: true
}
}
}
.travis.yml
language: node_js
node_js:
- '0.12'
services:
- mongodb
env:
global:
- secure: ioYHs4gjuL9iuwxamtKCkERvvSiBlAgxhLZ1Ry4xrZhNWe3e4pett3249hWovDYzG/eEHTA20/NDvZ1JIMYODFzY4gURVHNtUkoYNokLSDguTH1OPXGMmtQzJGersxYQOjRj3gSss7Z0joUrcfPQJsG1Vt0eHR/ewN7Qbm8NBn0=
- secure: NH3WbHM2Ir95csdWAdd7/ISYVvnYFQe7Rv4rCoYu9V6V2M9AzlARYTAvBqoK7PdD/RV0KR41t6OVeUxBVhuzT26NvBVZVyLcvfjK29AoKCDCU7VD7nQa/RQ9KyDr5DAHfyQQ5AQMhsla5qPTaFZb82F83lL44nDzrvYzE8CEaGw=
before_install:
- npm install -g bower
- bower install
- sed -i 's/git#github.com:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
- npm install -g grunt-cli
script:
- grunt test:protractor-travis

I'm having the same problem here. Except here's a difference:
When I start up a SauceConnect tunnel manually, as described here:
https://docs.saucelabs.com/reference/sauce-connect/#when-should-i-use-sauce-connect-
Then everything runs smoothly, and my build passses.
But I don't want to have to start up SauceConnect manually every time, I want that to happen automatically during the build process. So I updated the travis.yml file as instructed here:
http://docs.travis-ci.com/user/sauce-connect/
In this case, the tunnel is opened automatically. Here's a bit of the log, too long to paste all, but I can assure you that the tunnel is opened.
Starting Sauce Connect
25.96s$ travis_start_sauce_connect
Using temp dir /tmp/sc.hHct
/tmp/sc.hHct ~/build/Diobox/diobox_stateful
Downloading Sauce Connect
--2015-06-11 17:13:21-- http://saucelabs.com/downloads/sc-4.3.6-linux.tar.gz
Resolving saucelabs.com (saucelabs.com)... 162.222.73.28
Connecting to saucelabs.com (saucelabs.com)|162.222.73.28|:80... connected.
HTTP request sent, awaiting response... 200 OK
....
11 Jun 17:13:23 - Starting up; pid 3524
11 Jun 17:13:23 - Command line arguments: sc-4.3.6-linux//bin/sc -i 25.1 -f sauce-connect-ready-29337 -l /home/travis/sauce-connect.log
11 Jun 17:13:23 - Using no proxy for connecting to Sauce Labs REST API.
11 Jun 17:13:23 - Resolving saucelabs.com to 162.222.73.28 took 1 ms.
11 Jun 17:13:24 - ***********************************************************
11 Jun 17:13:24 - A newer version of Sauce Connect (build 1671) is available!
11 Jun 17:13:24 - Download it here:
11 Jun 17:13:24 - https://saucelabs.com/downloads/sc-4.3.8-linux.tar.gz
11 Jun 17:13:24 - ***********************************************************
11 Jun 17:13:24 - Started scproxy on port 50965.
11 Jun 17:13:24 - Please wait for 'you may start your tests' to start your tests.
11 Jun 17:13:24 - Starting secure remote tunnel VM...
11 Jun 17:13:24 - Shutting down named tunnel 25.1 (b7f004bfd8174ac6be612082b1654367).
11 Jun 17:13:32 - Secure remote tunnel VM provisioned.
11 Jun 17:13:32 - Tunnel ID: 6f295a34dfe14b639b78438e59307ae3
11 Jun 17:13:32 - Secure remote tunnel VM is now: booting
11 Jun 17:13:46 - Secure remote tunnel VM is now: running
11 Jun 17:13:46 - Remote tunnel host is: maki78107.miso.saucelabs.com
11 Jun 17:13:46 - Using no proxy for connecting to tunnel VM.
11 Jun 17:13:46 - Resolving maki78107.miso.saucelabs.com to 162.222.78.107 took 8 ms.
11 Jun 17:13:46 - Starting Selenium listener...
11 Jun 17:13:46 - Establishing secure TLS connection to tunnel...
11 Jun 17:13:46 - Selenium listener started on port 4445.
11 Jun 17:13:47 - Sauce Connect is up, you may start your tests.
11 Jun 17:13:47 - Connection established.
But then once the connection is opened, and build gets to the point where tests should be running, I get the same Angular errors you listed above.

Related

Cannot start Apache2 server on RaspberryPi 4

I installed Apache2 on Raspberry Pi4 B but it is not starting. If anyone had the same issue, please let me know the solution.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-06-07 21:07:32 EEST; 22ms ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 30140 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)
Jun 07 21:07:32 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Jun 07 21:07:32 raspberrypi apachectl[30140]: /usr/sbin/apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apache2: not found
Jun 07 21:07:32 raspberrypi apachectl[30140]: Action 'start' failed.
Jun 07 21:07:32 raspberrypi apachectl[30140]: The Apache error log may have more information.
Jun 07 21:07:32 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=127/n/a
Jun 07 21:07:32 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 07 21:07:32 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Problem solved with:
sudo apt install --reinstall apache2-bin
sudo service apache2 start

MSSQL Service failed to start on ubuntu

Every time i checked the MSSQL service is failing i have over 5 GB memory on my virtual server. I have changed the sql port to 1533.
r*****k:~# sudo systemctl status mssql-server
● mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Fri 2017-11-17 15:39:39 UTC; 1min 37s ago
Process: 4906 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=255)
Main PID: 4906 (code=exited, status=255)
Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Unit entered failed state.
Nov 17 15:39:39 SV0*****com systemd[1]: mssql-server.service: Failed with result 'exit-code'.
Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Service hold-off time over, scheduling restart.
Nov 17 15:39:39 SV0*****.com systemd[1]: Stopped Microsoft SQL Server Database Engine.
Nov 17 15:39:39 SV0*****.com systemd[1]: mssql-server.service: Start request repeated too quickly.
Nov 17 15:39:39 SV0*****.com systemd[1]: Failed to start Microsoft SQL Server Database Engine.
r*****k:/var/opt/mssql# cat mssql.conf
> [EULA] accepteula = Y</br>
>
> [network] ipaddress = 6*.*1.1*2.*8 kerberoskeytabfile =
> /var/opt/mssql/secrets/mssql.keytab tcpport = 1533
>
> [memory] memorylimitmb = 3328
>
> [filelocation] defaultdatadir = /tmp/data
Anyone can help to stable the mssql service on the vm.
Does your Ubuntu server have the firewall enabled? If so, it may be blocking port 1533, which is preventing the service from starting on that custom port.
You may want to look in /var/log/messages for additional information as well.

karma chrome not loading.its giving up after two attempts

I'm integrating Jasmine and karma for unit testing my ionic app.
I'm following this blog.
When i run the karma start command i keep getting this result.
23 02 2017 16:39:18.508:WARN [karma]: No captured browser, open
23 02 2017 16:39:18.517:INFO [karma]: Karma v1.5.0 server started at http://0.0.0.0:9876/
23 02 2017 16:39:18.517:INFO [launcher]: Launching browser Chrome with unlimited concurrency
23 02 2017 16:39:18.536:INFO [launcher]: Starting browser Chrome
23 02 2017 16:40:18.537:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
23 02 2017 16:40:18.910:INFO [launcher]: Trying to start Chrome again (1/2).
23 02 2017 16:41:18.911:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
23 02 2017 16:41:19.357:INFO [launcher]: Trying to start Chrome again (2/2).
Tried with PhantomJS also
Same error
Launching browser PhantomJS with unlimited concurrency
23 02 2017 17:44:30.214:INFO [launcher]: Starting browser PhantomJS
23 02 2017 17:45:30.215:WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
23 02 2017 17:45:30.238:INFO [launcher]: Trying to start PhantomJS again (1/2).
23 02 2017 17:46:30.239:WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
23 02 2017 17:46:30.246:INFO [launcher]: Trying to start PhantomJS again (2/2).
23 02 2017 17:47:30.247:WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
23 02 2017 17:47:30.254:ERROR [launcher]: PhantomJS failed 2 times (timeout). Giving up.
Config
// Karma configuration
// Generated on Thu Feb 23 2017 10:39:27 GMT+0530 (IST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'../www/lib/ionic/js/ionic.bundle.js',
'../www/js/**/*.js',
'../tests/unit-tests/**/*.js',
'../node_modules/angular-mocks/angular-mocks.js'
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
// browsers: ['PhantomJS'],
browsers: ['Chrome'],
// customLaunchers: {
// Chrome_no_sandbox: {
// base: 'Chrome',
// flags: ['--no-sandbox']
// }
// },
plugins:[
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-chrome-launcher'
],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity,
})
}
Please help
Thanks!
This is the top Google result for this question, so even though it's old I hope my answer helps someone.
In our case the issue was caused by multiple files importing from the wrong library. This seems strange since you would think that Karma would throw an error rather than just refusing to open Chrome, but altering our import statements got us past the issue.
import { ChangeDetectionStrategy } from "#angular/core";
NOT AS OUR FILES HAD IT: import { ChangeDetectionStrategy } from "#angular/compiler/src/core";
This says you should try add the below code to karma.conf.js file:
browsers: ['Chrome_no_sandbox'],
customLaunchers: {
Chrome_no_sandbox: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
Try increasing browserDisconnectTolerance. Reasons could be different, from the wrong path in karma.config to some flaky npm run.

Apache2 is not starting after apt upgrade

I updated Apache2 on my Rapsberry Pi (using: apt install apache2 --only-upgrade) and now it is not starting:
root#pi:/etc/apache2 # service apache2 start
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
root#pi:/etc/apache2 # systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
Active: failed (Result: resources) since Sun 2017-02-05 16:19:48 CET; 28min ago
Feb 05 16:47:44 pi systemd[1]: Starting The Apache HTTP Server...
Feb 05 16:47:44 pi systemd[1]: apache2.service failed to run 'start' task: No such file or directory
Feb 05 16:47:44 pi systemd[1]: Failed to start The Apache HTTP Server.
Version of apache2:
Server version: Apache/2.4.25 (Raspbian)
Server built: 2017-01-25T22:59:26
apache2ctl -t shows:
Syntax OK
I tried disabling all virtual hosts (only default left) but it didn't change anything.
Output of just apache2:
[Mon Feb 06 01:25:09.079790 2017] [core:warn] [pid 2954] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
I had the same issue after upgrading a Dockerfile from 14.04 to 17.04.
The solution for me was to manually add the apache directory in /var/run
So the fix was:
mkdir /var/run/apache2
The DefaultRuntimeDir was set to /var/run/apache2 but the folder was missing.

Selenium RemoteWebDriver 2.39 with firefox 26

I'm using selenium-standalone-server-2.39 as RemoteWebDriver[server is running on different machine] with firefox 26 on windows 7.test execution is working fine but when code try to close or quit the driver/browser during suite teardown then it gives UnreachableBrowserException. although If I use webdriver locally[server is running on same machine] it works perfectly.
I have already tried with different version of webdriver 2.36,2.37,2.38 with ff 26 but same exception comes every time.
If someone help me to resolve this problem it will be very helpful.
what combination of selenium webdriver and firefox which works perfectly?
EDIT: This simple piece of code i'm trying to run-
public static void main(String s[]) throws Exception {
URL url = new URL( "http", ip, 4444, "/wd/hub" );
FirefoxProfile pf = new FirefoxProfile(new File("D:\\ffprofile"));
DesiredCapabilities capabilities =DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, pf);
System.out.println("1");
capabilities.setJavascriptEnabled(true);
System.out.println("2");
WebDriver driver = new RemoteWebDriver(url,capabilities);
System.out.println("4");
driver.get("http://www.google.com");
driver.close();
}
Exception:
Jan 07, 2014 1:10:32 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
Jan 07, 2014 1:10:32 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Jan 07, 2014 1:10:51 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
Jan 07, 2014 1:10:51 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Jan 07, 2014 1:11:10 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
Jan 07, 2014 1:11:10 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.38.0', revision: 'bd32d4e', time: '2013-12-05 16:15:38'
System info: host: 'symc-w7-12281', ip: '10.88.155.166', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_25'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:418)
at SeleniumTest.main(SeleniumTest.java:30)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:160)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:84)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:273)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:283)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:251)
at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:223)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(HttpCommandExecutor.java:319)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:298)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
... 3 more
Try commenting out this line in your code:
capabilities.setCapability(FirefoxDriver.PROFILE, pf);
Instead of specifying the profile you want to use on your grid, just configure the profile in the grid configuration explicitly, or don't specify profile at all so that Firefox just uses a default profile.
If you look at the release notes for Selenium 2.41.0 ( https://selenium.googlecode.com/git/java/CHANGELOG ) you will notice that Firefox 26 is no longer supported. It was supported in 2.39 but you can use the release notes to make sure you are using the right version. In fact, Selenium 2.44.0 only supports Firefox 24, 31, 32 and 33.
I would try downgrading your version of Firefox

Resources