Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

browser.pause() crashes #1893

Closed
cacrookes opened this issue Mar 4, 2015 · 5 comments
Closed

browser.pause() crashes #1893

cacrookes opened this issue Mar 4, 2015 · 5 comments

Comments

@cacrookes
Copy link

Hi, I seem to have protractor working fine, unless I use a browser.pause() statement. When it hits the pause, it tells me "Debugger listening on port 5858", but nothing after that. No debugger interface. And no commands work, although ^c quits the process. It does pause the Chrome browser, however it is blank, and in the address bar it says "data:,". I've also tried using Firefox, with the same result except the browser address bar is blank. I have the same problem using both mocha and jasmine.

I am running Mac OS 10.10.2, and protractor 1.8.0.

Here is my protractor.conf.js:

exports.config = {
    specs: [
        'test/e2e/**/*.spec.js'
    ],
}

and my spec file

describe('foo', function(){
  it('bar' function(){
    browser.get('http://www.angularjs.org');
    browser.pause();
    $('html').getText().then(console.log);
  });
});

It runs fine if I comment out the browser.pause() line.

My output running protractor --troubleshoot is:

⇒  protractor --troubleshoot
DEBUG - Running with --troubleshoot
DEBUG - Protractor version: 1.8.0
DEBUG - Your base url for tests is undefined
DEBUG - Attempting to find the SeleniumServerJar in the default location used by webdriver-manager
DEBUG - Attempting to find the chromedriver binary in the default location used by webdriver-manager
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.1.102:57351/wd/hub
DEBUG - WebDriver session successfully started with capabilities { caps_:
   { applicationCacheEnabled: false,
     rotatable: false,
     mobileEmulationEnabled: false,
     chrome: { userDataDir: '/var/folders/n2/5qxzhv2904l2flzqj4wdlyvm0000gn/T/.org.chromium.Chromium.a5g4Eb' },
     takesHeapSnapshot: true,
     databaseEnabled: false,
     handlesAlerts: true,
     version: '40.0.2214.115',
     platform: 'MAC',
     browserConnectionEnabled: false,
     nativeEvents: true,
     acceptSslCerts: true,
     'webdriver.remote.sessionid': '365da574-1948-4b75-9ca4-722eb9c84237',
     locationContextEnabled: true,
     webStorageEnabled: true,
     browserName: 'chrome',
     takesScreenshot: true,
     javascriptEnabled: true,
     cssSelectorsEnabled: true } }
Starting debugger agent.
Debugger listening on port 5858
@hankduan
Copy link
Contributor

hankduan commented Mar 4, 2015

What's your version of node?

@cacrookes
Copy link
Author

node is v0.12.0

@hankduan
Copy link
Contributor

hankduan commented Mar 4, 2015

ah yes. So apparently node has changed their 'debugger' module several times since v0.10.30.

Namely v0.10.31 causes significant delays when you use element explorer/pause (see #1890)
and v0.12.0 simply breaks element explorer/pause

The first issue I've filed a bug against node (again, see issue). The second issue, I am currently fixing; but even after I fix it, elementexplorer/pause is still unusable with the delay.

The only workaround I can think of right now is use node 0.10.30 or earlier.

@cacrookes
Copy link
Author

Thanks for your help! Switching to node 0.10.30 works.

@shicholas
Copy link

👍 I was using .12 then had to revert to .10 for the same issue.

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

No branches or pull requests

3 participants