purduesigbots / pros-vsc

PROS plugin for VS Code
Mozilla Public License 2.0
21 stars 5 forks source link

🐛 Create Project fails for V5 with "Unterminated string in JSON at position 8182" #222

Open arrowsmith001 opened 3 months ago

arrowsmith001 commented 3 months ago

Bug Description

User cannot create a new PROS V5 project through the PROS VS Code extension. This seems to happen on Mac OS, but not Windows.

Platform

MacBook Pro running Sonoma 14.2.1

Steps to reproduce

  1. Install the PROS extension for VS Code
  2. Install PROS CLI and Toolchain through the extension
  3. Through the extension menu: PROS -> Conductor -> Create Project
  4. Select a valid destination folder
  5. Enter a valid project name
  6. Select v5
  7. "Fetching kernel versions..." will pop up
  8. Then, "Command completed successfully!" followed by the error, as shown
Screenshot 2024-05-17 at 22 08 08

At this point the PROS extension commands seem unresponsive.

Jackman3323 commented 3 months ago

@arrowsmith001 what version of pros kernel were you attempting to use? Or did you never get to choose?

Lunar-Eclipse255 commented 3 months ago

@jackman3323 I am having the same exact issue, and error, when creating a project it doesn't ask for a kernel version like it has in previous versions, but I am on kernel version 4.0.5. This is the full error message I get in PROS output in terminal: Uc&42BWAaQ{"type": "log/message", "level": "INFO", "message": "INFO - pros.cli.common:callback - Debugging messages enabled - pros-cli version:3.5.1", "simpleMessage": "Debugging messages enabled"} Uc&42BWAaQ{"text": "Not sending analytics for this command.\n\n", "type": "notify/echo", "notify_value": 0} Uc&42BWAaQ{"type": "log/message", "level": "DEBUG", "message": "DEBUG

arrowsmith001 commented 3 months ago

@arrowsmith001 what version of pros kernel were you attempting to use? Or did you never get to choose?

Same as @Lunar-Eclipse255, I didn't get as far as choosing the PROS kernel version. It seems to fail while fetching them.

Jackman3323 commented 3 months ago

@arrowsmith001, @Lunar-Eclipse255: Just an update for y'all while we look into how the pros conductor file is breaking in this way, running pros c reset should get you up and running again. It will reset your locally cached templates/depots to the default so things like lemlib will need to be re-fetched. The reset command will be added as a button in the next update (see #224). Please let us know here if this doesn't fix project creation.

arrowsmith001 commented 3 months ago

@Jackman3323 The reset command does indeed fix the issue.

From this, I found that the act of adding a depot via the CLI is what causes this bug. After adding a depot with pros c add-depot etc, the error comes back, until I perform the reset again. In my case it was LemLib latest stable: https://raw.githubusercontent.com/LemLib/LemLib/depot/stable.json.

With this in mind I tried to recreate it on Windows and can confirm its only happening on my MacBook.

I'm not sure at this point if this is an issue with LemLib, the CLI depot functionality or the extension.