SeleniumHQ / SeleniumHQ/docker-selenium

[🐛 Bug]: docker-selenium-firefox does not work on AKS ARM hosts

Open
#3,097 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triaging
Dominant language
Go
Stars
8.7k
Forks
2.5k
Avg merge
10h 16m
Merged PRs (30d)
20

Description

What happened?

Hi,

These selenium builds work fine on my local MAC ARM cpu but fail when I try to use them in an arm container in the cloud (AKS Standard_D8pds_v5 instance).

I receive huge stack traces but I think the relevant part is this:

Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: /. Last 1 characters read: /, next 106 characters to read: tmp/selenium-manager15887522015416884704/manager/0.4.19/selenium-manager: 1: Syntax error: "(" unexpected

Build info: version: '4.19.1', revision: 'abe0ee07dc'
System info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.0-1102-azure', java.version: '21.0.10'
Driver info: driver.version: FirefoxDriver
	at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:166)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$6(JsonTypeCoercer.java:167)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:146)
	at org.openqa.selenium.json.Json.toType(Json.java:206)
	at org.openqa.selenium.json.Json.toType(Json.java:167)
	at org.openqa.selenium.json.Json.toType(Json.java:152)
	at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:144)
	at org.openqa.selenium.manager.SeleniumManager.getDriverPath(SeleniumManager.java:303)

I have spent a looooong time trying to a better error message but can't work it out, if I upgrade to the latest version of selenium the error helpfully changes to this:

/tmp/selenium-manager15499157215157700298/manager/0.4.21/selenium-manager: 1: Syntax error: word unexpected (expecting ")")

Build info: version: '4.19.1', revision: 'abe0ee07dc'
System info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.0-1102-azure', java.version: '21.0.10'
Driver info: driver.version: FirefoxDriver
	at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:166)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$6(JsonTypeCoercer.java:167)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:146)
	at org.openqa.selenium.json.Json.toType(Json.java:206)
	at org.openqa.selenium.json.Json.toType(Json.java:167)
	at org.openqa.selenium.json.Json.toType(Json.java:152)
	at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:144)
	at org.openqa.selenium.manager.SeleniumManager.getDriverPath(SeleniumManager.java:303)

I am pretty sure the error is in the SeleniumManager and that specifically it is likely because of the different string used to report the CPU architecture. Locally OSX reports its architecture as "arm64" but the AKS hosts report their achitecture as "aarch64". These are the SAME and should be treated as the identical, if there is anywhere in the code that looks for the "arm64" architecture it should also accept "aarch64".

Command used to start Selenium Grid with Docker (or Kubernetes)
I'm not sure what command is used. I am running a spring boot app that launches selenium.
Relevant log output
Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: /. Last 1 characters read: /, next 106 characters to read: tmp/selenium-manager15887522015416884704/manager/0.4.19/selenium-manager: 1: Syntax error: "(" unexpected

Build info: version: '4.19.1', revision: 'abe0ee07dc'
System info: os.name: 'Linux', os.arch: 'aarch64', os.version: '5.15.0-1102-azure', java.version: '21.0.10'
Driver info: driver.version: FirefoxDriver
	at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:166)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$6(JsonTypeCoercer.java:167)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:146)
	at org.openqa.selenium.json.Json.toType(Json.java:206)
	at org.openqa.selenium.json.Json.toType(Json.java:167)
	at org.openqa.selenium.json.Json.toType(Json.java:152)
	at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:144)
	at org.openqa.selenium.manager.SeleniumManager.getDriverPath(SeleniumManager.java:303)
Operating System

ubuntu on AKS ARM

Docker Selenium version (image tag)

selenium/standalone-firefox:140.0-20260222

Selenium Grid chart version (chart version)

n/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at SeleniumManager.runCommand and getDriverPath, which appear in the reported stack trace, and inspect how the selenium-manager binary selects its architecture. Reproduce the Firefox startup failure on Ubuntu ARM in the reported Docker or AKS context; done when arm64 and aarch64 select a working binary and Firefox starts without the syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, kubernetes, linux
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.