No Robot Code Error In FRC Drive station

We are able to connect and deploy our robot within VS code but when we open up FRC drive station and try to enable it, it reads “NO ROBOT CODE”.

We are coding in Java and I will link the code below but we have tried
Updating VS code to 2023.4.1
Rewiring our motors
Used Phenix Tuner to update our PCM and PDP’s firmware
And tried fixing some bugs

Our Git

This is likely one of three problems:

  • You aren’t actually deploying to the robot, e.g. you’re deploying to desktop simulation. Check on the “run and debug tab” in VSCode.

  • A build failure prevents deployment. Have you checked the “Terminal” window in VSCode. Can you post a screen shot of the last page of a successful deployment?

  • Your robot code is crashing. You should see a stack trace in the Riolog.

I am on the same team as will

I don’t have a screen shot but this what gets printed in our terminal after a successful deployment

Task :discoverroborio
Discovering Target roborio
Using [email protected]:22 for target roborio

Task :deployprogramKillroborioroborio
-C-> . /etc/profile.d/; /usr/local/frc/bin/ -t 2> /dev/null @ /home/lvuser

Task :deployfrcStaticFileDeployroborio
-C-> mkdir -p @ /home/lvuser/deploy
1 file(s) are up-to-date and were not deployed

Task :deployjrefrcJavaroborio
-C-> if [[ -f “/usr/local/frc/JRE/bin/java” ]]; then echo OK; else echo MISSING; fi @ /tmp
-[-1]-> OK

-C-> opkg list-installed | grep openjdk @ /tmp
  -[0]-> frc2023-openjdk-17-jre - 17.0.5u7-1 - FRC OpenJDK Java Runtime Environment

Searching for JRE 17.0.5u7-1
Found JRE frc2023-openjdk-17-jre - 17.0.5u7-1 - FRC OpenJDK Java Runtime Environment
JRE Is Correct Version
Artifact skipped

Task :deployfrcJavaroborio
1 file(s) are up-to-date and were not deployed
-C-> chmod +x “/home/lvuser/Test_FRC.jar”; chown lvuser “/home/lvuser/Test_FRC.jar” @ /home/lvuser

Task :deployrobotCommandfrcJavaroborio
-C-> echo '/usr/local/frc/JRE/bin/java -XX:+UseG1GC -XX:MaxGCPauseMillis=1 -XX:GCTimeRatio=1 -XX:+AlwaysPreTouch
-Djava.lang.invoke.stringConcat=BC_SB -Djava.library.path=/usr/local/frc/third-party/lib -jar “/home/lvuser/Test_FRC.jar” ’ > /home/lvuser/robotCommand @ /home/lvuser
-C-> chmod +x /home/lvuser/robotCommand; chown lvuser /home/lvuser/robotCommand @ /home/lvuser

Task :deploynativeZipsfrcJavaroborio
30 file(s) are up-to-date and were not deployed
-C-> chmod -R 777 “/usr/local/frc/third-party/lib” || true; chown -R lvuser:ni “/usr/local/frc/third-party/lib” @ /usr/local/frc/third-party/lib
-C-> ldconfig @ /usr/local/frc/third-party/lib

Task :deployprogramStartfrcJavaroborio
-C-> sync @ /home/lvuser
-C-> . /etc/profile.d/; /usr/local/frc/bin/ -t -r 2> /dev/null @ /home/lvuser

12 actionable tasks: 11 executed, 1 up-to-date

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

In the Driver Station, you can open up a console window (click the little gear to get to a popup menu with that option). You should be seeing output there where it’s trying to start your robot program and most likely immediately crashing. In the crash message there should be a stack trace showing where the problem is.

The console constantly repeats this:
Warning  44004  FRC: The Driver Station has lost communication with the robot.  Driver Station 
Warning  44002  Ping Results: link-bad, DS radio(.4)-bad, robot radio(.1)-GOOD, roboRIO(.2)-GOOD, FMS-bad FRC: Driver Station ping status has changed.  Driver Station 
 Info roboRIO: Game data update “” received by Robot 
 Error: Could not find or load main class frc.robot.Main 
 Caused by: java.lang.ClassNotFoundException: frc.robot.Main

Ah! Looking at your repository, your robot code is located in a directory robot at the root–the contents of that directory should be in the src/main/java/frc/robot directory instead.


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