Maven repo errors while building a 2023 project on Windows

I’m trying to build a 2023 project, but I get the following error on my Windows laptop.
However, I can build just fine on my Linux desktop, which is connected to the same home network.
I have tried disabling the Windows firewall, and using a VPN. Very confusing, because this Windows laptop could build 2022 FRC projects just fine, before I started going through the process of installing the 2023 versions of the various bits of software.

* Where:
Build file 'C:\Users\vignebal\WSLDocuments\FRC\PH2023\build.gradle' line: 89

* What went wrong:
Could not determine the dependencies of task ':jar'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not resolve com.pathplanner.lib:PathplannerLib-java:2023.2.3.
     Required by:
         project :
      > Could not resolve com.pathplanner.lib:PathplannerLib-java:2023.2.3.
         > Could not get resource 'https://3015rangerrobotics.github.io/pathplannerlib/repo/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
            > Could not GET 'https://3015rangerrobotics.github.io/pathplannerlib/repo/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target
      > Could not resolve com.pathplanner.lib:PathplannerLib-java:2023.2.3.
         > Could not get resource 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
            > Could not GET 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target
   > Could not resolve org.photonvision:PhotonLib-java:v2022.2.0.
     Required by:
         project :
      > Could not resolve org.photonvision:PhotonLib-java:v2022.2.0.
         > Could not get resource 'https://maven.photonvision.org/repository/internal/org/photonvision/PhotonLib-java/v2022.2.0/PhotonLib-java-v2022.2.0.pom'.
            > Could not GET 'https://maven.photonvision.org/repository/internal/org/photonvision/PhotonLib-java/v2022.2.0/PhotonLib-java-v2022.2.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target
      > Could not resolve org.photonvision:PhotonLib-java:v2022.2.0.
         > Could not get resource 'https://maven.photonvision.org/repository/snapshots/org/photonvision/PhotonLib-java/v2022.2.0/PhotonLib-java-v2022.2.0.pom'.
            > Could not GET 'https://maven.photonvision.org/repository/snapshots/org/photonvision/PhotonLib-java/v2022.2.0/PhotonLib-java-v2022.2.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target
      > Could not resolve org.photonvision:PhotonLib-java:v2022.2.0.
         > Could not get resource 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/org/photonvision/PhotonLib-java/v2022.2.0/PhotonLib-java-v2022.2.0.pom'.
            > Could not GET 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/org/photonvision/PhotonLib-java/v2022.2.0/PhotonLib-java-v2022.2.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target
   > Could not resolve org.photonvision:PhotonTargeting-java:v2022.2.0.
     Required by:
         project :
      > Could not resolve org.photonvision:PhotonTargeting-java:v2022.2.0.
         > Could not get resource 'https://maven.photonvision.org/repository/internal/org/photonvision/PhotonTargeting-java/v2022.2.0/PhotonTargeting-java-v2022.2.0.pom'.
            > Could not GET 'https://maven.photonvision.org/repository/internal/org/photonvision/PhotonTargeting-java/v2022.2.0/PhotonTargeting-java-v2022.2.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target
      > Could not resolve org.photonvision:PhotonTargeting-java:v2022.2.0.
         > Could not get resource 'https://maven.photonvision.org/repository/snapshots/org/photonvision/PhotonTargeting-java/v2022.2.0/PhotonTargeting-java-v2022.2.0.pom'.
            > Could not GET 'https://maven.photonvision.org/repository/snapshots/org/photonvision/PhotonTargeting-java/v2022.2.0/PhotonTargeting-java-v2022.2.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target
      > Could not resolve org.photonvision:PhotonTargeting-java:v2022.2.0.
         > Could not get resource 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/org/photonvision/PhotonTargeting-java/v2022.2.0/PhotonTargeting-java-v2022.2.0.pom'.
            > Could not GET 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/org/photonvision/PhotonTargeting-java/v2022.2.0/PhotonTargeting-java-v2022.2.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s

 *  The terminal process "cmd.exe /d /c gradlew build   -Dorg.gradle.java.home="C:\Users\Public\wpilib\2023\jdk"" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.
1 Like

What java version are you using? Is this built from within wpilib vscode, or are you trying to call gradle directly in a terminal? Anything above that first line of output?

From directly within VSCode, same result if done directly in the command prompt.
Only thing above that line of output is:
FAILURE: Build failed with an exception.

Output of java --version:

openjdk 17.0.5 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

Can you load any of the maven urls that fail in a browser?

Is your system date and time correct?

Yup, I can go to all the maven URLs in the browser just fine, and my system date/time is correct for my time zone.

Is this a new project or an upgraded 2022 project?

If it’s an upgraded project, did you use the wizard or manually upgrade?

Its a brand new project.

I just tested our 2023 project on Windows and it built. If you can, try cloning and testing ours: GitHub - wildstang/robot_framework: WildStang FRC Java Framework

Same issue:

 *  Executing task: gradlew build   -Dorg.gradle.java.home="C:\Users\Public\wpilib\2023\jdk" 


FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\vignebal\WSLDocuments\FRC\robot_framework\build.gradle' line: 98

* What went wrong:
Could not determine the dependencies of task ':jar'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not resolve com.pathplanner.lib:PathplannerLib-java:2023.2.3.
     Required by:
         project :
      > Could not resolve com.pathplanner.lib:PathplannerLib-java:2023.2.3.
         > Could not get resource 'https://3015rangerrobotics.github.io/pathplannerlib/repo/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
            > Could not GET 'https://3015rangerrobotics.github.io/pathplannerlib/repo/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      > Could not resolve com.pathplanner.lib:PathplannerLib-java:2023.2.3.
         > Could not get resource 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
            > Could not GET 'https://frcmaven.wpi.edu/artifactory/vendor-mvn-release/com/pathplanner/lib/PathplannerLib-java/2023.2.3/PathplannerLib-java-2023.2.3.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5.1/userguide/build_environment.html#gradle_system_properties
                  > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s

 *  The terminal process "cmd.exe /d /c gradlew build   -Dorg.gradle.java.home="C:\Users\Public\wpilib\2023\jdk"" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Ok, so either something wrong with Windows or the WPILib install. To be absolutely sure I would delete the entire C:\Users\public\wpilib folder and C:\Users\your_username\wpilib if it exists. This will delete all versions of WPILib/VSCode. Then install from a fresh download from Release WPILib 2023.1.1 Release · wpilibsuite/allwpilib · GitHub

1 Like

Are u doing this within WSL? It appears based on the error the system ur using is trying to use something other than TLS 1.2 or 1.3 so GitHub is rejecting the connection since it’s not secure. If u can get to it in the browser than it appears the wherever/whatever gradle is running in is messed up or weirdly configured.

Can you post the output of the WPILib: Open Project Information dialog?

No it’s in standard Windows command prompt.

Are you sure you don’t have some sort of intercepting antivirus or firewall installed on the system? This error is basically associated with something intercepting https, and using TLS 1.1 or lower, which most maven servers don’t support anymore.

WPILib Information:
Project Version: 2023.1.1
VS Code Version: 1.74.2
WPILib Extension Version: 2023.1.1
C++ Extension Version: 1.13.8
Java Extension Version: 1.13.0
Java Debug Extension Version: 0.47.0
Java Dependencies Extension Version 0.21.1
Java Version: 17
Java Location: C:\Users\Public\wpilib\2023\jdk
Vendor Libraries:
KauaiLabs_navX_FRC (4.0.447)
PathplannerLib (2023.2.3)
CTRE-Phoenix (5.21.4)
photonlib (v2022.2.0)
REVLib (2023.1.1)
WPILib-New-Commands (1.0.0)

I’ve tried disabling the firewall. But thing is, I had no problem building FRC projects before I started installing the 2023 versions of software. I was building 2022 projects just fine, so I don’t think I should have anything blocking the relevant web traffic.

The new year includes upgrades to both gradle 7.5.1 and Java 17. With the upgrades to newer web standards, it’s possible the new versions block tls 1.1 and lower by default.

What version of Windows?

They were blocked in the versions used in 2022 also. They were blocked in Gradle 6.8 and Java 11.0.11.

Also, just as a check. Can you delete the jdk folder from the wpilib/2023 folder, and copy the one from your wpilib/2022 folder? That will go back to a java 11 jdk, and will tell us if its something changed between the versions of java used. You’ll probably need to reboot your computer to be able to delete the folder.

Note this is still likely some configuration thing on your system. Something is not letting it use the correct TLS versions needed to contact the servers.

Its Windows 10, version 21H2, Build 19044.2251.