Skip to content

Firefox 49 works with my signed WebDriver but it does not with Selenium's unsigned one #2942

Closed

Description

@andreicristianpetcu

Please read the issue an not mark it as duplicate of #2559

Meta -

OS:
Ubuntu 16.04
Selenium Version:
2.53.1
Browser:
Firefox

Browser Version:
49.0 (64-bit)

Expected Behavior -

Firefox 48+ should work with Selenium's WebDriver just as it works with my signed WebDriver

Actual Behavior -

Selenium replaces my WebDriver which works with v49 with the unsigned one which does not work with Firefox v48+

Steps to reproduce -

Install my signed web driver and start Protractor or Selenium.

Activity

  1. andreicristianpetcu commented on Oct 17, 2016

    @andreicristianpetcu
    Author

    Please read this comment it explains how to sign your webdriver without passing Mozilla's code review.

    Sorry for making another bug since I think that people don't look at closed issues.

  2. changed the title [-]Firefox 49 work with my signed WebDriver but not with Selenium's unsigned one[/-] [+]Firefox 49 works with my signed WebDriver but not with Selenium's unsigned one[/+] on Oct 17, 2016
  3. changed the title [-]Firefox 49 works with my signed WebDriver but not with Selenium's unsigned one[/-] [+]Firefox 49 works with my signed WebDriver but it does not with Selenium's unsigned one[/+] on Oct 17, 2016
  4. lukeis commented on Oct 17, 2016

    @lukeis
    Member

    @andreicristianpetcu if you replace the webdriver.xpi in the standalone.jar (it's basically a zip file, you can unpack and re-zip up). You'll be able to run with your own customized extension instead.

    @AutomatedTester @andreastt @davehunt is this an acceptable method to bypass mozilla's extension signing and do it ourselves?

    from the other issue comment:

    You don't need Mozilla's review in order to get the addon signed. Change the UUID in install.rdf of the addon to a new generated value and run JPM sign like so.

      <Description RDF:about="urn:mozilla:install-manifest" em:id="{681B9050-93CA-11E6-827B-DB5CC7AD2208}"
    jpm sign --api-key $MY_AMO_API_KEY_COPIED_FROM_AMO --api-secret $MY_AMO_API_SECRET_COPIED_FROM_AMO --xpi firefox-driver.xpi
  5. davehunt commented on Oct 17, 2016

    @davehunt
    Contributor

    I'll leave others to comment of if we should do this, but I doubt there will be any support from Mozilla or Selenium if the legacy FirefoxDriver is broken by changes in Firefox releases. All effort is now going into Marionette and GeckoDriver.

  6. andreicristianpetcu commented on Oct 17, 2016

    @andreicristianpetcu
    Author

    @lukeis replacing it does not work :( If I delete webdriver.xpi I get no error and each new run will still have it. It must be somewhere in some cache, profile or something. If I delete the file from node-modules I should get an error but I don't.

    @davehunt I know time working on Free Software projects is very little and should not be wasted but this is a popular issue (it's put in the template of all the new issues) and it can be fixed in 10 minutes. This is not an API change. The file only needs to get signed, it's a trivial operation. From what I understand FirefoxDriver is the stable and GeckoDriver is the beta. Lots of people are using FirefoxDriver still.

    This is not bypassing Mozilla's addons signature, it's using Mozilla's addon signature. This is not a trick or a hack. Mozilla supports unlisted addons for quite some time now. There are APIs for this. Mozilla cares only about addon integrity for unlisted addons. You can do whatever you want in the addon if it unlisted, you only need to sign it. It's a small requirement.

  7. AutomatedTester commented on Oct 17, 2016

    @AutomatedTester
    Member

    If its using jpm then it should be fine to do.

    I want to make something explicitly clear on this though, since Mozilla has put a lot of effort into the specification and getting GeckoDriver up to speed, that if we do this and FirefoxDriver stops working, which could happen at the release of 50, Mozilla won't be putting any effort into fixing it and neither will the Selenium project. This will have to be wholly community driven.

  8. lukeis commented on Oct 17, 2016

    @lukeis
    Member

    @andreicristianpetcu so... it's not working for me... getting a weird error:

    jpm sign --api-key $AMO_API_KEY --api-secret $AMO_API_SECRET --xpi build/javascript/firefox-driver/webdriver.xpi
    JPM [error] FAIL
    Error: EACCES, stat '/var/folders/r8/3v1w2db52gx3gjbs393990_910gc7h/T/tmp-extracted-xpi-32363vS8JAAYJcWCq/platform/WINNT_x86-msvc'
    at Error (native)

    that temp folder doesn't exist... no idea where it's going wrong.

  9. andreicristianpetcu commented on Oct 17, 2016

    @andreicristianpetcu
    Author

    strange...... jpm is a nodejs tool..... try running it with node-debug or node-inspector. For me it worked fine. I signed several unmaintained addons this way

  10. lukeis commented on Oct 18, 2016

    @lukeis
    Member

    i tried a few steps in with node debug... and I'm not familiar enough with jpm to understand where to step into. So, I logged a bug with them and hopefully someone there knows more. I'm hoping for some simple user error on my part :)

    mozilla-jetpack/jpm#600

  11. andreicristianpetcu commented on Oct 19, 2016

    @andreicristianpetcu
    Author

    @lukeis Are you trying to sign v3.0.0? Why not try v2.53.x? I signed v2.53.0 I think and it worked....

  12. lukeis commented on Oct 19, 2016

    @lukeis
    Member

    Why would I try signing the old version? Also there should be much / anything different with the one in 3.0

  13. andreicristianpetcu commented on Oct 19, 2016

    @andreicristianpetcu
    Author

    The current stable works with 2.53.0 right? 3.0 is beta. Am I wrong? This is a bug with the current issue, not a feature request.

  14. lukeis commented on Oct 19, 2016

    @lukeis
    Member

    3.0 is not beta anymore , we released 3.0.0 (and 3.0.1)

  15. 20 remaining items

  16. davehunt commented on Nov 22, 2016

    @davehunt
    Contributor

    At least please stop blaming Firefox for your lack of signed addons.

    We'd welcome patches to the issue template if you feel the current wording could be improved.

  17. AutomatedTester commented on Nov 22, 2016

    @AutomatedTester
    Member

    @ryantrevisol

    Thank you for your comment.

    all parties involved are hurting your customers

    From your comment you seem to think that the Selenium team is paid for the work that you can use. Unfortunately that is not true. This is not a politics issue, this is an issue about trying to spend the right amount of time on the right thing for a small group of people.

    Both within Mozilla and Selenium, this group is tiny. There are other things that make need priority of work and items that need to be done in time.

    Since this is a product that you consume for free from people who put their free time into it, perhaps it would be better if you treated it as such. If something isnt happening at the pace you would prefer you can always step up and submit some patches to get things fixed.

  18. andreicristianpetcu commented on Nov 23, 2016

    @andreicristianpetcu
    Author

    @davehunt I don't think I can send a pull request on that file. I see other changes but not that file in my pull request. Strange. I added this text:

    CURRENTLY SELENIUM AND FIREFOX 48+ ONLY WORK WITH GECKODRIVER. Any issue logged here for 48+ will be closed as a duplicate of #2559 If you wish to add back support for WebDriver please contribute but just keep in mind that WebDriver will not be supported in the future.

    Do you think a bountysource bounty might motivate somebody with the knowledge and credentials to fix this? Some of the things that need to be changed are related to the build server (Jenkins or Travis or whatever you are using) so outsiders might not be able to help out on this.

    I really think Mozilla should try to fix this if it wants to maintain it's steady +2% per month market share increase. It cannot do this without automated testing. When websites will start to work bad in Firefox because you cannot run automated tests on them then people will switch browsers. :(

  19. davehunt commented on Nov 23, 2016

    @davehunt
    Contributor

    I don't think I can send a pull request on that file.

    That's odd. I've tried to explain the situation a little better, while also trying not to be too verbose. Let me know what you think of my changes in 6dbc73b.

    Do you think a bountysource bounty might motivate somebody with the knowledge and credentials to fix this?

    Perhaps, though I'm not aware of this being done before in the Selenium project. I'm not sure there's any credentials requirements. We'd only need to sign the add-on for a release, and whoever is responsible for the release should be able to provide the necessary API key for signing.

    I really think Mozilla should try to fix this.

    I agree that this would be ideal, but given the limited resources available and ongoing effort to make GeckoDriver robust and spec-compliant, I think it's unlikely to happen.

  20. indolering commented on Nov 28, 2016

    @indolering

    FWIW, a BountySource bounty would at least allow different vendors to pool resources to fix this.

  21. andreicristianpetcu commented on Feb 15, 2017

    @andreicristianpetcu
    Author

    IT FREAKING WORKS NOW!

    I made it work with my own web driver.

    $webdriver-manager status
    webdriver-manager: using global installed version 12.0.2
    [15:06:02] I/status - selenium standalone version available: 3.0.1 [last]
    [15:06:02] I/status - chromedriver version available: 2.27 [last]
    [15:06:02] I/status - geckodriver version available: v0.14.0 [last]
    [15:06:02] I/status - android-sdk is not present
    [15:06:02] I/status - appium is not present
    $firefox --version
    Mozilla Firefox 51.0.1
    $protractor firefox-config.js

    firefox-config.json

    exports.config = _.merge({}, baseConfig, {
         capabilities: {
            browserName: 'firefox'
        },
        seleniumArgs: ['-Dwebdriver.firefox.profile=protractor']
    });

    I have a protractor profile named protractor with my own custom webdriver that is SIGNED.
    firefox_webdriver-3.0.1-fx.xpi.zip. You need to rename the file by removing the .zip at the end firefox_webdriver-3.0.1-fx.xpi.zip -> firefox_webdriver-3.0.1-fx.xpi. An install this web driver in the protractor profile. You can remove the old webdriver since it does not work anyway.

    Geckodriver still does not work. I don't know why. I will not use it until it goes out of BETA.

    I really am disappointed by the Selenium community :( This issue is opened since August in it's original form. I heard somebody at FOSDEM during a talk that WebDriver does not work anymore due to addon signing. I hate it how people blame addon signing for a lot of stuff that is unrelated to addon singing.

    I'm sorry for the rant but I guess you understand me. This is a 1 minute job that can be done manually after each release that would bring support to Firefox. Now a lot of people don't test on Firefox at all because of this. I hope my instructions help other people until geckodriver gets into shape.

  22. andreicristianpetcu commented on Jul 12, 2017

    @andreicristianpetcu
    Author

    @phoenix384 You can't sign a new legacy addon. You can create a new WebExtension and "upgrade" it to a legacy addon :D. The most trivial webextension is a zipped manifest.json. It needs to have a new guuid. After you signed the webextension then upload a "new version" for signing that is the legacy one with the webextension's uuid and a different version.

    If you have issues I can help. This is tested and it works.

  23. andreicristianpetcu commented on Jul 17, 2017

    @andreicristianpetcu
    Author

    @phoenix384 Glad it worked :)
    Do you happen to have a Selenium build that uses the signed addon? I managed to sign the addon but did not manage to use it inside Selenium.

  24. masterseo2000 commented on Oct 23, 2017

    @masterseo2000

    Hello,
    I just noticed the that there is a little bot that appears in the address bar that says: browser is under remote control (Firefox) on Firefox (chrome is automated by a software)
    I was wondering what is this exactly (I got the bot thing) I mean by that:
    Is that just a client site indicator?
    Is that something that that the actual website detects
    Would it go away when you define a user agent
    Is there a way to remove it / Control it
    Thanks a lot!!

  25. davehunt commented on Oct 24, 2017

    @davehunt
    Contributor

    @masterseo2000 this is to conform with the suggestion in the WebDriver specification's security considerations:

    It is also suggested that user agents make an effort to visually distinguish a user agent session that is under control of WebDriver from those used for normal browsing sessions. This can be done through a browser chrome element such as a “door hanger”, colorful decoration of the OS window, or some widget element that is prevalent in the window so that it easy to identify automation windows.

  26. locked and limited conversation to collaborators on Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions