badeball / karma-jsdom-launcher

A Karma plugin. Launcher for jsdom.
MIT License
37 stars 16 forks source link

ECONNRESET when loading test files #18

Open abejfehr opened 7 years ago

abejfehr commented 7 years ago

I have no idea what's going on, but the test runner seems to have trouble loading my files:

Here is just one example of many failures that look similar:

Error: Could not load script: "http://localhost:9878/base/src/app/common/components/very-cool-component/very-cool-component.component.test.js?daa8dfd9e97398ffa1c874b0e144e7c990cfc92f"
    at /Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:44:23
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:90:11)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23)
    at Object.check (/Users/myusername/Development/myproject/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:93:23) { Error: read ECONNRESET
    at exports._errnoException (util.js:1014:11)
    at TCP.onread (net.js:609:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }

Node version: 8.2.1 NPM version: 5.4.2

badeball commented 7 years ago

Hi, @abejfehr. Thanks for reporting the issue! Can you provide me with a minimal example that illustrates the problem and allows me to reproduce it?

abejfehr commented 7 years ago

That's going to be super challenging I think. My guess is that it's caused by the sheer volume of JS files, since it loads hundreds of them just fine, but then fails later on in the process.

I'll see if I can reproduce it at a smaller scale and update this post later

gordlea commented 6 years ago

I'm also getting this with a project that loads hundreds of files.

booc0mtaco commented 6 years ago

Perhaps the architecture changes mentioned here also apply to this issue? https://github.com/localvoid/karma-snapshot/issues/5

iapYang commented 5 years ago

I'm also getting this.