Acknowledged
CIQQA-3531

Issues with Monkey C Language Server in Visual Studio Code for Garmin Development

I am encountering persistent issues while trying to develop with Monkey C in Visual Studio Code for Garmin Connect IQ. Below are the details of the errors and the steps I have taken so far:

  1. Error Messages:

    • "Failed to load SDK supplementary files: null."
    • "Server initialization failed. Message: Pending response rejected since connection got disposed. Code: -32097."
    • "Connection to server got closed. Server will restart."
    • "Monkey C Language Server client: couldn't create connection to server."
    • "Server process exited with code 0."
    • "The Monkey C Language Server crashed 5 times in the last 3 minutes. The server will not be restarted."
  2. Build Error:
    When attempting to build for a device, I receive the following error:

    ERROR: Unable to load devices: null  
    

    The command being executed is:

    C:\Program Files\Java\jre1.8.0_461\bin\java.exe -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar ...  
    
  3. Environment Details:

    • Visual Studio Code with the Monkey C extension installed (version 1.1.2).
    • Garmin Connect IQ SDK Manager is installed and configured.
    • Java JRE 1.8 is installed and added to the system PATH.
  4. Steps Taken:

    • Reinstalled the Monkey C extension.
    • Verified the SDK path in the Connect IQ SDK Manager.
    • Checked the Java installation and ensured it is accessible.
    • Restarted Visual Studio Code multiple times.

Despite these efforts, the errors persist, and I am unable to proceed with development.

Request for Help:
Has anyone encountered similar issues? If so, how did you resolve them? Any guidance or troubleshooting steps would be greatly appreciated.

Parents
  • Interesting, it does sound like a bug - maybe your circumstances are different somehow, as the SDK manager does re-download devices for me if I move away the devices folder (%appdata%\garmin\connectiq\devices)

    But then again, even if I do move away the devices folder, I don't get the exact same error message as you (I get a more user-friendly error message, which asks me to redownload devices using the SDK manager)

    Here's something you could try:

    - Exit VS Code completely. Rename %appdata%\garmin\connectiq so that the basically has to redownload *everything* from scratch

    - if your user profile name contains spaces or non-ascii characters, try using a user profile that doesn't have spaces or non-ascii chars

    Here's my %appdata%\garmin\connectiq\devices\:

    (after deleting the devices\ folder and letting the SDK manager redownload it)

    https://limewire.com/?referrer=pq7i8xx7p2 

    For me, %appdata%\garmin\connectiq has the following structure:

    devices\
    sdks\
    fonts\
    current-sdk.cfg (if you didn't have this file, you'd get an error about being unable to determine the current SDK)
    sdkmanager-* (a bunch of files that the sdk manager uses, but don't affect the build)
    simulator.ini (not needed for the build, should be auto-genned by the simulator once you are actually able to build an app and launch the sim)

Comment
  • Interesting, it does sound like a bug - maybe your circumstances are different somehow, as the SDK manager does re-download devices for me if I move away the devices folder (%appdata%\garmin\connectiq\devices)

    But then again, even if I do move away the devices folder, I don't get the exact same error message as you (I get a more user-friendly error message, which asks me to redownload devices using the SDK manager)

    Here's something you could try:

    - Exit VS Code completely. Rename %appdata%\garmin\connectiq so that the basically has to redownload *everything* from scratch

    - if your user profile name contains spaces or non-ascii characters, try using a user profile that doesn't have spaces or non-ascii chars

    Here's my %appdata%\garmin\connectiq\devices\:

    (after deleting the devices\ folder and letting the SDK manager redownload it)

    https://limewire.com/?referrer=pq7i8xx7p2 

    For me, %appdata%\garmin\connectiq has the following structure:

    devices\
    sdks\
    fonts\
    current-sdk.cfg (if you didn't have this file, you'd get an error about being unable to determine the current SDK)
    sdkmanager-* (a bunch of files that the sdk manager uses, but don't affect the build)
    simulator.ini (not needed for the build, should be auto-genned by the simulator once you are actually able to build an app and launch the sim)

Children
No Data