protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Firefox 45.0.1 Unsecure connection - prohibiting tests running

Open mrowles opened this issue 10 years ago • 23 comments

Firefox seems to have certificate security issues when booting up from Protractor, hangs and then doesn't run the tests. We tried to set the homepage to something other than Firefox first start page (https://www.mozilla.org/en-US/firefox/45.0.1/firstrun/learnmore/) on start but it ignores the settings. We also tried to add this exception but it didn't solve this issue, nor would I see how it could on a CI environment.

This has been tested on multiple workstations and worked prior to upgrade to this version (previous versions were 44.x).

Screenshot of security warnings

Bug report

  • Node Version: >=4.1.2
  • Protractor Version: ~3.0.0
  • Browser(s): Firefox 45.0.1
  • Operating System and Version OSX El Capitan 10.11.3
  • Your protractor configuration file
'use strict';

var paths = require('./.yo-rc.json')['generator-gulp-angular'].props.paths;

// An example configuration file.
exports.config = {

  // Capabilities to be passed to the webdriver instance.
  capabilities: {
    'browserName': 'firefox'
  },

  // Spec patterns are relative to the current working directly when
  // protractor is called.
  specs: [paths.e2e + '/**/*.js'],

  // Options to be passed to Jasmine-node.
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 60000
  },

  allScriptsTimeout: 60000
};
  • A relevant example test

navbar.po.js

'use strict';

var Navbar = function() {
  this.navbar = element(by.css('nav'));
  this.searchButton = this.navbar.element(by.css('.search'));
  this.logoButton = this.navbar.element(by.css('.logo'));
};

module.exports = new Navbar();

navbar.spec.js

'use strict';

describe('Navbar', function () {
  var navbar;

  beforeEach(function () {
    navbar = require('./navbar.po');
  });

  describe('the logo', function () {
    beforeEach(function () {
      browser.get('http://localhost:3000/about');
    });

    it('should go to the home page when clicked', function () {
      navbar.logoButton.click().then(function () {
        expect(browser.getCurrentUrl()).toBe('http://localhost:3000/');
      });
    });
  });
});

  • Output from running the test
Selenium standalone server started at http://192.168.200.140:53357/wd/hub

/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108
  var template = new Error(this.message);
                 ^
UnknownError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
","version":"45.0.1","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1458532151000,"updateDate":1458532151000,"applyBackgroundUpdates":1,"skinnable":true,"size":7140,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"45.0.1","maxVersion":"45.0.1"}],"targetPlatforms":[],"seen":true}
1458532175438   addons.xpi  DEBUG   getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1458532175439   DeferredSave.extensions.json    DEBUG   Save changes
1458532175439   addons.xpi  DEBUG   Updating database with changes to installed add-ons
1458532175439   addons.xpi-utils    DEBUG   Updating add-on states
1458532175440   addons.xpi-utils    DEBUG   Writing add-ons list
1458532175442   addons.xpi  DEBUG   Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1458532175443   addons.xpi  DEBUG   Calling bootstrap method startup on [email protected] version 0.1
1458532175453   addons.manager  DEBUG   Starting provider: <unnamed-provider>
1458532175453   addons.manager  DEBUG   Registering shutdown blocker for <unnamed-provider>
1458532175453   addons.manager  DEBUG   Provider finished startup: <unnamed-provider>
1458532175461   addons.manager  DEBUG   Registering shutdown blocker for XPIProvider
1458532175461   addons.manager  DEBUG   Provider finished startup: XPIProvider
1458532175461   addons.manager  DEBUG   Starting provider: LightweightThemeManager
1458532175461   addons.manager  DEBUG   Registering shutdown blocker for LightweightThemeManager
1458532175462   addons.manager  DEBUG   Provider finished startup: LightweightThemeManager
1458532175462   addons.manager  DEBUG   Starting provider: GMPProvider
1458532175465   addons.manager  DEBUG   Registering shutdown blocker for GMPProvider
1458532175465   addons.manager  DEBUG   Provider finished startup: GMPProvider
1458532175465   addons.manager  DEBUG   Starting provider: PluginProvider
1458532175465   addons.manager  DEBUG   Registering shutdown blocker for PluginProvider
1458532175465   addons.manager  DEBUG   Provider finished startup: PluginProvider
1458532175465   addons.manager  DEBUG   Completed startup sequence
1458532175740   DeferredSave.extensions.json    DEBUG   Starting write
1458532175835   addons.repository   DEBUG   No addons.json found.
1458532175835   DeferredSave.addons.json    DEBUG   Save changes
1458532175837   DeferredSave.addons.json    DEBUG   Starting timer
1458532175853   addons.manager  DEBUG   Starting provider: PreviousExperimentProvider
1458532175853   addons.manager  DEBUG   Registering shutdown blocker for PreviousExperimentProvider
1458532175853   addons.manager  DEBUG   Provider finished startup: PreviousExperimentProvider
1458532175861   DeferredSave.extensions.json    DEBUG   Write succeeded
1458532175861   addons.xpi-utils    DEBUG   XPI Database saved, setting schema version preference to 17
1458532175892   DeferredSave.addons.json    DEBUG   Starting write
1458532175900   DeferredSave.addons.json    DEBUG   Write succeeded
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
get_inPrivateContext@chrome://global/content/bindings/autocomplete.xml:159:8
handleEnter@chrome://global/content/bindings/autocomplete.xml:523:18
handleKeyPress@chrome://global/content/bindings/autocomplete.xml:498:24
onKeyPress@chrome://global/content/bindings/autocomplete.xml:431:18
onxblkeypress@chrome://global/content/bindings/autocomplete.xml:600:8

    at new bot.Error (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
    at Object.bot.response.checkResponse (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
    at /Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24
    at [object Object].promise.Promise.goog.defineClass.invokeCallback_ (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1337:14)
    at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_.execute_ (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2776:14)
    at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_ (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2758:21)
    at goog.async.run.processWorkQueue (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:124:15)
    at process._tickCallback (node.js:402:9)
From: Task: WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
    at Function.webdriver.WebDriver.createSession (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
    at [object Object].Builder.build (/Users/user/workspace/user-app/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
    at [object Object].DriverProvider.getNewDriver (/Users/user/workspace/user-app/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
    at [object Object].Runner.createBrowser (/Users/user/workspace/user-app/node_modules/protractor/lib/runner.js:186:37)
    at /Users/user/workspace/user-app/node_modules/protractor/lib/runner.js:276:21
    at _fulfilled (/Users/user/workspace/user-app/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/Users/user/workspace/user-app/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/Users/user/workspace/user-app/node_modules/protractor/node_modules/q/q.js:759:13)
    at /Users/user/workspace/user-app/node_modules/protractor/node_modules/q/q.js:573:44
[launcher] Process exited with error code 1

/Users/user/workspace/user-app/gulp/e2e-tests.js:23
        throw err;
        ^
Error: protractor exited with code 1
  • Steps to reproduce the bug Simple command-line usage, we run our protractor tests via gulp. I can provide gulp task code if necessary but this doesn't seem like a gulp problem.
  • The URL you are running your tests against (if relevant) localhost

mrowles avatar Mar 21 '16 04:03 mrowles

When TravisCI upgraded from FF v45.0 Linux to v45.0.1, the Protractor tests stopped working (Error('Timed out waiting for the WebDriver server at ' + url)); Using FF v45.0 fixed the issue on TravisCI.

Now seeing the same thing happening after FF upgraded to v45.0.1 on OSX. Changed Protractor config to use "chrome" as the browser (and used webdriver-manager update to get chromedriver), and everything works fine.

FF v45.0.1 == :imp:

EDIT: Firefox versions with Protractor 3.2.1: :x: FF 45.0.1 MAC (auto-updated) :x: FF 45.0 MAC (en-gb) from https://ftp.mozilla.org/pub/firefox/releases/45.0/mac/en-GB/ :white_check_mark: FF 44.0.2 MAC (en-gb) from https://ftp.mozilla.org/pub/firefox/releases/44.0.2/mac/en-GB/

uglow avatar Mar 24 '16 01:03 uglow

Any updates on a fix for this issue that doesn't involve downgrading FF or switching to chrome?

chriswong929 avatar May 02 '16 15:05 chriswong929

@chriswong929 Seems like it's working post 45.0.1! Working fine since 45.0.2 (I believe current latest version is 46.x)

mrowles avatar May 04 '16 12:05 mrowles

Thanks For the update - I'll check it out

Sent from my iPhone

On 4 May 2016, at 10:40 PM, Matthew Rowles [email protected] wrote:

@chriswong929 Seems like it's working post 45.0.1! Working fine since 45.0.2.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub

uglow avatar May 04 '16 21:05 uglow

45.0.1, 45.0.2 and 46.0 on Travis CI (Linux) do not work with Protractor 3.2.1.

Version 45.0 works on Travis CI. Sticking with that for now.

uglow avatar May 08 '16 22:05 uglow

Let me check logs when I get in, we perhaps are running an old version also now. Sorry! Locally it runs fine on those versions though

mrowles avatar May 08 '16 22:05 mrowles

I should add, the website address I'm connecting to is https://localhost:3000/. The certs are self-signed (part of webpack). Haven't had a problem with Firefox until 45.0.1

uglow avatar May 08 '16 23:05 uglow

Actually, 46 is not working locally now, it must have been 45.0.2 and 45.0.3 that worked.

mrowles avatar May 09 '16 23:05 mrowles

FF 47 beta 7 EN-GB Windows also not working with Protractor 3.2.1. Tried with both a HTTP and HTTPS version of the site. Site works fine with FF v45.0 Windows (EN-GB).

From my testing (see history above) no version of Firefox after version 45.0 works with Protractor 3.2.1.

uglow avatar May 27 '16 00:05 uglow

We've been having the same issue, we've had firefox disabled for the past couple months because we cannot get protractor to run on any of the newer versions.

scottaj avatar Jun 01 '16 16:06 scottaj

Same here with Firefox version: 47.0

alfirin avatar Jun 14 '16 09:06 alfirin

Using Ubuntu 16.04, Firefox 47.0. It isn't working. I get a "WebDriverError: Connection refused" error message

marianobianchi avatar Jun 17 '16 16:06 marianobianchi

I am experiencing the same with Firefox 47.0.1

11:55:23.900 INFO - Executing: [new session: Capabilities [{count=2, browserName=firefox}]]) 11:55:23.901 INFO - Creating a new session for Capabilities [{count=2, browserName=firefox}] org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms.

cangd avatar Jul 06 '16 10:07 cangd

Subscribing. Same for me with 47.0+build3-0ubuntu0.16.04.1.

Wtower avatar Jul 09 '16 16:07 Wtower

Same as above: Firefox 47 for Linux Mint

zablotski avatar Jul 11 '16 11:07 zablotski

@cnishina for firefox woes :)

juliemr avatar Jul 14 '16 20:07 juliemr

same for me; from 45 on all versions of firefox does not work.

the upstream issue is described here and is a bug in firefox solved in 47.0.1 but i cannot confirm it: https://github.com/SeleniumHQ/selenium/issues/2204

i think that all the tickes that lead to this fix (https://github.com/angular/protractor/issues/3384) were starting from having this firefox issue; this could help you dealing with such users.

evilaliv3 avatar Jul 20 '16 08:07 evilaliv3

@evilaliv3 and @juliemr them ff woes. I have verified Firefox 47.0.1 appears to work with Protractor (on multiple machines and setups).

Firefox versions that work with Protractor: versions up to 44.x.x and versions 47.0.1+.

@mrowles please try again with Firefox 47.0.1 and update this issue if this is still the issue.

cnishina avatar Aug 01 '16 18:08 cnishina

Same issue with FF 48.0.1 on Mac and Windows.

siddharthagit avatar Aug 25 '16 20:08 siddharthagit

@cnishina Thanks for the help. I've tested this with Firefox 48.0.2 on OSX 10.11.6, using protractor 3.2.2 and whilst the security message is gone, absolutely nothing happens in the browser. Here is the beginning of the the timeout logs, can post the full log if helps:

WebDriverError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:

mrowles avatar Aug 29 '16 23:08 mrowles