chimp icon indicating copy to clipboard operation
chimp copied to clipboard

Windows Problem: [Error: Selenium exited before it could start]

Open seriallos opened this issue 10 years ago • 4 comments

Problem is on a Windows Bamboo build agent.

Mainly trying to figure out where the error is coming from so I can do some deeper exploration/debugging. I've tried ramping up debugging and logging with the following config but am not getting any additional information.

module.exports = {
    mocha: true,
    path: 'integration-tests',
    browser: 'firefox',
    log: 'verbose',
    debug: true,

    webdriverio: {
        logLevel: 'verbose',
    },
};

Everything works correctly on my own OS X machine.

Expected behaviour

Chimp will run tests on Windows Bamboo agent.

Actual behaviour

Execution fails with the following output:

28-Apr-2016 13:42:40    [chimp] Running...
28-Apr-2016 13:42:41    [Error: Selenium exited before it could start]
Steps to reproduce the problem

Will be trying to create a minimal reproduction environment/project but haven't gotten there quite yet.

Used version
  • Chimp: 0.34.0
  • Node.js: v4.2.1
  • Operation system: Windows

Java 1.8 is available.

seriallos avatar Apr 28 '16 18:04 seriallos

If you don't get any debug log from Chimp, try running Chimp with --debug. The selenium code is located here: https://github.com/xolvio/chimp/blob/master/src/lib/selenium.js

ghost avatar Apr 28 '16 19:04 ghost

Slightly more info, it does look like like it's coming from selenium/webdriver:

28-Apr-2016 15:54:39    [chimp] Running...
28-Apr-2016 15:54:39    [chimp] interrupting
28-Apr-2016 15:54:39    [chimp] no processes to interrupt
28-Apr-2016 15:54:39    [chimp][selenium] Selenium object created
28-Apr-2016 15:54:39    [chimp][selenium] Start
28-Apr-2016 15:54:39    [chimp][selenium] Installing Selenium + drivers if needed
28-Apr-2016 15:54:40    
28-Apr-2016 15:54:40    [chimp][selenium] hub can be seen at http://localhost:5116/wd/hub
28-Apr-2016 15:54:40    [chimp] Finished running async processes with errors
28-Apr-2016 15:54:40    [chimp] run complete with errors [Error: Selenium exited before it could start]
28-Apr-2016 15:54:40    Error in chimp init [Error: Selenium exited before it could start]
28-Apr-2016 15:54:40    [Error: Selenium exited before it could start]

seriallos avatar Apr 28 '16 20:04 seriallos

You can try to start selenium-standalone https://github.com/vvo/selenium-standalone (what we use). Maybe it gives you more info why it cannot start.

ghost avatar Apr 28 '16 23:04 ghost

Looks like Java installation on these Bamboo agents is totally hosed. selenium-standalone install runs but starting reveals that there is some major issues with the java installation:

02-May-2016 19:31:21    Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
02-May-2016 19:31:21    has value '1.8', but '1.7' is required.
02-May-2016 19:31:21    Error: could not find java.dll
02-May-2016 19:31:21    Error: Could not find Java SE Runtime Environment.
02-May-2016 19:31:21    C:\build-dir\(project)\node_modules\chimp\node_modules\selenium-standalone\bin\selenium-standalone:56
02-May-2016 19:31:21            throw err;
02-May-2016 19:31:21            ^
02-May-2016 19:31:21    
02-May-2016 19:31:21    Error: Selenium exited before it could start
02-May-2016 19:31:21        at ChildProcess.errorIfNeverStarted (C:\build-dir\(project)\node_modules\chimp\node_modules\selenium-standalone\lib\start.js:114:15)
02-May-2016 19:31:21        at emitTwo (events.js:87:13)
02-May-2016 19:31:21        at ChildProcess.emit (events.js:172:7)
02-May-2016 19:31:21        at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Looks like the useful error from java is coming from stderr or something which is why it wasn't captured/reported by Chimp.

Thanks for the tips on diagnosis tools!

seriallos avatar May 02 '16 23:05 seriallos