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

Error when running test:regressions #6518

Closed
shawnmcknight opened this issue Apr 6, 2017 · 3 comments
Closed

Error when running test:regressions #6518

shawnmcknight opened this issue Apr 6, 2017 · 3 comments
Labels
bug 🐛 Something doesn't work test

Comments

@shawnmcknight
Copy link
Contributor

Problem description

I have been attempting to resolve the failed tests reported in #6502 and running test:regressions locally. When running it, I encounter an error. I have tested by running docker containers on Windows and within a VirtualBox VM running Ubuntu. The test begins, webpack bundles the test source, and the "Starting tests" message appears. A couple minutes later, I get the following on my terminal:

> [email protected] test:regressions /home/srm/projects.local/material-ui
> webpack --config test/regressions/webpack.config.js && vrtest run --config test/vrtest.config.js

Hash: 5aad6c2ed02a432f9959
Version: webpack 2.3.3
Time: 8458ms
   Asset     Size  Chunks                    Chunk Names
tests.js  1.56 MB       0  [emitted]  [big]  main
   [0] ./~/react/react.js 56 bytes {0} [built]
  [25] ./~/react-dom/index.js 59 bytes {0} [built]
 [202] ./src/styles/MuiThemeProvider.js 6.01 kB {0} [built]
 [203] ./test/regressions/TestViewer.js 3.93 kB {0} [built]
 [204] ./~/vrtest/client/index.js 241 bytes {0} [built]
 [205] ./~/webfontloader/webfontloader.js 12.7 kB {0} [built]
 [206] ./test/regressions/tests js$ 2.05 kB {0} [built]
 [284] ./test/regressions/index.js 2.91 kB {0} [built]
 [333] ./test/regressions/tests/Switch/CheckedSwitch.js 500 bytes {0} [optional] [built]
 [334] ./test/regressions/tests/Switch/DisabledSwitch.js 741 bytes {0} [optional] [built]
 [335] ./test/regressions/tests/Switch/SimpleSwitch.js 485 bytes {0} [optional] [built]
 [336] ./test/regressions/tests/Table/BasicTable.js 375 bytes {0} [optional] [built]
 [337] ./test/regressions/tests/Table/EnhancedTable.js 390 bytes {0} [optional] [built]
 [338] ./test/regressions/tests/Tabs/SimpleTabs.js 4.41 kB {0} [optional] [built]
 [339] ./test/regressions/tests/Text/TextTypes.js 1.94 kB {0} [optional] [built]
    + 545 hidden modules

  Starting tests
events.js:160
      throw er; // Unhandled 'error' event
      ^

JavascriptError: javascript error: Cannot read property 'runBeforeHooks' of undefined
JavaScript stack:
TypeError: Cannot read property 'runBeforeHooks' of undefined
    at eval (eval at executeAsyncScript (:438:5), <anonymous>:5:18)
    at eval (eval at executeAsyncScript (:438:5), <anonymous>:10:6)
    at eval (eval at executeAsyncScript (:438:5), <anonymous>:10:32)
    at executeAsyncScript (<anonymous>:438:26)
    at <anonymous>:454:29
    at callFunction (<anonymous>:346:33)
    at <anonymous>:356:23
    at <anonymous>:357:3
  (Session info: chrome=56.0.2924.87)
  (Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.4.0-66-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 22 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: '94ea3725251c', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-66-generic', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320), userDataDir=/tmp/.org.chromium.Chromium.mIjeXc}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=56.0.2924.87, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
Session ID: 0fbb8791f5d9f5a6970541ebed08d26b
    at WebDriverError (/home/srm/projects.local/material-ui/node_modules/selenium-webdriver/lib/error.js:27:5)
    at JavascriptError (/home/srm/projects.local/material-ui/node_modules/selenium-webdriver/lib/error.js:133:5)
    at Object.checkLegacyResponse (/home/srm/projects.local/material-ui/node_modules/selenium-webdriver/lib/error.js:505:15)
    at parseHttpResponse (/home/srm/projects.local/material-ui/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/home/srm/projects.local/material-ui/node_modules/selenium-webdriver/lib/http.js:440:13)
    at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.executeScript()
    at mixin.schedule (/home/srm/projects.local/material-ui/node_modules/selenium-webdriver/lib/webdriver.js:815:17)
    at mixin.executeAsyncScript (/home/srm/projects.local/material-ui/node_modules/selenium-webdriver/lib/webdriver.js:899:17)
    at setupTests (/home/srm/projects.local/material-ui/node_modules/vrtest/server/runner.js:256:17)
    at Object._callee$ (/home/srm/projects.local/material-ui/node_modules/vrtest/server/runner.js:198:22)
    at tryCatch (/home/srm/projects.local/material-ui/node_modules/regenerator-runtime/runtime.js:64:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/home/srm/projects.local/material-ui/node_modules/regenerator-runtime/runtime.js:299:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/home/srm/projects.local/material-ui/node_modules/regenerator-runtime/runtime.js:116:21)
    at step (/home/srm/projects.local/material-ui/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /home/srm/projects.local/material-ui/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
    at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Linux 4.4.0-66-generic
npm ERR! argv "/home/srm/.nvm/versions/node/v6.9.5/bin/node" "/home/srm/.nvm/versions/node/v6.9.5/bin/npm" "run" "test:regressions"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test:regressions: `webpack --config test/regressions/webpack.config.js && vrtest run --config test/vrtest.config.js`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the [email protected] test:regressions script 'webpack --config test/regressions/webpack.config.js && vrtest run --config test/vrtest.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the material-ui-build package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack --config test/regressions/webpack.config.js && vrtest run --config test/vrtest.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs material-ui-build
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls material-ui-build
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/srm/projects.local/material-ui/npm-debug.log

I encounter this error with a fresh clone of the Material-UI Github repo, running on the next branch.

@mbrookes
Copy link
Member

mbrookes commented Apr 9, 2017

@shawnmcknight I'm getting the same error here on OS X 10.11. It had been working fine for me before, but stopped working a few weeks ago. Not sure what changed.

@mbrookes
Copy link
Member

Could have sworn I followed up on this last night. Maybe I didn't click submit, or replied in the wrong issue.

Anyway: sudo ifconfig lo0 alias 10.200.10.1/24 seems to have resolved the issue for me, which is odd, as I didn't used to have to run that.

@shawnmcknight
Copy link
Contributor Author

Anyway: sudo ifconfig lo0 alias 10.200.10.1/24 seems to have resolved the issue for me, which is odd, as I didn't used to have to run that.

OK, this information gave me a clue and I was able to get it working. I don't think this is the expected behavior, but I've got a workaround for Ubuntu.

In the test documentation it states that there is an issue on Mac OSX due to the lack of a docker0 interface. Ubuntu does have a docker0 interface, so I didn't think the solution applied. However, there is something that seems to be making it an issue anyway. By issuing sudo ifconfig lo:0 10.200.10.1/24 (note similar but not identical to the OSX command) before running test:regressions then the tests worked properly.

As mentioned earlier, I had the same problem on Windows, but I expect that making an alias for the loopback would work there as well. I don't want to install docker on Windows again as it disables my VirtualBox, but I figured I'd note that in this issue log in case someone else runs into the problem there and wants to try that out as a solution.

So I guess I question whether this is a problem or expected behavior. If it's expected behavior, I'll be happy to create a PR to update the documentation. If it's a problem, would the best bet be to log something on the vrtest repo, or leave this issue open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work test
Projects
None yet
Development

No branches or pull requests

3 participants