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

Browser.pause throws error #4252

Open
shawon-barua opened this issue Apr 30, 2017 · 6 comments
Open

Browser.pause throws error #4252

shawon-barua opened this issue Apr 30, 2017 · 6 comments

Comments

@shawon-barua
Copy link

[11:12:59] I/protractor - Encountered browser.pause(), but debugger already attached.
events.js:160
throw er; // Unhandled 'error' event

This error shows when executing test cases in CI.

Bug report

  • Node Version: ``6.10.0
  • Protractor Version: ``5.1.1
  • Angular Version: ``
  • Browser(s): ``Chrome
  • Operating System and Version ``windows 10
  • Your protractor configuration file
  • A relevant example test
  • Output from running the test
  • Steps to reproduce the bug
  • The URL you are running your tests against (if relevant)

Feature Request

  • Reasons for adopting new feature
  • Is this a breaking change? (How will this affect existing functionality)
@heathkit
Copy link
Contributor

heathkit commented May 2, 2017

Could you post an example repro? It looks like you have a test case with multiple browser.pause() calls.

@maciejtreder
Copy link

maciejtreder commented Jul 17, 2017

I don't know if @shawon-barua case is same, but on my end the problem is caused by error thrown from debuggerCommons.js:

[12:53:00] I/protractor -
[12:53:00] I/protractor - Encountered browser.pause(). Attaching debugger...
[12:53:00] I/protractor -
[12:53:00] I/protractor - ------- WebDriver Debugger -------
[12:53:00] I/protractor - Starting WebDriver debugger in a child process. Pause is still beta, please report issues at github.com/angular/protractor
[12:53:00] I/protractor -
[12:53:00] I/protractor - press c to continue to the next webdriver command
[12:53:00] I/protractor - press ^D to detach debugger and resume code execution
[12:53:00] I/protractor -
module.js:487
    throw err;
    ^

Error: Cannot find module '_debugger'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/msobala/rapid-automation/src/test/ts/node_modules/protractor/built/debugger/debuggerCommons.js:1:82)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

@wswebcreation
Copy link
Contributor

wswebcreation commented Jul 19, 2017

@maciejtreder

I think your error is related to #4390 because, what I assume, you use NodeJS 8

@maciejtreder
Copy link

@wswebcreation I resolved my issue by downgrading node.js from 8+ to 6+. The problem was probably related to that protractor is calling node debug under the hood which is deprecated:

(node:75080) [DEP0068] DeprecationWarning: `node debug` is deprecated. Please use `node inspect` instead.

@marandageist
Copy link

Dupe of #4307

@kshrestha99
Copy link

Any idea why this issue is still not resolved?

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

6 participants