-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Remove usage of --remote-debugging-port
, rely on Chrome-chosen port instead
#16833
Comments
“ This is used in many community plugins, including https://github.com/flotwig/cypress-log-to-output”
I see what you did there
…Sent from my iPhone
On Jun 7, 2021, at 13:37, Zach Bloomquist ***@***.***> wrote:
This is used in many community plugins, including https://github.com/flotwig/cypress-log-to-output
|
This only fixes the race condition possibility. #16620 kinda sounds like a duplicate of #16571, since from what I can gather it's happening every time. #15650 might be a duplicate as well, since it implies that it's happening every time. But since it's happening every time, none of these 3 are covered by this issue. #5613 happens for a different reason too: #5613 (comment) |
Yah I was going to try to clean up the duplicates today. Would be nice to fix those. 😢 |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior
Cypress launches Chrome with
--remote-debugging-port=SOME OPEN PORT
. Unfortunately, this creates a race condition, since the port that was open at the time of port detection may not be open once Chrome has finished launching and listening. Especially in CI where the TCP port namespace is shared between containers.Desired behavior
Do not specify a port, instead, let Chrome choose an open port so this race condition cannot occur.
This will break a common pattern that users use in their plugins - snarfing the RDP port from
--remote-debugging-port
arg and then connecting to it via their plugin code to send commands. This is used in many community plugins, including https://github.com/flotwig/cypress-log-to-output , so we should consider it a breaking change.As a result, this should not be added until we have another way to expose CDP to users.
Edit: Most likely this could also be applied to Firefox's CDP port.
Test code to reproduce
Versions
The text was updated successfully, but these errors were encountered: