Skip to content
This repository has been archived by the owner. It is now read-only.

Firefox Profile for Webdriver is defective - fix included #3144

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

Firefox Profile for Webdriver is defective - fix included #3144

lukeis opened this issue Mar 3, 2016 · 14 comments

Comments

@lukeis
Copy link
Member

@lukeis lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 3144

What steps will reproduce the problem?
Running this test case https://gist.github.com/1560299 against Selenium 2.15

What is the expected output? What do you see instead?
I don't expect to see any Firefox error messages.
Instead an AutoConfig warning pops up.

Selenium version: 2.15
OS: Windows 7
Browser: Firefox
Brower version: 8.0.1

The problem originates from the fact that the property           "toolkit.telemetry.prompted"
in prefs.js has been changed from a numerical value to a boolean.
To fix the issue the map "FROZEN_PREFERENCES" in org.openqa.selenium.firefox.FirefoxProfile
needs to be adapted.
Changing
.put("toolkit.telemetry.prompted", 2)
to
.put("toolkit.telemetry.prompted", true)
fixes the issue for me.

Reported by tobias.geyer@gmx.de on 2012-01-04 14:44:23

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

This issue was closed by revision r15368.

Reported by dawagner on 2012-01-04 15:25:27

  • Status changed: Fixed
@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

you are fast - thanks a lot!

Reported by tobias.geyer@gmx.de on 2012-01-04 15:27:40

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

reopening. 

None of our tests have hit this issue. Are you running this through a proxy or is your
IT department handling all of the Firefox roll outs?

Reported by david.burns@theautomatedtester.co.uk on 2012-01-05 00:00:13

  • Status changed: New
@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

Unfortunately I have no idea why your tests are not hitting this issue.
Did you take a look at the gist I posted? This reproduces the error perfectly for me.

I've run into this issue on Windows 7 64Bit using Firefox 32Bit - maybe that's related?
I'm installing Firefox on my own (no IT department involved) and I'm not using it through
a proxy.

After digging through the firefox source code (for version 8.0.1) I've found this:

#ifdef MOZ_TELEMETRY_REPORTING
  _showTelemetryNotification: function BG__showTelemetryNotification() {
    const PREF_TELEMETRY_PROMPTED = "toolkit.telemetry.prompted";
    const PREF_TELEMETRY_ENABLED  = "toolkit.telemetry.enabled";
    const PREF_TELEMETRY_INFOURL  = "toolkit.telemetry.infoURL";
    const PREF_TELEMETRY_SERVER_OWNER = "toolkit.telemetry.server_owner";

    try {
      // If the user hasn't already been prompted, ask if they want to
      // send telemetry data.
      if (Services.prefs.getBoolPref(PREF_TELEMETRY_ENABLED) ||
          Services.prefs.getBoolPref(PREF_TELEMETRY_PROMPTED))
         return;
    } catch(e) {}

Services.prefs.getBoolPref indicates that this is a boolean setting, not a numerical
one.

Reported by tobias.geyer@gmx.de on 2012-01-05 16:05:27

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

Forgot to add: The code snippet is from browser/components/nsBrowserGlue.js

Reported by tobias.geyer@gmx.de on 2012-01-05 16:07:03

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

Just came across this using Firefox 9. Looks like the type of the toolkit.telemetry.prompted
preference has changed between Firefox 8 and Firefox 9. Selenium will somehow have
to handle both?
See https://bugzilla.mozilla.org/show_bug.cgi?id=697860.

Reported by mattponsford on 2012-01-06 03:43:43

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

Issue 3154 has been merged into this issue.

Reported by dawagner on 2012-01-06 14:22:15

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

OK, so back in 3154 I pointed out that the following:

      profile = Selenium::WebDriver::Firefox::Profile.new
      # See http://code.google.com/p/selenium/issues/detail?id=3154
 #      profile['toolkit.telemetry.prompted'] = 2
 #      profile['toolkit.telemetry.rejected'] = true

      caps = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile =>
profile)
      @driver = Selenium::WebDriver.for( :remote,  :url => "http://localhost:#{@port}/wd/hub
                                        :desired_capabilities => caps)

works for me, even with the two commented out lines.  This was very suspicious, and
I've figured it out: my "solution" was disabling native events; see http://code.google.com/p/selenium/issues/detail?id=3163

So, with native events off, the telemetry can be ignored, but then you're not in native
events mode and other things can (and do) explode if you rely on mouse movements.

In native events mode, Selenium can't click anything until you manually interact with
the telemetry window.

So, we're back to square one, which is things not working.  :(

-Robin

Reported by robinleepowell on 2012-01-07 02:59:06

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

This was fixed for Firefox 8 and 9 in r15444. With the changes in this revision, the
telemetry prompt does not appear for either version.

Reported by eran.mes on 2012-01-09 12:02:31

  • Status changed: Fixed
@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

Loverly.  Is it possible to get a nightly build of that or something?

-Robin

Reported by robinleepowell on 2012-01-09 16:35:02

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

When is this expected to be in official release ?

Reported by pavithz on 2012-01-11 11:58:20

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

This should be in 2.17, which is scheduled to be released on Friday.

Reported by eran.mes on 2012-01-11 14:20:25

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

Any updated release plan for 2.17 ?

Reported by pavithz on 2012-01-16 05:12:48

@lukeis
Copy link
Member Author

@lukeis lukeis commented Mar 3, 2016

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

  • Labels added: Restrict-AddIssueComment-Commit
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant