-
Notifications
You must be signed in to change notification settings - Fork 2.3k
"Port 5858 is already in use" when using browser.pause more then once #2206
Comments
Encountering the exact same issue. |
+1 |
I'm not sure what the implications of this are, but you can specify the port as a param to
would allow you to pause multiple times without crashing. In which case, this would seem like expected behavior. Maybe a bit more information in the documentation would help, but this feature is marked as beta/unstable so that makes sense. |
I am also experiencing this. I have tried both closing the debugger and continuing to the next debugger statement with the same result. I think the hesitance to use the multiple ports is that this would appear to leave the ports open, so if you are running a long test suite, with multiple browser.pause, you would have a number of debug ports open. As well, the OPs issue is hitting the pause in the beforeEach, so this would require incrementing a debug variable after each pause to avoid the issue. As a temporary workaround, I have put the following into our protractor.conf.js onPrepare function: global.debugPortNumber = 5000;
global.initiateDebug = function() {
browser.pause(debugPortNumber);
debugPortNumber++;
}; Then I can call initiateDebug() from wherever and not have to worry about manually updating the port number. |
Same issue here -> http://screencast.com/t/8CFTi1eGD0 |
+1 |
I'm seeing this now even when running pause just once. @hankduan do you have time to take a look? |
+1 hitting same issue. |
+1 |
Fixed here: #2763 |
@hankduan I tried out you #hack branch because I ran into the port problem. I have a node project using
using you branch I run some e2e tests ~ (https://github.com/angular/protractor/blob/master/debugging/failure_spec.js)
raises:
is this a nodejs or a protractor issue ? if its a pure nodejs issue I have already added a comment to an existing issue nodejs/node-v0.x-archive#8030 (comment) which node version do you / others use successfully for protractor debugging ? |
That branch is for using Protractor with multiple And just as a background on what the debug command does, protractor simply calls node with That being said, I have not been able to reproduce your issue (I've used 4.x and 5.0) |
@hankduan ok I get the debugger thing and leaves to out for now. I should have made it more clear that I also have an e2e test with multiple browser.pause() along the
now I downgrade to node 5.0.0 and look up port 5858 usage
and use your protractor branch. now I get 'the port already in use' error:
any hints further suggestions ? I naively tried with one pause only: browser.pause(5860); ran the test again
but I running out of ideas how to solve it... |
Run it as |
@hankduan thank you for the patience without the |
This is out in the 3.1.0 release! |
This seems to be happening again on 3.3.0. I tried 3.2.0 and 3.1.0 and it works on both. Error:
Same thing happens when I use Test files:
|
+1 this is happening to me in version 3.3.0. (this never used to happen, I know how to use these pause/debug features, it's specific to 3.3.0) |
+1 4.0.4 happening as well |
I fixed this issue in 4.0.5 On Sep 28, 2016 22:16, "tommyz0123" notifications@github.com wrote:
|
+1 |
+1 |
Sorry, I'm able to repro the problem in 4.0.11. It's working for me, but maybe my test case is too simple. If you're still seeing duplicate port errors, could you open a new issue with some more details? For example, is the error consistent or intermittent? Do you see it with browser.pause() in different it() blocks? A repro example is always really helpful when debugging issues like this. Also, if you happen to have multiple Protractor instances doing browser.pause(), you'll see this error. That's a known issue, and we can fix it if it's a problem for people. |
Fixed easily enough in osx or linux by killing the protractor process that is taking the port. In a terminal window, "ps -A | grep protractor" will show the running process which is consuming the port, and the problem will be solved with "kill -s kill (pid)" where (pid) is the number of the listed process from the previous command |
I have the line
browser.pause();
in a beforeEach-function in my Protractor spec and I thought it would act as a breakpoint for me to pause before everyit
and check out the browser before continuing with the commandd
to continue to the next debugger statement (which should be the beforeEach again). But when Protractor reach beforeEach for the second time I get the error:Isn't this how you're supposed to use the pause function? What's purpose of the
d
-command if you can't usebrowser.pause()
multiple times in the code?The text was updated successfully, but these errors were encountered: