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

[🐛 Bug]: uploadFile command not available in Firefox since Selenium Docker image 4.31.0

Open lacell75 opened this issue 6 months ago • 8 comments

What happened?

I'm encountering an issue with the uploadFile command when using Firefox in Docker Selenium images, starting from version 4.31.0.

When running WebdriverIO tests that rely on the uploadFile command with Firefox (inside the Docker Selenium container), the following error is returned:

Error: The uploadFile command is not available in firefox

This was working correctly in previous Docker image versions (e.g., 4.30.x). The issue does not occur with Chrome—only with Firefox.

I'm using the remote.uploadFile() WebDriver command to simulate file uploads in Firefox.

The same codebase works fine with Chrome.

It seems like a regression introduced in or after 4.31.0.

I opened an Issue in wdio repo webdriverio#14395

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

services:
    - name: selenium/standalone-firefox:latest
      alias: selenium

Relevant log output

[firefox 140.0.4 linux #0-3] Error: The uploadFile command is not available in firefox
[firefox 140.0.4 linux #0-3] Error: The uploadFile command is not available in firefox
[firefox 140.0.4 linux #0-3]     at Browser.uploadFile (/e2e/node_modules/webdriverio/build/node.js:119:11)
[firefox 140.0.4 linux #0-3]     at Browser.uploadFile2 (/e2e/node_modules/webdriverio/build/node.js:5611:39)
[firefox 140.0.4 linux #0-3]     at Browser.wrapCommandFn (/e2e/node_modules/@wdio/utils/build/index.js:978:32)

Operating System

linux

Docker Selenium version (image tag)

4.31.0 and above

Selenium Grid chart version (chart version)

No response

lacell75 avatar Jul 11 '25 14:07 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 Jul 11 '25 14:07 github-actions[bot]

Updated: I feel this is an issue with Firefox version or Geckodriver. Checking further.

VietND96 avatar Jul 11 '25 14:07 VietND96

In ticket, I saw you mentioned that it happens since Firefox 137. So, can you try this standalone image with a combination of Grid 4.34 and Firefox 136. selenium/standalone-firefox:136.0-geckodriver-0.36-grid-4.34.0-20250707 If it can work, then issue not with Grid version.

VietND96 avatar Jul 11 '25 14:07 VietND96

In ticket, I saw you mentioned that it happens since Firefox 137. So, can you try this standalone image with a combination of Grid 4.34 and Firefox 136. selenium/standalone-firefox:136.0-geckodriver-0.36-grid-4.34.0-20250707 If it can work, then issue not with Grid version.

I have the same error with this version firefox 136 with grid 4.34.0

[firefox 136.0.4 linux #0-3] Error: The uploadFile command is not available in firefox
[firefox 136.0.4 linux #0-3] Error: The uploadFile command is not available in firefox
[firefox 136.0.4 linux #0-3]     at Browser.uploadFile (/e2e/node_modules/webdriverio/build/node.js:119:11)
[firefox 136.0.4 linux #0-3]     at Browser.uploadFile2 (/e2e/node_modules/webdriverio/build/node.js:5611:39)
[firefox 136.0.4 linux #0-3]     at Browser.wrapCommandFn (/e2e/node_modules/@wdio/utils/build/index.js:978:32)
[firefox 136.0.4 linux #0-3]     at fileUpload (/e2e/src/support/action/fileUpload.ts:142:28)
[firefox 136.0.4 linux #0-3]     at World.createKit (/e2e/src/support/action/createKit.ts:29:3)

lacell75 avatar Jul 11 '25 15:07 lacell75

Okay, what is Webdriverio version used? Latest one?

VietND96 avatar Jul 11 '25 17:07 VietND96

I guess could be due to to this cap 'wdio:enforceWebDriverClassic': true, Can you remove this?

VietND96 avatar Jul 11 '25 18:07 VietND96

Yes, the latest version.

Le ven. 11 juil. 2025 à 19:31, Viet Nguyen Duc @.***> a écrit :

VietND96 left a comment (SeleniumHQ/docker-selenium#2896) https://github.com/SeleniumHQ/docker-selenium/issues/2896#issuecomment-3063166685

Okay, what is Webdriverio version used? Latest one?

— Reply to this email directly, view it on GitHub https://github.com/SeleniumHQ/docker-selenium/issues/2896#issuecomment-3063166685, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5XZJFG4FJ45ZEHRYA7XXT3H7YGXAVCNFSM6AAAAACBJ5C2GGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANRTGE3DMNRYGU . You are receiving this because you were mentioned.Message ID: @.***>

lacell75 avatar Jul 11 '25 19:07 lacell75

I guess could be due to to this cap 'wdio:enforceWebDriverClassic': true, Can you remove this?

Hi @VietND96, same error if I remove this cap.

[firefox 141.0 linux #0-0] Error: The uploadFile command is not available in firefox
[firefox 141.0 linux #0-0] Error: The uploadFile command is not available in firefox
[firefox 141.0 linux #0-0]     at Browser.uploadFile (C:\2-gitlab\insight\quality\end-to-end-tests-wdio\node_modules\webdriverio\build\node.js:119:11)
[firefox 141.0 linux #0-0]     at Browser.uploadFile2 (C:\2-gitlab\insight\quality\end-to-end-tests-wdio\node_modules\webdriverio\build\node.js:5611:39)
[firefox 141.0 linux #0-0]     at Browser.wrapCommandFn (C:\2-gitlab\insight\quality\end-to-end-tests-wdio\node_modules\@wdio\utils\build\index.js:978:32)
[firefox 141.0 linux #0-0]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[firefox 141.0 linux #0-0]     at async World.contractUpload (C:\2-gitlab\insight\quality\end-to-end-tests-wdio\src\support\action\contract-upload\index.ts:967:26)

lacell75 avatar Aug 04 '25 15:08 lacell75