xolvio / chimp

Tooling that helps you do quality, faster.
MIT License
798 stars 139 forks source link

Can't get sample mocha test running. #304

Closed dlinnemeyer closed 8 years ago

dlinnemeyer commented 8 years ago

Trying to get a basic Mocha test passing on my local box, and I'm getting errors, apparently somewhere in communication with selenium.

Chimp is on 0.30.0. Node is 4.3.0. I'm on Fedora, and Java is 1.8.0_60.

Here's the mocha test:

describe('Point of Sale', function() {     
    describe('Full sale finalization', function () {     
        it('should be set by the Meteor method', function () {     
            browser.url('http://www.google.com/');                        
            expect(browser.getTitle()).to.equal('Google');                
        });                                                               
    });                                                                   
});

And here's what I get with the --mocha flag:

[chimp] Running...

[chimp][helper] setupBrowserAndDDP had error
{ [Error: unknown error: Chrome version must be >= 43.0.2357.0
  (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.17.4-301.fc21.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 649 milliseconds
Build info: version: '2.50.1', revision: 'd7fc91b', time: '2016-01-29 19:08:26'
System info: host: 'localhost.localdomain', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.17.4-301.fc21.x86_64', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.chrome.ChromeDriver]
  message: 'unknown error: Chrome version must be >= 43.0.2357.0\n  (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.17.4-301.fc21.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 649 milliseconds\nBuild info: version: \'2.50.1\', revision: \'d7fc91b\', time: \'2016-01-29 19:08:26\'\nSystem info: host: \'localhost.localdomain\', ip: \'127.0.0.1\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'3.17.4-301.fc21.x86_64\', java.version: \'1.8.0_60\'\nDriver info: org.openqa.selenium.chrome.ChromeDriver',
  type: 'RuntimeError',
  seleniumStack: 
   { status: 13,
     type: 'UnknownError',
     message: 'An unknown server-side error occurred while processing the command.',
     orgStatusMessage: 'unknown error: Chrome version must be >= 43.0.2357.0\n  (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.17.4-301.fc21.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 649 milliseconds\nBuild info: version: \'2.50.1\', revision: \'d7fc91b\', time: \'2016-01-29 19:08:26\'\nSystem info: host: \'localhost.localdomain\', ip: \'127.0.0.1\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'3.17.4-301.fc21.x86_64\', java.version: \'1.8.0_60\'\nDriver info: org.openqa.selenium.chrome.ChromeDriver' } }
Error: unknown error: Chrome version must be >= 43.0.2357.0
    at Object.Future.wait (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/fibers/future.js:449:15)
    at Object.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/xolvio-fiber-utils/index.js:48:19)
    at initBrowser (/home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/chimp-helper.js:151:15)
    at Object.setupBrowserAndDDP (/home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/chimp-helper.js:229:7)
    at Context.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/mocha/mocha-helper.js:11:15)
    at /home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/mocha/mocha-fiberized-ui.js:23:14
    - - - - -
  (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.17.4-301.fc21.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 649 milliseconds
Build info: version: '2.50.1', revision: 'd7fc91b', time: '2016-01-29 19:08:26'
System info: host: 'localhost.localdomain', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.17.4-301.fc21.x86_64', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at new ErrorHandler.RuntimeError (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/lib/utils/ErrorHandler.js:93:12)
    at RequestHandler.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/lib/utils/RequestHandler.js:138:25)
    at Request.self.callback (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:373:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:1318:14)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:1266:12)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)
Mocha failed

And here it is with --browser=firefox:

[chimp] Running...

[chimp][helper] setupBrowserAndDDP had error
{ [Error: Bad request
Command duration or timeout: 96 milliseconds
Build info: version: '2.50.1', revision: 'd7fc91b', time: '2016-01-29 19:08:26'
System info: host: 'localhost.localdomain', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.17.4-301.fc21.x86_64', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver]
  message: 'Bad request\nCommand duration or timeout: 96 milliseconds\nBuild info: version: \'2.50.1\', revision: \'d7fc91b\', time: \'2016-01-29 19:08:26\'\nSystem info: host: \'localhost.localdomain\', ip: \'127.0.0.1\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'3.17.4-301.fc21.x86_64\', java.version: \'1.8.0_60\'\nDriver info: org.openqa.selenium.firefox.FirefoxDriver',
  type: 'RuntimeError',
  seleniumStack: 
   { status: 13,
     type: 'UnknownError',
     message: 'An unknown server-side error occurred while processing the command.',
     orgStatusMessage: 'Bad request\nCommand duration or timeout: 96 milliseconds\nBuild info: version: \'2.50.1\', revision: \'d7fc91b\', time: \'2016-01-29 19:08:26\'\nSystem info: host: \'localhost.localdomain\', ip: \'127.0.0.1\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'3.17.4-301.fc21.x86_64\', java.version: \'1.8.0_60\'\nDriver info: org.openqa.selenium.firefox.FirefoxDriver' } }
Error: Bad request
    at Object.Future.wait (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/fibers/future.js:449:15)
    at Object.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/xolvio-fiber-utils/index.js:48:19)
    at initBrowser (/home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/chimp-helper.js:151:15)
    at Object.setupBrowserAndDDP (/home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/chimp-helper.js:229:7)
    at Context.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/mocha/mocha-helper.js:11:15)
    at /home/dlinnemeyer/consigncloud/node_modules/chimp/dist/lib/mocha/mocha-fiberized-ui.js:23:14
    - - - - -
Command duration or timeout: 96 milliseconds
Build info: version: '2.50.1', revision: 'd7fc91b', time: '2016-01-29 19:08:26'
System info: host: 'localhost.localdomain', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.17.4-301.fc21.x86_64', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
    at new ErrorHandler.RuntimeError (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/lib/utils/ErrorHandler.js:93:12)
    at RequestHandler.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/lib/utils/RequestHandler.js:138:25)
    at Request.self.callback (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:373:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:1318:14)
    at emitOne (events.js:82:20)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/home/dlinnemeyer/consigncloud/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:1266:12)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)
Mocha failed
ramijarrar commented 8 years ago

Can you paste the full command you are using to run Chimp? Are you using Meteor?

samhatoum commented 8 years ago

Try finding the Selenium server jar file and run it directly using Java. That will help you isolate the issue. It doesn't sound like it's Chimp related.

dlinnemeyer commented 8 years ago

I was able to get the chrome problem fixed with a chrome update, but the firefox problem persisted. I agree that it doesn't seem chimp-related, but chimp was the only system with the problem - I was able to get firefox running on webdriverio and nightwatchjs. It makes me think there might be something connected to how chimp is installing or running selenium?

The bug isn't pressing anymore (we got tests running with a different library), but if we revisit chimp, I'll make sure to post back here if I get the firefox problem solved.