Skip to content
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

Tests not always running #8

Closed
okonet opened this issue Mar 28, 2014 · 6 comments
Closed

Tests not always running #8

okonet opened this issue Mar 28, 2014 · 6 comments

Comments

@okonet
Copy link

okonet commented Mar 28, 2014

Can't get how to exactly reproduce it but it seems to be depending on when runner and compilation starts. If the runner is started and compilation not yet done, then the suit will not run.

--- karma-webpack/example ‹master* M› » karma start                                                                                           127 ↵
WARN [karma]: Port 9876 in use
INFO [karma]: Karma v0.12.1 server started at http://localhost:9877/
INFO [launcher]: Starting browser PhantomJS
Hash: f415b7798b75e5251339
Version: webpack 1.1.0
Time: 6ms
Asset  Size  Chunks       Chunk Names
webpack: bundle is now VALID.
webpack: bundle is now invalid.
2014-03-28 10:29 node[4862] (CarbonCore.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
2014-03-28 10:29 node[4862] (CarbonCore.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
Hash: b79bf627a90c35d205b4
Version: webpack 1.1.0
Time: 32ms
                Asset  Size  Chunks             Chunk Names      
    _js/test/aTest.js  4547       0  [emitted]  test/aTest.js    
       _js/1.chunk.js   117       1  [emitted]                   
_js/test/bTest.coffee  4132       2  [emitted]  test/bTest.coffee
chunk    {0} _js/test/aTest.js (test/aTest.js) 679 [rendered]
    [0] ./test/aTest.js 628 {0} [built]
    [1] ./fixtures/file.js 18 {0} [built]
    [3] ./fixtures/file.coffee 33 {0} [built]
chunk    {1} _js/1.chunk.js 18 {0} {2}
    [2] ./fixtures/file.js?1 18 {1} [built]
chunk    {2} _js/test/bTest.coffee (test/bTest.coffee) 398 [rendered]
    [0] ./test/bTest.coffee 398 {2} [built]
webpack: bundle is now VALID.
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start PhantomJS again (1/2).

I always have this issue then building a bigger bundle.

@sokra
Copy link
Contributor

sokra commented Mar 28, 2014

Does this only happen with phantomjs or with browsers too? OS?

@okonet
Copy link
Author

okonet commented Mar 28, 2014

It seems browsers are also affected:

WARN [Chrome 33.0.1750 (Mac OS X 10.9.2)]: Disconnected (1 times), because no message in 10000 ms.

@okonet
Copy link
Author

okonet commented Apr 9, 2014

@sokra any suggestions how I can try to workaround this?

@okonet
Copy link
Author

okonet commented Apr 9, 2014

I'm also having problem with running tests on BrowserStack (using karma-browserstack-launcher)

Here is the warning messages:

INFO [karma]: Karma v0.12.1 server started at http://localhost:9876/
INFO [launcher]: Starting browser firefox 21.0 (OS X Mountain Lion) on BrowserStack
INFO [launcher]: Starting browser iPhone 5 (ios 6.0) on BrowserStack
Hash: 4dd3bd2abd74c54b99cb
Version: webpack 1.1.0
Time: 3ms
Asset  Size  Chunks       Chunk Names
webpack: bundle is now VALID.
webpack: bundle is now invalid.
INFO [launcher.browserstack]: firefox 21.0 (OS X Mountain Lion) session at http://www.browserstack.com/automate/builds/b11f2a7c8daf0480bd3d13e0260ab2231316946e/sessions/cfa86c3ae4552cf03c1d53ff1356c25ede27de78
Hash: aaa00fa91b15a9ff42b1
Version: webpack 1.1.0
Time: 8904ms

...

INFO [launcher.browserstack]: iPhone 5 (ios 6.0) session at http://www.browserstack.com/automate/builds/b11f2a7c8daf0480bd3d13e0260ab2231316946e/sessions/b469efd0e580964c53515857441b99d60ec8e404
INFO [Mobile Safari 6.0.0 (iOS 6.0)]: Connected on socket 66ZYGm6NRcyZ7WbGzteu with id 86890151
INFO [Firefox 21.0.0 (Mac OS X 10.8)]: Connected on socket YHG_L-uuEB1S_WN7ztev with id 76581266
WARN [Mobile Safari 6.0.0 (iOS 6.0)]: Disconnected (1 times), because no message in 10000 ms.

WARN [Firefox 21.0.0 (Mac OS X 10.8)]: Disconnected (1 times), because no message in 10000 ms.

@okonet
Copy link
Author

okonet commented Apr 10, 2014

I've solved the issue by increasing the browserNoActivityTimeout in karma config. It seems it took too long to compile a bundle so the browser was killed before the bundle was ready.

@voor
Copy link

voor commented Apr 23, 2015

@okonet 👍 This solved the issue for me as well, is there anyway we can make this fix easier to see? Seems to be pretty common for webpack, browserify, and other pre-compiled processes.

LeSuisse added a commit to Enalean/tuleap that referenced this issue Jan 16, 2018
This seems like an usual issue [1][2] which is probably related
to the server load.

While not fixing the root cause, this contribution uses a commonly
employed technique: it doubles how long Karma wait for a message
from the browser before disconnecting from it.

[1] karma-runner/karma#598
[2] codymikol/karma-webpack#8

Change-Id: Id809a3c6d518edda6835b9b97eb3e53e438a8cb8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants