karma-runner / karma

Spectacular Test Runner for JavaScript
http://karma-runner.github.io
MIT License
11.95k stars 1.71k forks source link

TypeError Cannot read property 'body' of null #3311

Open marc-mabe opened 5 years ago

marc-mabe commented 5 years ago

The bug was introduced most probably in https://github.com/karma-runner/karma/commit/7968db63eb9899961dec19655904502334043735

Expected behaviour

Should work as in v3.1.3

Actual behaviour

Chrome 15.0.874 (Windows 7.0.0) ERROR
  Uncaught TypeError: Cannot read property 'body' of null
  at http://localhost:8080/karma.js:86

Environment Details

I see this error happening on IE9 and Chrome15 running on browserstack. DIdn't tested all of the browsers - so there are probably more browsers broken.

Steps to reproduce the behaviour

  1. Setup mentioned browser
  2. node ./node_modules/karma/bin/karma start --browsers Chrome15

PS: We have to support quite old browsers (IE9+) in our projects and need to have a working testing framework for that.

marc-mabe commented 5 years ago

Any news on this ?

johnjbarton commented 5 years ago

I suggest trying to run the test locally so you can use --noSingleRun then use the browser's debug tools to figure out how the document is getting mutated.