-
Notifications
You must be signed in to change notification settings - Fork 2.3k
debug broken on 0.19.0 but works on 0.18.1 #552
Comments
yup, same here- doesn't work on 0.19 (although i don't see those socket errors), seems to be working with 0.18.1 |
I get the above error using both 0.19.0 and 0.18.1. |
@mcalthrop ensure you kill all node processes before trying again on 0.18.1 |
Thanks Leo, good call – correction: debugging works on 0.18.1, but on 0.19.0 I get the error described above. |
i'm glad to help narrowing this issue :) |
Yep, definitely don't want any red herrings! I hope this bug gets picked up soon. Making it hard to debug. |
On the radar! Thanks for pointing this out! |
That's right! debugger is working on 0.18.1, however i had to change chromeDriver within protractor config file, because I was getting an error about path. chromeDriver: '../node_modules/protractor/selenium/chromedriver' |
Fix is in - should be out next release. Thanks for your patience, everyone. |
The issue still seems to be present in version 0.20.1. I am running protractor with the debug param, but the test completes successfully and competently ignores the line which says |
@dineshdh can you post your exact command line and the OS you are using? |
Works for me on 0.20.1, Linux. |
I am using Windows 8, and running the below command from within the root of my project
output
protractor_conf.js
app_spec.js
|
@dineshdh can you try running with protractor instead of That works fine for me on mac/linux but maybe there's something weird on windows? |
@juliemr, I ran using protractor ( |
browser.debugger() is being ignored by protractor 0.20.1 on Windows 7 (node-debug 0.1.0) My test:describe('angularjs homepage', function() { Console:c:\TFS\A\DEV>"C:\Program Files\nodejs\node" c:\tfs\a\DEV\node_modules\protractor\lib\cli.js debug C:\TFS\A\DEV\protractor.config.js PID: 6136 (capability: chrome #1)Starting debugger agent. Finished in 4.111 seconds |
I also find that browser.debugger() is not pausing the tests on a Mac. It wasn't working in 0.18 so installed 0.20.1 and no change. Here's the the command line argument: protractor debug config/protractor/localhost.conf.js --seleniumServerJar node_modules/protractor/selenium/selenium-server-standalone-2.40.0.jar The test: describe('Links to the page', function () {
}); |
After some more investigation, I found that browser.debugger() DOES work when there are no syntax errors in that particular test (e.g. element(...).text() vs element(...).getText() ) So this works for me: it('should show the link on the navigation menu', function () { |
Still appears to be broken in WebStorm with Protractor 0.20.1. I tried many variations and watch The video, but nothing resolved the problem within WebStorm of hanging during debug start - until I rolled back to Protractor v 0.18.1. I made no other changes to my environment (same as video), except rolling back Protractor, and now it works as expected, with the ability to use the IDE to set breakpoints inline. I've rolled back and forth between versions twice just to confirm that is indeed the only variable changed. By the way, I'm using WebStorm 7.0.3 on Mac. Here's how WebStorm starts the debugger: /usr/local/bin/node --debug-brk=53819 node_modules/protractor/lib/cli.js config/pro_conf.js Typing this exact same command in the terminal manually WILL HANG. In order for this to work in the terminal, the "--debug..." part must appear after the cli path. That's true for both version 18 and 20. However, version 18 seems to properly account for this different set of launch args inside of WebStorm. |
Unfortunately, I must confirm that debugging is still broken in WebStorm(7/8) with Protractor 0.20.1. ;-( |
Yes still broken in Webstorm 8. |
Should this issue be re-opened as it's not resolved - at least not in WebStorm 7 or 8? Appears to relate to how Protractor is parsing the WS launch arguments for debugging (see my comment above). |
This should be resolved with 0.21.0 On Sat, Apr 5, 2014 at 11:26 AM, Brian McNaboe [email protected]:
|
Confirmed - it works in 0.21.0 and WebStorm 8! Thanks Julie! |
Node v0.10.26 - Still doesn't work for me. I've tried various versions protractor and they are all the same. Not sure you can help me but would be very grateful if you can. Output is below. Using the selenium server at http://localhost:4444/wd/hub |
Same for me, Node 10.26 and protractor 0.22.0 and selenium standalone server on Arch Linux (jre7-openjdk 7.u55_2.4.7-1....currently available package as of this comment date). I get the same error as @screenm0nkey |
MacOS 10.9.2 Following the tutorial: http://www.ng-newsletter.com/posts/practical-protractor.html
The output I'm getting:(Same as @screenm0nkey and @Nogbit)
Configuration files:(nothing exceptional here, just for reference)
|
@stefek99 this looks correct to me - you are now in the node debugger and can type 'c' to continue execution. What's the issue you're seeing? |
@stefek99 @juliemr I got exactly the same issue like @stefek99
using Mac 10.9.3, node v0.10.26, protractor 0.22.0 |
Any ideas anybody? My output below: $ grunt protractor
Running "protractor:run" (protractor) task
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriverHit SIGUSR1 - starting debugger agent.
debugger listening on port 5858
connecting... ok
break in timers.js:77
75 }
76
77 function listOnTimeout() {
78 var msecs = this.msecs;
79 var list = this;
debug> c
debug> Selenium standalone server started at http://10.0.1.30:62952/wd/hub
c
debug> c
debug> c
debug> c
debug> [launcher] chrome passed
>>
program terminated
debug> Fatal error: protractor exited with code: 1
Execution Time (2014-05-27 21:14:09 UTC)
protractor:run 16.8s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 16.8s |
I get the same output as @jacopotarantino Mac 10.9.3, node v0.10.26, protractor 0.22.0 |
Could you try upgrading protractor? current version is 1.0.0 |
Yes, I thought that might have been the problem. Just did a fresh npm -g install and updated to v1.0.0. Same issue where I stop in timers.js:77. Thanks for the help though! |
To update, I have v0.10.29 of node and tried the following versions of protractor with the tutorial setup: v1.0.0, v0.20.1, v0.21. I get the same output as @jacopotarantino When I try v0.18, I get the following output:
|
I have been having this issue for a long time now. (I think since protractor 0.18.0) Current versions are: protractor v1.2.0, node v0.10.30, MacOS 10.10 (had the same problem on 10.9). This is the result:
It seems that the execution always breaks in a random place of code (a process is being killed). |
For those still experiencing this issue as I was:
Turned out I had another process running on that port already. A previous debug gone wrong. After killing it, all is well:
Props to this SO post. |
@levithomason This is not the case for me and the problem still exists in protractor 1.4.0. I have tried an earlier version but I sill can't properly debug protractor. This is the output like many of the other people having the same issue: Using the selenium server at http://localhost:4444/wd/hub when I hit C it continues to run and ignore my browser.debugger(); is this solved or is there a new way to approach debugging this? |
@Istenes Exactly the same problem here (protractor 1.4, node 10.29) |
@Istenes I also had issues with the debugger apparently skipping my break points. The fix I confirmed above was regarding the OP's exact error:
My solve for debugging was to use my IDE's protractor runner (WebStorm by JetBrains). The debugging is beyond superb. Not only does it pause, it overlays the value of all my javascript variables in the IDE right inside the javascript file. Does much more goodness, too. If you're a JetBrains user you can checkout the debug setup instructions on the Protractor site here: http://angular.github.io/protractor/#/debugging#setting-up-webstorm-for-debugging |
I'm unable to debug on protractor 0.19.0
Downgraded to protractor 0.18.1 and worked fine!
Then re-installed 0.19.0 to test again, and the same socket error.
Tested on chrome33 & firefox27, chromedriver 2.9. node 0.10.25
Using
webdriver-manager start
in another console.Then port 5858 seems to be left open:
Please note debug works well when i re-install 0.18.1
Tried with a remote selenium grid, same issue so webdriver-manager is not related.
#549 looks like a question but might be related.
The text was updated successfully, but these errors were encountered: