Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

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

Open czellweg opened 8 years ago

czellweg commented 8 years ago

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']
    }
  },
};
czellweg commented 8 years ago

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:

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

bushuyev commented 8 years ago

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

bushuyev commented 8 years ago

and it is still closing.

bushuyev commented 8 years ago

Thank you!

dfreedm commented 8 years ago

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.

bushuyev commented 8 years ago

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?

justinfagnani commented 8 years ago

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

dfreedm commented 8 years ago

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.

justinfagnani commented 8 years ago

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

pdesjardins90 commented 7 years ago

+1 this is insane

ankon commented 7 years ago

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()
avizcaino commented 7 years ago

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

pdesjardins90 commented 7 years ago

It's workaround time!

💩

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.