I’m using ember-mocha and when I run my tests with Chrome I intermittently get an exception like this:
Error: Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://localhost:7357/assets/ace/worker-json.js' failed to load. (blob:https://localhost:7357/244407ad-35de-4f79-9f91-3e5f494ee52c:1)
at global.onerror (https://localhost:7357/assets/test-support.js:13994:10)
That generally causes the next test to fail with:
Assertion Failed: You cannot use the same root element (DIV) multiple times in an Ember.Application
stack: >
Error: Assertion Failed: You cannot use the same root element (DIV) multiple times in an Ember.Application
Then a series of tests after that all fail in the “before each” or “after each” hooks that aren’t from my tests, but I assume from ember-mocha. They complain about seemingly random things like Cannot read property 'call' of undefined, Cannot use 'in' operator to search for 'destroy' in undefined and then it just gives up running the remaining tests.
If I run it a few times generally it will pass all the tests and the Uncaught NetworkError never shows up.
I’ve checked the content-type on https://localhost:7357/assets/ace/worker-json.js and it’s “application/javascript” which seems fine. How can I handle the Uncaught NetworkError better or stop it from happening at all?
6 posts - 2 participants