Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox 45.0.1 Unsecure connection - prohibiting tests running #3044

Closed
mrowles opened this issue Mar 21, 2016 · 23 comments
Closed

Firefox 45.0.1 Unsecure connection - prohibiting tests running #3044

mrowles opened this issue Mar 21, 2016 · 23 comments

Comments

@mrowles
Copy link

mrowles commented Mar 21, 2016

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/loop@mozilla.org.xpi
1458532175443   addons.xpi  DEBUG   Calling bootstrap method startup on loop@mozilla.org 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
@uglow
Copy link

uglow commented Mar 24, 2016

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 == 👿

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

@chriswong929
Copy link

chriswong929 commented May 2, 2016

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

@mrowles
Copy link
Author

mrowles commented May 4, 2016

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

@uglow
Copy link

uglow commented May 4, 2016

Thanks For the update - I'll check it out

Sent from my iPhone

On 4 May 2016, at 10:40 PM, Matthew Rowles notifications@github.com 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
Copy link

uglow commented May 8, 2016

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.

@mrowles
Copy link
Author

mrowles commented May 8, 2016

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

@uglow
Copy link

uglow commented May 8, 2016

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

@mrowles
Copy link
Author

mrowles commented May 9, 2016

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

@uglow
Copy link

uglow commented May 27, 2016

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.

@scottaj
Copy link

scottaj commented Jun 1, 2016

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.

@alfirin
Copy link

alfirin commented Jun 14, 2016

Same here with Firefox version: 47.0

@marianobianchi
Copy link

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

@cangd
Copy link

cangd commented Jul 6, 2016

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.

@Wtower
Copy link

Wtower commented Jul 9, 2016

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

@zablotski
Copy link

Same as above: Firefox 47 for Linux Mint

@juliemr
Copy link
Member

juliemr commented Jul 14, 2016

@cnishina for firefox woes :)

@evilaliv3
Copy link
Contributor

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: SeleniumHQ/selenium#2204

i think that all the tickes that lead to this fix (#3384) were starting from having this firefox issue; this could help you dealing with such users.

@cnishina
Copy link
Member

cnishina commented Aug 1, 2016

@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.

@siddharthagit
Copy link

Same issue with FF 48.0.1 on Mac and Windows.

@mrowles
Copy link
Author

mrowles commented Aug 29, 2016

@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:

@piotrekkmt
Copy link

piotrekkmt commented Aug 31, 2016

I'll +1 to that. Protractor Version 4.0.9 on Mac and Firefox after 48.0 and 49.0.1 open up if the marionette settting is set to true. Nonetheless, the security checks for the certs open up the browser in a "first run mode" which doesn't remember to ignore self signed ssl certs. Any progress on this?

@juliemr
Copy link
Member

juliemr commented Dec 22, 2016

I'm going to go ahead and close this as obsolete. FF 47 works. FF 48 and 49 don't work with anything because of changes to webdriver, and we're investigating getting FF50 running now that webdriver@3 is out.

@juliemr juliemr closed this as completed Dec 22, 2016
@benjaminapetersen
Copy link

This issue seems to keep bubbling up. Our CI env just updated to FF ESR (extended service release) v52.4, which has the certs problem again.

I see chrome has a nice way to bypass self signed certs via chromeOptions in the protractor.conf, ideally other browsers would have analogous config options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests