SeleniumHQ / SeleniumHQ/docker-selenium

[🐛 Bug]: DockerClient.getImage fails to find image after successful pull in standalone-docker:4.39.0

Open
#3,151 1 comment 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?

Related Issue

Follow-up to #2940 — the API version mismatch was resolved, but a new failure occurs in the same code path.

Description

After upgrading to selenium/standalone-docker:4.39.0 with Docker API 1.40, image pull succeeds but DockerClient.getImage() (line 107) fails to locate the image in the subsequent local image listing.

Environment

  • Selenium Grid: selenium/standalone-docker:4.39.0
  • Docker Engine API version: 1.40
  • Host: Linux x86_64
  • Image registry: AWS ECR (<account-ID>.dkr.ecr.eu-west-2.amazonaws.com)
  • Image built with: docker buildx build --platform linux/amd64 --output=type=docker --provenance=false

Config (docker.toml)

[docker]
display-name = "selenium-grid"
configs = [
    "<Account-ID>.dkr.ecr.eu-west-2.amazonaws.com/selenium-chrome:137.0-dev", '{"browserName": "chrome"}'
]
host-config-keys = ["ExtraHosts", "Binds"]
url = "http://127.0.0.1:2375"

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

```shell
docker run -d --name selenoid --privileged -p 4444:4444 -v /opt/selenium/Grid/config/config.toml:/opt/selenium/docker.toml -v /var/run/docker.sock:/var/run/docker.sock -v /opt/selenium/Grid/assets:/opt/selenium/assets -e SE_BROWSER_ARGS_DISABLE_DSHM=--disable-dev-shm-usage -e SE_SESSION_REQUEST_TIMEOUT=600 -e SE_SESSION_RETRY_INTERVAL=2 -e SE_START_VNC=false -e SE_NODE_MAX_SESSIONS=8 -e SE_NODE_OVERRIDE_MAX_SESSIONS=true -e SE_DOCKER_IMAGE_PULL_POLICY=Never <account-ID>.dkr.ecr.eu-west-2.amazonaws.com/selenium-grid:4.39.0-dev
Relevant log output
  • I just replaced ecr account id with Account-ID
INFO [Docker.getImage] - Obtaining image: <Account-ID>.dkr.ecr.eu-west-2.amazonaws.com/selenium-chrome:137.0-dev
13:43:25.667 INFO [DockerClient.getImage] - Listing local images: Reference{domain='<Account-ID>.dkr.ecr.eu-west-2.amazonaws.com', name='selenium-chrome', tag='137.0-dev', digest='null', platform='linux/amd64}
13:43:25.716 INFO [DockerClient.getImage] - Pulling Reference{domain='<Account-ID>.dkr.ecr.eu-west-2.amazonaws.com', name='selenium-chrome', tag='137.0-dev', digest='null', platform='linux/amd64}
13:43:25.717 INFO [PullImage.apply] - Pulling Reference{domain='<Account-ID>.dkr.ecr.eu-west-2.amazonaws.com', name='selenium-chrome', tag='137.0-dev', digest='null', platform='linux/amd64}
13:43:25.862 INFO [PullImage.apply] - Have response from server
13:43:25.863 INFO [DockerClient.getImage] - Pull completed. Listing local images again: Reference{domain='<Account-ID>.dkr.ecr.eu-west-2.amazonaws.com', name='selenium-chrome', tag='137.0-dev', digest='null', platform='linux/amd64}
13:43:25.896 ERROR [Bootstrap.runMain] - Error during execution
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.openqa.selenium.grid.Bootstrap.runMain(Bootstrap.java:77)
        at org.openqa.selenium.grid.Bootstrap.main(Bootstrap.java:70)
Caused by: org.openqa.selenium.grid.config.ConfigException: java.lang.reflect.InvocationTargetException
        at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:119)
        at org.openqa.selenium.grid.node.config.NodeOptions.getNode(NodeOptions.java:188)
        at org.openqa.selenium.grid.commands.Standalone.createNode(Standalone.java:260)
        at org.openqa.selenium.grid.commands.Standalone.createHandlers(Standalone.java:219)
        at org.openqa.selenium.grid.TemplateGridServerCommand.asServer(TemplateGridServerCommand.java:48)
        at org.openqa.selenium.grid.commands.Standalone.execute(Standalone.java:246)
        at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$4(TemplateGridCommand.java:122)
        at org.openqa.selenium.grid.Main.launch(Main.java:83)
        at org.openqa.selenium.grid.Main.go(Main.java:56)
        at org.openqa.selenium.grid.Main.main(Main.java:41)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        ... 3 more
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.openqa.selenium.grid.config.ClassCreation.callCreateMethod(ClassCreation.java:51)
        at org.openqa.selenium.grid.config.MemoizedConfig.lambda$getClass$4(MemoizedConfig.java:104)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1740)
        at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:99)
        ... 13 more
Caused by: org.openqa.selenium.docker.DockerException: Pull appears to have succeeded, but image not present locally: <Account-ID>.dkr.ecr.eu-west-2.amazonaws.com/selenium-chrome:137.0-dev
        at org.openqa.selenium.docker.client.DockerClient.getImage(DockerClient.java:107)
        at org.openqa.selenium.docker.Docker.lambda$getImage$0(Docker.java:63)
        at java.base/java.util.Optional.map(Optional.java:260)
        at org.openqa.selenium.docker.Docker.getImage(Docker.java:63)
        at org.openqa.selenium.grid.node.docker.DockerOptions.lambda$loadImages$6(DockerOptions.java:313)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
2026-06-09 13:43:26,228 WARN exited: selenium-grid-docker (exit status 1; not expected)
^C
Operating System

Oracle Linux Server

Docker Selenium version (image tag)

selenium/standalone-docker:4.39.0

Selenium Grid chart version (chart version)

No response

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 in DockerClient.java at line 107 and trace the local image listing before and after PullImage completes. Reproduce with Docker API 1.40, the AWS ECR reference, and the supplied standalone-docker configuration, then inspect how the pulled image reference is matched. Done means getImage finds the successfully pulled image and Selenium Grid starts without the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
infrastructure, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.