ERROR: Cannot define class using reflection

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ERROR: Cannot define class using reflection


I'm making App by using this webpage

I tried to test e2e-tests, however it didn't work.

This program failed to start selenium server. How do I fix this?

npm-v :5.6.0

yarn-v :1.5.1

os -v :10.12.6

Besides, I'm already done with the test that selenium server would work or not. As a result, selenium server also didn't work.

I tried this way to test selenium server

e2e-tests error is below

ERROR: Cannot define class using reflection chrome at new RuntimeError

(/Users/hajimenagasaka/my-react-todolist/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12) at Request._callback

(/Users/hajimenagasaka/my-react-todolist/node_modules/webdriverio/build/lib/utils/RequestHandler.js:316:39) at Request.self.callback

(/Users/hajimenagasaka/my-react-todolist/node_modules/webdriverio/node_modules/request/request.js:186:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.

(/Users/hajimenagasaka/my-react-todolist/node_modules/webdriverio/node_modules/request/request.js:1163:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage.

(/Users/hajimenagasaka/my-react-todolist/node_modules/webdriverio/node_modules/request/request.js:1085:12) at Object.onceWrapper (events.js:313:30)


npm ERR! errno 1

npm ERR! my-react-todolist@0.1.0 e2e-tests: wdio

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the my-react-todolist@0.1.0 e2e-tests script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

selenium test result

Selenium 2.0/webdriver protocol bindings implementation with helper commands in nodejs.

For a complete list of commands, visit


[17:03:28]:ERROR Couldn't find a running selenium server instance on [object Object]/Users/hajimenagasaka/node_modules/chainit/index.js:140

throw err;

Error: [init()] <= Couldn't connect to selenium server at makeError (/Users/hajimenagasaka/node_modules/webdriverjs/lib/utils/makeError.js:9:17)

at RequestHandler.<anonymous> (/Users/hajimenagasaka/node_modules/webdriverjs/lib/utils/RequestHandler.js:177:25)

at self.callback (/Users/hajimenagasaka/node_modules/request/request.js:122:22) at emitOne (events.js:116:13)

at Request.emit (events.js:211:7)

at ClientRequest.self.clientErrorHandler (/Users/hajimenagasaka/node_modules/request/request.js:231:10)

at emitOne (events.js:116:13)

at ClientRequest.emit (events.js:211:7)

at Socket.socketErrorListener (_http_client.js:387:9)


{   "name": "my-react-todolist",   "version": "0.1.0",   "private": true,   "dependencies": {
    "chrome": "^0.1.0",
    "eslint-plugin-flowtype": "^2.46.1",
    "jest-cli": "^22.4.3",
    "react": "^15.6.1",
    "react-dom": "^15.6.1",
    "selenium": "^2.20.0",
    "v": "^0.3.0",
    "webdriver.js": "^0.1.0",
    "webdriverjs": "^1.7.5"   },

    "devDependencies": {
        "chai": "^4.1.2",
        "enzyme": "^2.9.1",
        "eslint": "^3.19.0",
        "eslint-config-airbnb": "^15.0.1",
        "eslint-plugin-import": "^2.6.1",
        "eslint-plugin-jsx-a11y": "^5.1.0",
        "eslint-plugin-react": "^7.1.0",
        "react-scripts": "1.0.7",
        "react-test-renderer": "^15.6.1",
        "selenium-standalone": "^6.5.0",
        "wdio-dot-reporter": "0.0.8",
        "wdio-mocha-framework": "^0.5.13",
        "wdio-selenium-standalone-service": "0.0.9",
        "webdriverio": "^4.8.0"   },

    "scripts": {
        "selenium-setup": "selenium-standalone install",
        "selenium-start": "selenium-standalone start",
        "e2e-tests": "wdio",
        "e2e-tests-watch": "wdio wdio.conf.js --watch",
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test --env=jsdom",
        "eject": "react-scripts eject",
          "start":"selenium-standalone start",      "selenium": "selenium-standalone",   } }


    const expect = require('chai').expect;

describe('TodoList App', () => {
  it('Should load with the right title', () => {
    const actualTitle = browser.getTitle();

    expect(actualTitle).to.eql('Todo List');


import React from 'react';
import { shallow } from 'enzyme';
import App from './App';

it('App renders without crashing', () => {
  const component = shallow(<App />);

You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit