protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Protractor fails to run

Open OlmoAcerta opened this issue 12 years ago • 3 comments

I have downloaded the angular-seed project and am trying to run the tests. I have not yet made any edits to the code, apart from adding this to protractor-conf.js:

  // The address of a running selenium server.
  seleniumAddress: 'http://localhost:4444/wd/hub',

When I execute npm run protractor, i see this error:

Using the selenium server at http://localhost:4444/wd/hub
Cannot read property 'matcherFn_' of undefined
[launcher] Runner Process Exited With Error Code: 1
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "protractor"
npm ERR! cwd C:\nginx-1.7.1\html\angular-seed.git\trunk
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE

I think the relevant clue here is matcherFn_, but I can't find anything when looking for it.

> npm ls
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
└── [email protected]

How can I get past the "matcherFn_ of undefined" error?

OlmoAcerta avatar Jun 12 '14 13:06 OlmoAcerta

Try

  "devDependencies": {
    "karma": "~0.10",
    "protractor": "~0.24.1",
    "http-server": "^0.6.1",
    "bower": "^1.3.1",
    "shelljs": "^0.2.6",
    "karma-junit-reporter": "^0.2.2"
  },

(i.e. change protractor version to 0.24.1)

hankduan avatar Jun 12 '14 16:06 hankduan

@hankduan Thank you, this solved my issue.

Should I create a pull request to angular-seed to bump the version number?

OlmoAcerta avatar Jun 13 '14 11:06 OlmoAcerta

I wonder if it's better if we just always get the latest protractor. Please go ahead to create the pull request for angular to change the version.

hankduan avatar Jun 13 '14 15:06 hankduan