Skip to content

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

@amardeep2006

Description

@amardeep2006

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:admin@mygrid.url.domain.com/session/8dcc0ad57a1236ea21409b4cd6feb652/se/cdp

now it is returning ws url instead on wss .

ws://admin:admin@mygrid.url.domain.com/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:admin@mygrid.url.domain.com/
      - <selenium> connected to sessionId=c8d3b2f846417565013f08857dd54bb3
      - <selenium> using selenium v4
      - <selenium> retrieved endpoint ws://admin:admin@mygrid.url.domain.com/session/c8d3b2f846417565013f08857dd54bb3/se/cdp for sessionId=c8d3b2f846417565013f08857dd54bb3
      - <ws connecting> ws://admin:admin@mygrid.url.domain.com/session/c8d3b2f846417565013f08857dd54bb3/se/cdp
      - <ws error> ws://admin:admin@mygrid.url.domain.com/session/c8d3b2f846417565013f08857dd54bb3/se/cdp error connect ETIMEDOUT 10.23.201.192:80
      - <ws connect error> ws://admin:admin@mygrid.url.domain.com/session/c8d3b2f846417565013f08857dd54bb3/se/cdp connect ETIMEDOUT 10.23.201.192:80
      - <ws disconnected> ws://admin:admin@mygrid.url.domain.com/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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions