Comments (12)
@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.
from karma-junit-reporter.
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:
INFO [Safari 7.0.5 (Mac OS X 10.9.4)]: Connected on socket zTI9jtNWzoZKrulU5Q6n with id 10854247
INFO [Chrome 35.0.1916 (Mac OS X 10.9.4)]: Connected on socket 6Yt7AmX6_1c3OOi05Q6o with id 7862841
INFO [Safari 7.0.5 (Mac OS X 10.9.4)]: Connected on socket xCdLA-A3zbzrI_mO5Q6m with id 40855390
INFO [Firefox 30.0.0 (Mac OS X 10.9)]: Connected on socket voBi3f_NPvl77owT5Q6p with id 68411812
................................................................................
................................................................................
.....................................................................
Safari 7.0.5 (Mac OS X 10.9.4): Executed 135 of 135�[32m SUCCESS�[39m (0.7 secs / 0.64 secs)
................................................................................
................................................................................
Chrome 35.0.1916 (Mac OS X 10.9.4): Executed 135 of 135�[32m SUCCESS�[39m (1.288 secs / 1.204 secs)
................
Firefox 30.0.0 (Mac OS X 10.9): Executed 135 of 135�[32m SUCCESS�[39m (1.37 secs / 1.271 secs)
�[32mTOTAL: 405 SUCCESS�[39m
WARN [Safari 7.0.5 (Mac OS X 10.9.4)]: Disconnected (1 times)
Safari 7.0.5 (Mac OS X 10.9.4): Executed 0 of 135�[31m DISCONNECTED�[39m (3.28 secs / 0 secs)
Fatal error: Cannot read property '10854247' of null
My current work-around sucks quite a lot: remove Safari, build, re-add Safari, build again.
I have tried various fiddling with timeouts and disconnect tolerance.... no joy.
It seems to me that the base problem is that Safari is getting disconnected, not that the failed browser is a fatal error.
Any/all suggestions are appreciated.
from karma-junit-reporter.
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:
TypeError: Cannot read property '73488940' of null
at JUnitReporter.specSuccess.specSkipped.specFailure (.....\node_modules\karma-junit-reporter\index.js:89:22)
at BaseReporter.onSpecComplete (.....\node_modules\karma\lib\reporters\base.js:83:12)
at bindMethod (.....\node_modules\karma\lib\events.js:15:22)
at EventEmitter.emit (events.js:117:20)
at Browser.onResult (.....\node_modules\karma\lib\browser.js:213:13)
at Socket.bindMethod (.....\node_modules\karma\lib\events.js:15:22)
at Socket.EventEmitter.emit [as $emit] (events.js:117:20)
at SocketNamespace.handlePacket (.....\node_modules\karma\node_modules\socket.io\lib\namespace.js:335:22)
at Manager.onClientMessage (.....\node_modules\karma\node_modules\socket.io\lib\manager.js:518:38)
at WebSocket.Transport.onMessage (.....\node_modules\karma\node_modules\socket.io\lib\transport.js:369:20)
How to fix this bug?
from karma-junit-reporter.
Looks like it relates to karma itself: karma-runner/karma#1248
And it was fixed
from karma-junit-reporter.
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...
from karma-junit-reporter.
I believe I've distilled this error (or one very, very much like it) down to a minimal reproduction - this consistently errors with TypeError: Cannot read property 'somenumber' of null
To reproduce:
git clone https://gist.github.com/rhencke/919d12c168e2300da133 bug20
cd bug20
npm install
npm test
from karma-junit-reporter.
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.
from karma-junit-reporter.
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?
from karma-junit-reporter.
Still getting this issue with karma 0.13.22 and karma-junit-reporter 0.4.1. Any way to fix this issue?
from karma-junit-reporter.
👍 @rhencke Thanks a lot for your reply and commit links.
from karma-junit-reporter.
from karma-junit-reporter.
This error should be fixed in the karma-junit-reporter 1.2.0 release.
from karma-junit-reporter.
Related Issues (20)
- Question about CLA and License HOT 4
- License of XSD file HOT 1
- Project Lifetime HOT 2
- Readme should say to add module as a plugin in karma.conf.js HOT 1
- Where does 2.0.0 come from? HOT 1
- Testcase name must be escaped HOT 2
- Text string with emoji crashes the karma HOT 3
- npm audit vulnerability with xmlbuilder package HOT 1
- Please consider releasing a new version. HOT 1
- Suite (package) name is not prepended to the classname attribute in the testcase element
- How to give custom test suite name using karma junit reporter? HOT 2
- Replacement of Path-is-absolute dependency HOT 1
- Windows machines not reporting browser and OS HOT 2
- Warnings HOT 2
- false positive failure with junit on skipped tests
- Any word on 2.0.2
- sometimes junit-reported just doesn't generate reports HOT 11
- link at bottom of readme should point to .io
- Reestablish CI/CD with GitHub Actions
- Is the project still maintained? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karma-junit-reporter.