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

Fatal error: Cannot read property 'ele' of null #38

Open
ianwremmel opened this issue Apr 1, 2015 · 10 comments
Open

Fatal error: Cannot read property 'ele' of null #38

ianwremmel opened this issue Apr 1, 2015 · 10 comments

Comments

@ianwremmel
Copy link

Occasionally, I see the error Fatal error: Cannot read property 'ele' of null but it appears the xml file has been written correctly. I can't reproduce on demand and after eyeballing index.js nothing jumps out as a likely culprit. I'd be happy to supply more information if you can point me in the right direction.

@swayf
Copy link

swayf commented Apr 19, 2015

+1. I have the same issue

@swayf
Copy link

swayf commented Apr 19, 2015

hm.. but seems the issue is not here..
@ianwremmel do you use karma 0.12 with karma-ievms?

@ianwremmel
Copy link
Author

Nope, not familiar with karma-ievms.

Here's the relevant portion of package.json:

    "karma": "~0.12.28",
    "karma-browserify": "~3.0.1",
    "karma-chrome-launcher": "~0.1.7",
    "karma-coverage": "~0.2.7",
    "karma-firefox-launcher": "~0.1.3",
    "karma-junit-reporter": "~0.2.2",
    "karma-mocha": "~0.1.10",
    "karma-mocha-reporter": "~0.3.1",
    "karma-safari-launcher": "~0.1.1",
    "karma-sauce-launcher": "~0.2.10",

As I said, I've looked at karma-junit-reporter to try to figure out what's going on and nothing seems obvious. Since it happens intermittently, I have to assume it's a race condition somewhere where one of the events is firing before/after the the xml file has been opened/closed.

I know I've seen the problem when using karma-sauce-launcher and I'm pretty sure I've seen it using the karma-chrome-launcher. In the all of the cases I've seen it, I've been using the mocha reporter and I think I've been using the coverage reporter for all of them.

@summanerd
Copy link

+1. I have the same issue

I have noticed that it only occurs when I run it as an npm task. If I execute ./node_modules/.bin/karma start karma.js from the command line the error does not occur. For now I have my pre-commit hook run it as a make command.

@elicwhite
Copy link

This just flaked for us as well on jenkins. Doesn't happen consistently.

Missing error handler on `socket`.
TypeError: Cannot read property 'ele' of undefined
    at specSuccess.specSkipped.specFailure (/node_modules/karma-junit-reporter/index.js:93:34)
    at onSpecComplete (/node_modules/karma/lib/reporters/base.js:78:12)
    at null.<anonymous> (/node_modules/karma/lib/events.js:13:22)
    at emit (events.js:129:20)
    at onResult (/node_modules/karma/lib/browser.js:216:13)
    "karma": "0.13.9",
    "karma-browserify": "4.3.0",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "0.2.0",
    "karma-firefox-launcher": "0.1.6",
    "karma-junit-reporter": "0.3.4",
    "karma-mocha": "0.2.0",
    "karma-qunit": "0.1.5",
    "karma-safari-launcher": "0.1.1",
    "karma-sinon": "1.0.4",
    "karma-source-map-support": "1.0.0",

@summanerd
Copy link

@TheSavior if it helps I noticed I only have issues when I node version 0.10.32. When I use version 0.11.14 I have no issues.

@elicwhite
Copy link

Hmm. We are on 0.12.0

@janblok
Copy link

janblok commented Oct 19, 2015

We are seeing this error if we use non ascii text in karma test:

it("interpoleer drglpt zonder coordinaten en met één verbonden drglpt", function() {
    //fails
}

if we change to:

it("interpoleer drglpt zonder coordinaten en met 1 verbonden drglpt", function() {
    //succeeds
}

it all works, is there an encoding problem somewhere?

@TomMarulakGorkana
Copy link

I have this issue and it turn out I have many phantomjs instance running in background. killall phantomjs fixed it

@stramel
Copy link

stramel commented Jul 22, 2016

karma-runner/karma#1292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants