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

Missing Gecko option #107

Closed
negberts opened this issue Oct 17, 2016 · 13 comments · Fixed by #113
Closed

Missing Gecko option #107

negberts opened this issue Oct 17, 2016 · 13 comments · Fixed by #113

Comments

@negberts
Copy link

negberts commented Oct 17, 2016

On our build server we get the following error:

2016-10-17T08:36:19.2539049Z C:\BuildAgent\Work\2\s\Pim.Solution\Pim.PortalApp\node_modules\protractor\node_modules\webdriver-manager\built\lib\cmds\update.js:63
2016-10-17T08:36:19.2539049Z var gecko = options[Opt.GECKO].getBoolean();
2016-10-17T08:36:19.2539049Z ^
2016-10-17T08:36:19.2539049Z TypeError: Cannot read property 'getBoolean' of undefined
2016-10-17T08:36:19.2539049Z at Program.update as runMethod
2016-10-17T08:36:19.2539049Z at Program.run (C:\BuildAgent\Work\2\s\Pim.Solution\Pim.PortalApp\node_modules\protractor\node_modules\webdriver-manager\built\lib\cli\programs.js:60:14)
2016-10-17T08:36:19.2539049Z at Object. (C:\BuildAgent\Work\2\s\Pim.Solution\Pim.PortalApp\node_modules\protractor\node_modules\webdriver-manager\built\lib\webdriver.js:25:38)
2016-10-17T08:36:19.2539049Z at Module._compile (module.js:541:32)
2016-10-17T08:36:19.2539049Z at Object.Module._extensions..js (module.js:550:10)
2016-10-17T08:36:19.2539049Z at Module.load (module.js:458:32)
2016-10-17T08:36:19.2539049Z at tryModuleLoad (module.js:417:12)
2016-10-17T08:36:19.2539049Z at Function.Module._load (module.js:409:3)
2016-10-17T08:36:19.2539049Z at Module.require (module.js:468:17)
2016-10-17T08:36:19.2539049Z at require (internal/module.js:20:19)
2016-10-17T08:36:19.2539049Z [08:36:19] 'webdriver' errored after 530 ms

This is probably because our build server OS is not supported? I saw this line of code:

if (GeckoDriver.supports(os.type(), os.arch())) {

prog.addOption(Opts[Opt.VERSIONS_GECKO]).addOption(Opts[Opt.GECKO]);

}

What can we do to fix it? Issue popped up this morning. Friday everything was working correctly.

@askarby
Copy link

askarby commented Oct 17, 2016

I also encountered this issue, first thing this morning.

We're using webdriver-manager as a part of a Angular 2 / Protractor setup, but this should be a general fix / workaround.

The fix has been to manually downgrade to version 10.2.3 (on our CI server) - by deleting the webdriver manager, then downgrading by executing npm i webdriver-manager@10.2.3.

So technically it's not a fix, but it's a workaround.

I'd like to add that we cannot reproduce this on a Windows 10 nor on a MacOS (Sierra) machine, but the build server / CI server, running Windows Server 2012 R2 (x64), on AppVeyor, displays the behaviour described.

@negberts
Copy link
Author

Indeed the same here. No problems locally on Windows 10.

@filipesilva
Copy link

Having the same issue here myself. Cannot repro on local win10 machine, but getting error on AppVeyor.

@huberchrigu
Copy link

Same here. webdriver-manager update works on Unix but fails on Windows due to the undefined options[Opt.GECKO].

@didlich
Copy link

didlich commented Oct 18, 2016

it's not only on Windoofs but also on Linux, our server is an Ubuntu Precise (12.04)

webdriver-manager/built/lib/cmds/update.js:63
    var gecko = options[Opt.GECKO].getBoolean();

TypeError: Cannot read property 'getBoolean' of undefined

@didlich
Copy link

didlich commented Oct 18, 2016

it seems that 32-Bit systems are not supported, see lib/binaries/gecko_driver.ts

