meteor-mocha icon indicating copy to clipboard operation
meteor-mocha copied to clipboard

TypeError when using chrome driver

Open lorensr opened this issue 7 years ago • 7 comments

Steps to reproduce:

  • meteor create app (version 1.6.1)
  • meteor add meteortesting:mocha
  • meteor npm i --save-dev selenium-webdriver chromedriver
$  TEST_BROWSER_DRIVER=chrome meteor test --once --driver-package meteortesting:mocha 
[[[[[ Tests ]]]]]                             

=> Started proxy.                             
=> Started MongoDB.                           
I20180223-19:48:25.236(-5)?                   
I20180223-19:48:25.541(-5)? --------------------------------
I20180223-19:48:25.542(-5)? ----- RUNNING SERVER TESTS -----
I20180223-19:48:25.542(-5)? --------------------------------
I20180223-19:48:25.542(-5)? 
I20180223-19:48:25.542(-5)? 
I20180223-19:48:25.543(-5)? 
I20180223-19:48:25.543(-5)?   0 passing (1ms)
I20180223-19:48:25.543(-5)? 
I20180223-19:48:25.543(-5)? 
I20180223-19:48:25.543(-5)? --------------------------------
I20180223-19:48:25.543(-5)? ----- RUNNING CLIENT TESTS -----
I20180223-19:48:25.544(-5)? --------------------------------
W20180223-19:48:26.683(-5)? (STDERR) /Users/me/.meteor/packages/meteor-tool/.1.6.1.18y0axr.54yj++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20180223-19:48:26.684(-5)? (STDERR)                                            throw(ex);
W20180223-19:48:26.684(-5)? (STDERR)                                            ^
W20180223-19:48:26.685(-5)? (STDERR) 
W20180223-19:48:26.685(-5)? (STDERR) TypeError: driver.manage(...).window(...).setPosition is not a function
W20180223-19:48:26.685(-5)? (STDERR)     at startChrome (packages/meteortesting:browser-tests/browser/chromedriver.js:45:28)
W20180223-19:48:26.685(-5)? (STDERR)     at startBrowser (packages/meteortesting:browser-tests/server.js:22:7)
W20180223-19:48:26.685(-5)? (STDERR)     at clientTests (packages/meteortesting:mocha/server.js:120:3)
W20180223-19:48:26.686(-5)? (STDERR)     at serverTests (packages/meteortesting:mocha/server.js:145:7)
W20180223-19:48:26.686(-5)? (STDERR)     at mochaInstance.run.failureCount (packages/meteortesting:mocha/server.js:100:13)
W20180223-19:48:26.686(-5)? (STDERR)     at done (/Users/me/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.x96wd2++os+web.browser+web.cordova/npm/node_modules/mocha/lib/mocha.js:497:13)
W20180223-19:48:26.686(-5)? (STDERR)     at Runner.<anonymous> (/Users/me/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.x96wd2++os+web.browser+web.cordova/npm/node_modules/mocha/lib/runner.js:804:5)
W20180223-19:48:26.687(-5)? (STDERR)     at emitNone (events.js:111:20)
W20180223-19:48:26.687(-5)? (STDERR)     at Runner.emit (events.js:208:7)
W20180223-19:48:26.687(-5)? (STDERR)     at /Users/me/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.x96wd2++os+web.browser+web.cordova/npm/node_modules/mocha/lib/runner.js:791:12
W20180223-19:48:26.687(-5)? (STDERR)     at Runner.runSuite (/Users/me/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.x96wd2++os+web.browser+web.cordova/npm/node_modules/mocha/lib/runner.js:589:12)
W20180223-19:48:26.688(-5)? (STDERR)     at start (/Users/me/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.x96wd2++os+web.browser+web.cordova/npm/node_modules/mocha/lib/runner.js:789:10)
W20180223-19:48:26.688(-5)? (STDERR)     at Runner.run (/Users/me/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.x96wd2++os+web.browser+web.cordova/npm/node_modules/mocha/lib/runner.js:816:5)
W20180223-19:48:26.688(-5)? (STDERR)     at Mocha.run (/Users/me/.meteor/packages/practicalmeteor_mocha-core/.1.0.1.x96wd2++os+web.browser+web.cordova/npm/node_modules/mocha/lib/mocha.js:501:17)
W20180223-19:48:26.688(-5)? (STDERR)     at serverTests (packages/meteortesting:mocha/server.js:98:17)
W20180223-19:48:26.689(-5)? (STDERR)     at Object.start (packages/meteortesting:mocha/server.js:144:5)
W20180223-19:48:26.689(-5)? (STDERR)     at packages/meteor.js:1107:27
W20180223-19:48:26.689(-5)? (STDERR)     at Function.time (/private/tmp/meteor-test-runreob4l.ntgdd/.meteor/local/build/programs/server/profile.js:309:28)
W20180223-19:48:26.689(-5)? (STDERR)     at /private/tmp/meteor-test-runreob4l.ntgdd/.meteor/local/build/programs/server/boot.js:427:13
W20180223-19:48:26.690(-5)? (STDERR)     at /private/tmp/meteor-test-runreob4l.ntgdd/.meteor/local/build/programs/server/boot.js:472:5
W20180223-19:48:26.690(-5)? (STDERR)     at Function.run (/private/tmp/meteor-test-runreob4l.ntgdd/.meteor/local/build/programs/server/profile.js:510:12)
W20180223-19:48:26.690(-5)? (STDERR)     at /private/tmp/meteor-test-runreob4l.ntgdd/.meteor/local/build/programs/server/boot.js:470:11
=> Started your app.

=> App running at: http://localhost:3000/
$

repro: https://github.com/lorensr/meteor-mocha-chrome-repro

lorensr avatar Feb 24 '18 01:02 lorensr

@lorensr any update?

crapthings avatar Feb 27 '18 07:02 crapthings

https://github.com/giggio/node-chromedriver/issues/142

crapthings avatar Feb 27 '18 07:02 crapthings

Closing since this seems like not an issue with this package and is fixed by pinning to an older selenium-webdriver. If anyone wants to PR the readme to explain what version to pin to, that could be helpful.

aldeed avatar Apr 03 '18 14:04 aldeed

Pinning to these works:

    "chromedriver": "2.35.0",
    "selenium-webdriver": "3.6.0"

lorensr avatar Nov 28 '18 06:11 lorensr

@lorensr which OS are you running on? Just for adding a cross-reference to https://github.com/meteortesting/meteor-mocha/issues/71#issuecomment-430936393

SimonSimCity avatar Nov 29 '18 08:11 SimonSimCity

macOS 10.14.1

lorensr avatar Nov 29 '18 08:11 lorensr

sorry, this reference above I put accidentally - (or my 4 month old daughter) can remove this somebody since I don't know how.

NiKrause avatar Dec 10 '18 18:12 NiKrause