Problem discovering RoboRio, c++

Task :discoverRoborio
Discovering Target roborio
admin @ roborio-6758-FRC.local: Connected.
Reason: InvalidImageException
Could not parse image version!
admin @ 10.67.58.2: Connected.
Reason: InvalidImageException
Could not parse image version!
2 other action(s) resolved but not connected.
2 other action(s) failed resolution.
1 other action(s) not started.
Run with --info for more details

Task :discoverRoborio FAILED
Missing Target!
=============================================
Are you connected to the robot, and is it on?
=============================================
GradleRIO detected this build failed due to not being able to find “roborio”!
Scroll up in this error log for more information.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:discoverRoborio’.

A failure occurred while executing jaci.gradle.deploy.target.discovery.TargetDiscoveryWorker
Target roborio could not be found at any location! See above for more details.

  • 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface

BUILD FAILED in 34s
3 actionable tasks: 1 executed, 2 up-to-date
The terminal process “cmd.exe /d /c gradlew deploy -PteamNumber=6758 --offline -Dorg.gradle.java.home=“C:\Users\Public\wpilib\2022\jdk”” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Have you imaged the roboRIO (or its SD card for the Rio 2) and set the team number?

Yes we have. Unless there is a newer version than 6.0.0, it should be up to date. And yes, our RIO is under our team name (6758).

6.0.0 is the firmware version- the roborio image version would be something like “FRC_roboRIO_2022_v2.2”.

I would try reimaging your roborio- the errors indicate that that the image version file on the roborio is missing or corrupted.

EDIT: what version of GradleRIO are you using?

That error should not be printed like that on the current WPILib gradlerio. Are you using an older version of GradleRIO?

Hmm. This most likely is the issue, but our RIO is re-imaged and still does not deploy. It says it is FRC_roboRIO_2022_v4.0.

See my edit above. I think you are using a pre-2022 version of GradleRIO. How did you create the project? Could you post the plugins block of build.gradle?

1 Like

Our programmers graduated last year, so we don’t know how to do that. Can you point us in the right direction?

In your robot software project, there is a file called build.gradle. There should be a block of code in it that looks something like this:

plugins {
    id "java"
    id "edu.wpi.first.GradleRIO" version "2022.4.1"
}

The GradleRIO version should be 2022.4.1 for a 2022 project. If it’s not, the project is probably an older robot project and you’ll have to update it to be able to use it with a 2022 imaged roborio.

See the docs on importing old projects for more information on how to do this. This may require some rewriting/refactoring depending on how old the robot project is.

To add on to the above, I can tell that you have a 2021 or older project. So you will definitely need to go through the project importing process to upgrade to 2022. There is no manual way to do so.

Just FYI, if you want to import a project into 2023, you’ll have to do the same thing when we release the 2023 libraries.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.