-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Potential EventEmitter memory leak for element explorer #2200
Comments
duplicate of #1890? |
I don't see |
Can you provide me with some steps to reproduce this? I'm on 2.1.0 and node 0.12.4, but cannot observe the memory leak behavior you mentioned. |
Press enter 20 times in the REPL. |
I also cannot reproduce this. Could you share the system you are on, and your command line for starting element explorer? |
$ node -v OS X 10.10.3 $ protractor --version In tab1 I run
Here is a screen recording I just made that showcases the problem. |
Ok, yes I see what you're doing now. The problem arises when you send additional commands (new line is a command too) while previous commands are loading. For example, sending enters while it is loading The reason is that elementexplorer handles one command at a time (in order to wait for the result of the command). On sending command, it sets up an event listener to wait for the response. Once the result for that command is received, it would clean up the event listener. However, because you're sending multiple commands simultaneously, you're actually creating multiple event listeners before it had the chance to clean up. You won't break element explorer, but yes you will get warnings. (also note that all commands sent while element explorer is waiting for responses will not be processed). Hopefully that clears up the issue here. |
The behavior is confusing, especially compared to a Ruby or Python REPL. It sounds like it's working as intended though. Thanks for explaining. |
That's because normal REPL wouldn't try to resolve a promise before returning. |
Quick note, I can reproduce this on Protractor 5.x in the REPL. Not sure if its still expected to see |
Seeing similar error in protractor 5.4.1 and node 10.9.0 on Mac OS Sierra running 9 e2e specs and not touching keyboard or any input device for that matter at all.
|
Sorry for commenting on this closed story, but there is no comment here explaining why it was closed. I am experiencing the exact same issue as @demisx using Protractor 7.0.0 with npm 8.1.0 and node v16.13.0 . Running headless tests serially. Using browser.restartAsync between each test. |
My experience with protractor 2.1.0 with the latest stable release of node (0.12.x) has been:
Even if the REPL processes the first command properly, it'll freeze up within the next few commands. In addition, there's often this message:
The text was updated successfully, but these errors were encountered: