Tools: When debugging tests (incl -p option): browser's developer tools closes constantly

Created on 3 Nov 2015  路  13Comments  路  Source: Polymer/tools

When I debug tests using (for example) Chrome's developer tools, it seems that some sort of refresh happens which constantly closes the developer tools after an indeterminate amount of seconds (sometimes less than 1s, sometimes up to 20s). I have to be quick enough to find out what I need in this time window which makes it a bit stressful. ;)

I haven't yet found out what causes this behaviour so maybe someone here has an idea?

I start wct with the following config:

  module.exports = {
  verbose: false,
  persistent: true,
  plugins: {
    local: {
      browsers: ['chrome']
    }
  },
};
web-component-tester Medium Available Bug

Most helpful comment

+1 this is insane

All 13 comments

I think I have just found the solution thanks to this blog post: http://japhr.blogspot.ch/2015/04/the-debugger-and-breakpoints-with-web.html

What worked for me was:

  • start wct and copy the URL _minus_ the ?cli_browser_id=0 argument
  • open a new tab in the browser window that wct created and past that URL

Then, debugging should work as expected and the dev tools will remain open.

Could you please consider reopening this? Existing workaround doesn't mean it shouldn't be fixed, or, at least documented. It took me half of the day today to find this issue to solve it. Besides, it seems ot be related to
https://sites.google.com/a/chromium.org/chromedriver/help/devtools-window-keeps-closing

and it is still closing.

Thank you!

Yeah, this is a complication from wct-sauce plugin, which sends a selenium command every 45 seconds to keep the sauce connection alive.

I need to refactor how the plugins load to fix this.

Sauce? I thought I've turned it off:

var wct = require('web-component-tester').test;
...
gulp.task('tests-persistent', ['systemjs'], function(){

wct({persistent: true, plugins: {local: {}, sauce: false}, testTimeout: 99999999997}, function(error){
if (error) {
notifier.notify({
'title': 'Build failed',
'message': '' + error
});
}
else {
notifier.notify({'title': 'Build passed', 'message': 'Yay!'});
}
})
});

Have I?

@azakus can you describe the refactoring you had in mind? Agree this is super annoying.

My thought was to not load the plugins unless they are specified on the command line or in the config file. Right now, wct will load both the local and sauce plugins even if the other is not used.

In addition, is there a way to send the keep-alive command only to the sauce launched browsers?

+1 this is insane

FWIW, this still seems to happen with a disabled sauce plugin, and in debug mode I can see this output repeating - devtools close always at that time.
~~
chrome 58 CALL title()
chrome 58 GET /session/:sessionID/title
14:58:49.923 INFO - Executing: [get title])
14:58:49.927 INFO - Done: [get title]
chrome 58 RESPONSE title()
~
~

Hi! Any news on this? I'm trying to debug some tests and tried everything here but devtools keeps closing... :(

It's workaround time!

  • polymer test -p
  • copy URL
  • close chrome
  • open a new chrome manually
  • paste url + enter
  • Voil脿, devtools now stays open, but becomes more slow over time (seems like a memory leak), you'll have to reboot it after some time

馃挬

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NeoLegends picture NeoLegends  路  3Comments

rasto68 picture rasto68  路  4Comments

idoshamun picture idoshamun  路  3Comments

emilbillberg picture emilbillberg  路  3Comments

Westbrook picture Westbrook  路  4Comments