docker-selenium icon indicating copy to clipboard operation
docker-selenium copied to clipboard

[🐛 Bug]: Can't change firefox language

Open lacell75 opened this issue 1 year ago • 2 comments

What happened?

I can't start selenium/node-firefox with french language. The language still set to en-us. I start the session with these below parameters:

    browserName: 'firefox',
    acceptInsecureCerts: true,
    'moz:firefoxOptions': {
      prefs: {
        'dom.ipc.processCount': 16,
        'browser.download.folderList': 2,
        'browser.download.dir': global.downloadDirFirefox,
        'browser.download.useDownloadDir': true,
        'browser.helperApps.neverAsk.saveToDisk':
          'application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
        'nglayout.initialpaint.delay': 0,
        'intl.accept_languages': 'fr,fr-FR',
        'intl.locale.requested': 'fr,fr-FR',
      },
      args: ['--width=1980', '--height=1080'],
    },

The parameters are correct in about:config but the browser language is in english instead of french image

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

apiVersion: apps/v1
kind: Deployment
metadata:
  name: seleniumv4-node-firefox
  namespace: seleniumv4
  labels:
    app: seleniumv4-node-firefox
spec:
  replicas: 7
  selector:
    matchLabels:
      app: seleniumv4-node-firefox
  template:
    metadata:
      labels:
        app: seleniumv4-node-firefox
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kops.k8s.io/instancegroup
                    operator: In
                    values:
                      - nodes-spot-selenium
                  - key: awstype
                    operator: In
                    values:
                      - spot
      volumes:
        - name: dshm
          emptyDir:
            medium: Memory
        - name: tz-paris
          hostPath:
            path: /usr/share/zoneinfo/Europe/Paris
        - name: timezone
          configMap:
            name: seleniumv4-config
      containers:
        - name: seleniumv4-node-firefox
          image: selenium/node-firefox
          imagePullPolicy: Always
          ports:
            - containerPort: 5555
            - containerPort: 5900
            - containerPort: 7900
          volumeMounts:
            - mountPath: /dev/shm
              name: dshm
            - name: tz-paris
              mountPath: /etc/localtime
            - name: timezone
              mountPath: /etc/timezone
              subPath: timezone
          env:
            - name: SE_SCREEN_WIDTH
              value: "1920"
            - name: SE_SCREEN_HEIGHT
              value: "1080"
            - name: SE_SESSION_REQUEST_TIMEOUT
              value: "600"
            - name: SE_NODE_SESSION_TIMEOUT
              value: "300"
            - name: SE_NODE_MAX_SESSIONS
              value: "2"
            - name: SE_NODE_OVERRIDE_MAX_SESSIONS
              value: "true"
            - name: SE_NODE_GRID_URL
              value: "http://seleniumv4-hub:4444/"
            - name: SE_NODE_HOST
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
            - name: SE_NODE_PORT
              value: "5555"
            - name: SE_EVENT_BUS_HOST
              value: "seleniumv4-hub"
            - name: SE_EVENT_BUS_PUBLISH_PORT
              value: "4442"
            - name: SE_EVENT_BUS_SUBSCRIBE_PORT
              value: "4443"
            - name: TZ
              value: "Europe/Paris"
            - name: SE_OPTS
              value: ''
            - name: SE_JAVA_OPTS
              value: '-Dwebdriver.firefox.whitelistedIps=0.0.0.0 -Xms12g -Xmx12g -Duser.timezone=Europe/Paris'
            # - name: START_XVFB
            #   value: "false"
          resources:
            requests:
              memory: "13.5Gi"
              cpu: "3.5"
            limits:
              memory: "13.5Gi"

Relevant log output

no logs

Operating System

linux 5.15.0-1065-aws amd64

Docker Selenium version (image tag)

latest

Selenium Grid chart version (chart version)

4.23.1

lacell75 avatar Aug 19 '24 13:08 lacell75

@lacell75, 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!

github-actions[bot] avatar Aug 19 '24 13:08 github-actions[bot]

Looks like the issue with geckodriver, similar to https://github.com/mozilla/geckodriver/issues/2087

VietND96 avatar Aug 22 '24 07:08 VietND96

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[bot] avatar Oct 06 '24 00:10 github-actions[bot]