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

[🐛 Bug]: CDP broken : incorrect WS url on TLS ingress latest helm chart #2321

Closed
amardeep2006 opened this issue Jul 24, 2024 · 4 comments
Closed
Milestone

Comments

@amardeep2006
Copy link
Contributor

amardeep2006 commented Jul 24, 2024

What happened?

I upgraded from helm chart version 0.31.1 to latest and CDP tests that are run via playwright are broken.
I have not pulled the Chart using helm but cloned from this repo as on today 24July2024 .
We use sectigo issues SSL configuration on ingress only. The SSL terminates on ingress as the pods run without ssl.

Previously the Grid was returning this CDP URL
wss://admin:[email protected]/session/8dcc0ad57a1236ea21409b4cd6feb652/se/cdp

now it is returning ws url instead on wss .

ws://admin:[email protected]/session/c8d3b2f846417565013f08857dd54bb3/se/cdp

Also note that only CDP is broken , Webdriver protocol in not impacted.
Let me know if you need some more details.

Command used to start Selenium Grid with Docker (or Kubernetes)

Here is my ingress config

ingress:
  # Name of ingress class to select which controller will implement ingress resource
  # Custom annotations for ingress resource
  annotations:
    cert-manager.io/cluster-issuer: "ci-0-acme-sectigo"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "900"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "900"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "900"
  # Default host for the ingress resource
  hostname: $INGRESS_DOMAIN
  tls:
    - secretName: sel-grid-tls-secret
      hosts:
        - $INGRESS_DOMAIN

Relevant log output

Here are logs from Playwright script.

Running 2 tests using 2 workers
  1) [chromium] › example.spec.js:4:1 › has title ──────────────────────────────────────────────────

    Error: browserType.launch: WebSocket error: connect ETIMEDOUT 10.23.201.192:80
    Call log:
      - <selenium> connecting to https://admin:[email protected]/
      - <selenium> connected to sessionId=c8d3b2f846417565013f08857dd54bb3
      - <selenium> using selenium v4
      - <selenium> retrieved endpoint ws://admin:[email protected]/session/c8d3b2f846417565013f08857dd54bb3/se/cdp for sessionId=c8d3b2f846417565013f08857dd54bb3
      - <ws connecting> ws://admin:[email protected]/session/c8d3b2f846417565013f08857dd54bb3/se/cdp
      - <ws error> ws://admin:[email protected]/session/c8d3b2f846417565013f08857dd54bb3/se/cdp error connect ETIMEDOUT 10.23.201.192:80
      - <ws connect error> ws://admin:[email protected]/session/c8d3b2f846417565013f08857dd54bb3/se/cdp connect ETIMEDOUT 10.23.201.192:80
      - <ws disconnected> ws://admin:[email protected]/session/c8d3b2f846417565013f08857dd54bb3/se/cdp code=1006 reason=
      - <selenium> disconnecting from sessionId=c8d3b2f846417565013f08857dd54bb3
      - <selenium> disconnected from sessionId=c8d3b2f846417565013f08857dd54bb3

Operating System

kubernetes 1.26

Docker Selenium version (image tag)

4.23

Selenium Grid chart version (chart version)

0.32.0

Copy link

@amardeep2006, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@amardeep2006 amardeep2006 changed the title [🐛 Bug]: CDP broken : incorrect WS url on TLS ingress in helm chart 0.32.0 [🐛 Bug]: CDP broken : incorrect WS url on TLS ingress latest helm chart Jul 24, 2024
@amardeep2006
Copy link
Contributor Author

I figured out the breaking change in upcoming chart version . I referred this documentation https://github.com/SeleniumHQ/docker-selenium/tree/trunk/charts/selenium-grid#secure-connection-to-the-ingress-proxy

tls:
  ingress:
    enabled: true

Closing the issue.

@VietND96
Copy link
Member

Via your scenario, I am going to update for the case ingress TLS config inline ingress.tls, it would be considered as true for the condition secure via ingress

VietND96 added a commit that referenced this issue Jul 26, 2024
@VietND96 VietND96 added this to the 4.23.0 milestone Jul 27, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants