Skip to content

[🐛 Bug]: "class file for com.google.auto.service.AutoService not found" in 4.52.0 #18309

Closed

Description

@l0b0

Description

Upgrading from 4.51.0 to 4.52.0 causes tests to throw a warning because of a missing library:

/root/.gradle/caches/modules-2/files-2.1/org.seleniumhq.selenium/selenium-firefox-driver/4.52.0/b63a12aff3fc8cbdbed02d6e903ae29154e4f2cc/selenium-firefox-driver-4.52.0.jar(/org/openqa/selenium/firefox/GeckoDriverService$Builder.class)

[warn] Cannot find annotation method 'value()' in type 'com.google.auto.service.AutoService': class file for com.google.auto.service.AutoService not found

The Selenium update is the only change in the branch.

Running on an official GitLab runner.

Reproducible Code

1. Clone https://gitlab.com/engmark/insecure-links-highlighter/
2. Install Nix (or run inside the `nixos/nix:2.35.4@sha256:f159a58f390677f41e8e900a74b6e2f9c7f27b364122ae6acf7a652ce6c551c0` container image)
3. Run `nix develop --ignore-environment --command gradle --configure-on-demand --info --rerun-tasks check`

Debugging Logs

Compiling with toolchain '/nix/store/74icc1j3bvsjqs51mih1qh9gafawpdq2-openjdk-21.0.13.0.2+1/lib/openjdk'.
Compiling with JDK Java compiler API.
/root/.gradle/caches/modules-2/files-2.1/org.seleniumhq.selenium/selenium-firefox-driver/4.52.0/b63a12aff3fc8cbdbed02d6e903ae29154e4f2cc/selenium-firefox-driver-4.52.0.jar(/org/openqa/selenium/firefox/GeckoDriverService$Builder.class): warning: Cannot find annotation method 'value()' in type 'AutoService': class file for com.google.auto.service.AutoService not found
error: warnings found and -Werror specified

ℹ️ Last known working version: 4.51.0

Activity

  1. added
    I-defect
    A-needs-triaging
    on Nov 12, 2026
  2. selenium-ci commented on Nov 12, 2026

    @selenium-ci
    Member

    @l0b0, thank you for creating this issue. We will troubleshoot it as soon as we can.

    Selenium Triage Team: remember to follow the Triage Guide

  3. added
    C-java
    I-regression
    on Nov 12, 2026
  4. yashp676 commented on Nov 12, 2026

    @yashp676
    Contributor

    Reproduced with a minimal Gradle project: one class using GeckoDriverService.Builder, depending on selenium-java, compiled with -Xlint:all -Werror on JDK 17.

    4.51.0: builds. compileClasspath gets com.google.auto.service:auto-service-annotations:1.1.1 through selenium-remote-driver and selenium-support.
    4.52.0: fails, and auto-service-annotations is no longer on the compile classpath:
    selenium-firefox-driver-4.52.0.jar(/org/openqa/selenium/firefox/GeckoDriverService$Builder.class): warning: Cannot find annotation method 'value()' in type 'AutoService': class file for com.google.auto.service.AutoService not found
    error: warnings found and -Werror specified

    This looks like it comes from #18212. @ AutoService has CLASS retention, so it stays in the bytecode and javac reports the missing type under -Xlint:classfile. Builds without that lint flag aren’t affected, and -Xlint:all,-classfile works around it.

    @titusfortner would you be OK with me opening a PR that restores auto-service-annotations as a compile-scope POM dependency, keeping the rest of #18212’s cleanup?

  5. added a commit that references this issue on Nov 13, 2026
    4287e3a
  6. removed
    A-needs-triaging
    on Nov 13, 2026
  7. added a commit that references this issue on Nov 13, 2026
    662911c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-javaD-firefoxI-defectI-regressionOS-linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions