Pathplanner Lib JSON parse error

Hello,
My team just came in contact with a possible bug where we can’t get path planner to run without giving us a json parse error. We are using AutoBuilder and worked perfectly before updating to the newest version. Now it doesn’t even work at all even after rolling back the update.

Our Code is: https://github.com/Isotope-Robotics/FRC-2024

The Error is: * ********** Robot program starting **********

  • NT: Listening on NT3 port 1735, NT4 port 5810

  • NT: Got a NT4 connection from 10.97.9.19 port 58960

  • NT: CONNECTED NT4 client ‘photonvision@1’ (from 10.97.9.19:58960)

  • NT: Got a NT4 connection from 10.97.9.224 port 55078

  • NT: CONNECTED NT4 client ‘DartClient_80094481@2’ (from 10.97.9.224:55078)

  • NT: Got a NT4 connection from 10.97.9.224 port 55079

  • NT: CONNECTED RTT client (from 10.97.9.224:55079)

  • Photon Vision is Ready to Roll!!

  • Unhandled exception: org.json.simple.parser.ParseException: Unexpected token RIGHT BRACE(}) at position 788.

  • Error at org.json.simple.parser.JSONParser.parse(JSONParser.java:107): Unhandled exception: org.json.simple.parser.ParseException: Unexpected token RIGHT BRACE(}) at position 788.

  • The robot program quit unexpectedly. This is usually due to a code error.
    The above stacktrace can help determine where the error occurred.
    See Reading Stacktraces — FIRST Robotics Competition documentation for more information.

  • The startCompetition() method (or methods called by it) should have handled the exception above.

  • at org.json.simple.parser.JSONParser.parse(JSONParser.java:107)

  • at org.json.simple.parser.JSONParser.parse(JSONParser.java:59)

  • at org.json.simple.parser.JSONParser.parse(JSONParser.java:53)

  • at com.pathplanner.lib.auto.AutoBuilder.buildAuto(AutoBuilder.java:735)

  • at com.pathplanner.lib.commands.PathPlannerAuto.(PathPlannerAuto.java:39)

  • at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooser(AutoBuilder.java:661)

  • at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooser(AutoBuilder.java:637)

  • at frc.robot.RobotContainer.(RobotContainer.java:27)

  • at frc.robot.Robot.robotInit(Robot.java:66)

  • at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)

  • at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:365)

  • at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:453)

  • at frc.robot.Main.main(Main.java:27)

  • Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:379): The robot program quit unexpectedly. This is usually due to a code error.

  • The above stacktrace can help determine where the error occurred.

  • See Reading Stacktraces — FIRST Robotics Competition documentation for more information.

  • Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:386): The startCompetition() method (or methods called by it) should have handled the exception above.

Did your team manage to find a fix? My team is seeing the same thing, but with a character b in position 0.

I think we had the same issue today. we deleted some paths, but we still had some autos onboard wanting those paths. our solution was to ssh onto the roborio with
ssh [email protected] theres no password, just hit enter
(if your on windows use putty),
then
cd deploy
and remove the pathplanner dir.
rm -rf pathplanner
and that will clear the cache

Yes we managed to get it to work by removing all the paths from the Rio and going though the paths on VSCode to make sure there’s not any extra characters such as parentheses or brackets. Some how there were a few in the wrong places causing the error. After a lot of testing we managed to just use auto builder and it works better.

Thank you so much! Going through the files and clearing the cache on the roborio allowed us to find the source of the issue - somehow non-json files got into the autons folder.