static supports(ostype: string, arch: string): boolean {
    return arch == 'x64' && (ostype in GeckoDriver.suffixes);
}

it seems that geckodriver has support for 32-Bit beginning with version v0.11.0, but default geckoriver is v0.9.0 as stated in config.json

to support 32-Bit the config.json bust be changed to support the latest geckodriver and "supports" function has to check for 32-Bit and suffixes must include something like Linux32 and Windows_NT32

@didlich
Copy link

didlich commented Oct 18, 2016

there is also a PR, which solves the problem for people who have 32-Bit ARCH, but don't use geckodriver:
https://github.com/angular/webdriver-manager/pull/105/files
i.e., we use only the chromedriver for testing, which is running fine on linux32, but we have the problem that the error mentioned above prevents the webdriver-manager to finish the update execution, so https://github.com/angular/webdriver-manager/pull/105/files will solve our problem

@ghost
Copy link

ghost commented Oct 18, 2016

I have the same issue on debian 7 (32 bit). Is there a workaround for this? Because this issue stops my whole development process, as branches whose CI builds fail, cannot be merged to master.

@hampa-git
Copy link

I have the same issue on Windows 7 but it's a 64-Bit system.

@dustin2524
Copy link

Also reproducible on Windows 7 64bit

Because of the new Chrome v54 requiring the chromdriver 2.24 I thought I needed the latest webdriver-manager version but the below workaround works for me and anyone else who is just trying to get latest chromedriver

Workaround: Use previous webdriver-manager version 10.2.3 and specify the chrome and selenium versions when using webdriver-manager, like so:
webdriver-manager update --versions.chrome=2.24 --versions.standalone=2.53.1

@ghost
Copy link

ghost commented Oct 18, 2016

@dustin2524 This workaround does not work unfortunately. I then get this error:

[19:24:51] E/direct - Error code: 135
[19:24:51] E/direct - Error message: Could not find chromedriver at <project-path>/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24
[19:24:51] E/direct - Error: Could not find chromedriver at <project-path>/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24
    at Direct.getNewDriver (<project-path>/node_modules/protractor/built/driverProviders/direct.js:65:27)
    at Runner.createBrowser (<project-path>/node_modules/protractor/built/runner.js:198:43)
    at <project-path>/node_modules/protractor/built/runner.js:277:30
    at _fulfilled (<project-path>/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (<project-path>/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (<project-path>/node_modules/q/q.js:796:13)
    at <project-path>/node_modules/q/q.js:556:49
    at runSingle (<project-path>/node_modules/q/q.js:137:13)
    at flush (<project-path>/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)

By the way, I don't actually use chrome, but chromium. But it did not make any difference in the past


Just found out that the problem is caused by protractor, using its own version of webdriver-manager, which is 10.2.4, ignoring version 10.2.3 which I pinned manually to fix the problem


I eventually fixed the problem by removing node_modules and doing a clean reinstall with npm i. So @dustin2524's solution works

@IlyaFinkelshteyn
Copy link

IlyaFinkelshteyn commented Oct 19, 2016

Another workaround is to use x64 version of node. For Appveyor, please add the following into appveyor.yml.

environment:
  nodejs_version: "Stable"
install:
  - ps: Install-Product node $env:nodejs_version x64

Thank you,
Ilya.

filipesilva added a commit to angular/angular-cli that referenced this issue Oct 24, 2016
See angular/webdriver-manager#107 for context.
Should be reverted once issue is fixed.
filipesilva added a commit to angular/angular-cli that referenced this issue Oct 24, 2016
See angular/webdriver-manager#107 for context.
Should be reverted once issue is fixed.
cnishina added a commit to cnishina/webdriver-manager that referenced this issue Oct 24, 2016
@filipesilva
Copy link

Thanks for the fix @cnishina!

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

Successfully merging a pull request may close this issue.

8 participants