-
Notifications
You must be signed in to change notification settings - Fork 144
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 %browser.id% of null #20
Comments
I am having a similar (related?) problem. The browser Safari gets disconnected and then Karma tries to use the browser again, producing the same symptom. Note that the property name (last line) and the browser id for Safari (first line) are the same:
My current work-around sucks quite a lot: remove Safari, build, re-add Safari, build again. |
I have same problem with Phantom JS and [email protected] but after 100 tests are passed. It fails occasionally. So after some reloads, all tests are passed without any problem, but in general it is weird experience:
How to fix this bug? |
Looks like it relates to karma itself: karma-runner/karma#1248 |
Are we sure this was fixed? I'm seeing this in Karma 0.12.31. Fatal error: Cannot read property '21770261' of null Actually my issue appears to be an async test not been done properly... |
Very similar to karma-runner#20
I believe I've distilled this error (or one very, very much like it) down to a minimal reproduction - this consistently errors with To reproduce:
|
I think the underlying bug for this is actually karma-runner/karma#1292 What is happening is that onRunComplete is called, and suites is set to null at https://github.com/karma-runner/karma-junit-reporter/blob/master/index.js#L120. Then, later, a specSuccess/specSkipped/specFailure arrives (https://github.com/karma-runner/karma-junit-reporter/blob/v0.2.2/index.js#L89 from @hyzhak 's stack trace, but now https://github.com/karma-runner/karma-junit-reporter/blob/v0.3.8/index.js#L125 in the current release). It attempts to reference suites, but suites has been set to null, and the TypeError occurs. |
Still experiencing this issue with karma 0.13.22 and karma-junit-reporter 0.4.0. Can you please merge the workaround by @alexeibs https://github.com/Megaputer/karma-junit-reporter/commit/d14b9bffe0d3d658b8a99e2854b3e8070e50c11f until karma-runner/karma#1292 is solved? |
Still getting this issue with karma 0.13.22 and karma-junit-reporter 0.4.1. Any way to fix this issue? |
@muhammad-ammar We 'fixed' this locally in our case but it took code changes to karma-junit-reporter. (I say 'fixed' because we did not address the underlying bug - we just made it work despite that). I don't have the code changes handy but our workaround looked very much like the one in @alexeibs's fork here: https://github.com/Megaputer/karma-junit-reporter/commit/d14b9bffe0d3d658b8a99e2854b3e8070e50c11f and here: https://github.com/Megaputer/karma-junit-reporter/commit/9138c062c343262bccaa71571aca30d6e11d579b). You may want to try that for now. |
👍 @rhencke Thanks a lot for your reply and commit links. |
This error should be fixed in the karma-junit-reporter 1.2.0 release. |
Error happens if browser failed on start. Simplest case is when test case contained a Syntax Error. Here is the example, run
grunt
to se the issue.It is rather Karma problem, because
onBrowserComplete
is triggered twice andsuites
isnull
'ed by the second call. Here is some debugging output:The text was updated successfully, but these errors were encountered: