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 timing out #681

Closed
jywarren opened this issue Jul 5, 2020 · 6 comments
Closed

Tests timing out #681

jywarren opened this issue Jul 5, 2020 · 6 comments

Comments

@jywarren
Copy link
Member

jywarren commented Jul 5, 2020

Seeing this come up a lot; and @sashadev-sky tried working on it in #609 (comment)

I attempted a fix in #675

https://docs.travis-ci.com/user/gui-and-headless-browsers/#karma-and-firefox-inactivity-timeouts

    browserNoActivityTimeout: 40000,

But we're still seeing it in #680 (you can try it out in fact in GitPod there!)

The error is typically:

30 06 2020 19:24:15.577:WARN [PhantomJS 2.1.1 (Linux x86_64)]: Disconnected (1 times), because no message in 30000 ms.
PhantomJS 2.1.1 (Linux x86_64) ERROR
  Disconnected, because no message in 30000 ms.

And after #675 it is now:

  Disconnected, because no message in 40000 ms.

Any help appreciated!

@MLefebvreICO
Copy link

Hi there,

Just found your issue while searching for why our tests suite on our end was not working anymore.

First of all, let me suggest you use Chrome headless instead of PhantomJS which was abandonned years ago.

But for now even Chrome headless is broken, because of their latest stable release ..

You can follow on this here : https://bugs.chromium.org/p/chromium/issues/detail?id=1090988

@jywarren
Copy link
Member Author

jywarren commented Jul 7, 2020

Ah, thank you for the tip! Looking in our test setup, i'm thinking we could make the switch here perhaps:

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 5000,
// to address Travis build errors; https://github.com/publiclab/Leaflet.DistortableImage/pull/675
// https://docs.travis-ci.com/user/gui-and-headless-browsers/#karma-and-firefox-inactivity-timeouts
browserNoActivityTimeout: 40000,
// Workaround for PhantomJS random DISCONNECTED error
browserDisconnectTimeout: 10000, // default 2000
browserDisconnectTolerance: 1, // default 0

@jywarren
Copy link
Member Author

jywarren commented Jul 7, 2020

Looks like there are karma-chrome-launcher and karma-firefox-launcher among others!

@jywarren
Copy link
Member Author

jywarren commented Jul 7, 2020

So i would guess the steps might be:

  1. include karma-chrome-launcher in package.json
  2. add "Chrome" to browsers: array
  3. change this include:

require('karma-phantomjs-launcher'),

@jywarren
Copy link
Member Author

jywarren commented Jul 9, 2020

Let's see how this does, and if Chrome bug resolves we can update it: #685

@sashadev-sky
Copy link
Member

closed via #716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants