-
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
Bug [v1.1.0] : Cannot read property '88199994' of null #99
Comments
I'm also seeing the same problem intermittently with v1.1.0 junit and v1.3.0 runner |
Same here - also with karma 1.3.0 and 1.1.0 of the reporter |
A bit more info - I have karma set up to watch for file changes. It seems I can reproduce this issue fairly reliably by changing a file rapidly and triggering test re-runs. Specifically it seems as though triggering karma's watch while tests are running does the trick. Here's a bit more from my output - sanitized to protect the innocent.
|
Looking at the stack traces a bit more closely, this could be two separate issues (onBrowserStart vs onBrowserComplete), but they're awfully similar. |
I don't have time to look into this further at the moment, and I'm pretty new to karma, but my guess is that in index.js |
When a watcher triggers Karma to re-run a test, onRunComplete() from the first test run happens after onRunStart() from the second test run. This results in `suites` incorrectly clobbered to null. Nulling it out is unnecessary as long as onRunStart() initializes `suites`. Fixes karma-runner#99.
@dpwatrous 's assessment is spot-on. In a regular, uninterrupted test run, the sequence of events looks like this:
However, if a test run is interrupted by a new test run (usually triggered by a file change), the sequence looks like this:
If you want to reproduce this, you'd want to try it on on longer test runs when there's a larger window of time to trigger a fs change to trigger a new test run. Karma should probably not have triggered |
When a watcher triggers Karma to re-run a test, onRunComplete() from the first test run happens after onRunStart() from the second test run. This results in `suites` incorrectly clobbered to null. Nulling it out is unnecessary as long as onRunStart() initializes `suites`. Fixes #99.
Getting an exception:
Expected : It should completed properly.
The text was updated successfully, but these errors were encountered: