Metals server fails to import / sbt run fails with dependency resolution error

  • Steps to Reproduce:
    1. Clone Repository
    2. Attempt to import project with metals server plugin inside VSCode / Codium.
    3. Observe .metals/metals.log indicating a missing dependency
    4. The same error sometimes occurs when running sbt run with an unclean respository state.
  • Environment: Fedora, NixOS and Windows (WSL) tested with (Eclipse Temurin among others) Java 11 (higher versions throw other exception).
  • Severity: High (Blocks development)
  • Workaround: Delete contents of .metals, project/project, and target directories (omitting the files checked into repository).
  • Additional Information for first missing dependency (pom.xml):
    • wrong URL: https://repo1.maven.org/maven2/ch/epfl/scala/sbt-bloop_2.12_1.0/2.0.13/sbt-bloop-2.0.13.pom
    • right url: https://repo1.maven.org/maven2/ch/epfl/scala/sbt-bloop_2.12_1.0/2.0.13/sbt-bloop_2.12_1.0-2.0.13.pom

Metals log:

2025.10.16 18:54:02 INFO  [info] welcome to sbt 1.8.0 (Eclipse Adoptium Java 11.0.28)[0m
2025.10.16 18:54:04 INFO  [info] loading settings for project backend-build-build-build from metals.sbt ...[0m
2025.10.16 18:54:04 INFO  [info] loading project definition from /home/ben/Git/MarkOne/backend/project/project/project[0m
2025.10.16 18:54:11 INFO  [warn] [0m
2025.10.16 18:54:11 INFO  [warn] 	Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.[0m
2025.10.16 18:54:11 INFO  [warn] 		ch.epfl.scala:sbt-bloop:2.0.13 (sbtVersion=1.0, scalaVersion=2.12)[0m
2025.10.16 18:54:11 INFO  [warn] [0m
2025.10.16 18:54:11 INFO  [warn] 	Note: Unresolved dependencies path:[0m
2025.10.16 18:54:11 INFO  [error] sbt.librarymanagement.ResolveException: Error downloading ch.epfl.scala:sbt-bloop;sbtVersion=1.0;scalaVersion=2.12:2.0.13[0m
2025.10.16 18:54:11 INFO  [error]   Not found[0m
2025.10.16 18:54:11 INFO  [error]   Not found[0m
2025.10.16 18:54:11 INFO  [error]   not found: https://repo1.maven.org/maven2/ch/epfl/scala/sbt-bloop_2.12_1.0/2.0.13/sbt-bloop-2.0.13.pom[0m
2025.10.16 18:54:11 INFO  [error]   not found: /home/ben/.ivy2/localch.epfl.scala/sbt-bloop/scala_2.12/sbt_1.0/2.0.13/ivys/ivy.xml[0m
2025.10.16 18:54:11 INFO  [error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/ch.epfl.scala/sbt-bloop/scala_2.12/sbt_1.0/2.0.13/ivys/ivy.xml[0m
2025.10.16 18:54:11 INFO  [error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/ch.epfl.scala/sbt-bloop/scala_2.12/sbt_1.0/2.0.13/ivys/ivy.xml[0m
Edited by bnthn