Newbie: keep getting errors on first simple watchface

Hi there, thanks for even reading this probably stupid question, but I am wrestling now for 2 days with Visual code, and the first simple watchface.

I installed everything according to the documentation, thus:

- Garmin SDK (+ setting the latest SDK as current, + downoaded devices)

- Visual code

- Monkey C extension (+ developer key + verification)

- Java JRE and JDK (v17 and v19)

Therafter I created a new project, all according to the beginners guide.

In this new project there is a "source" folder containing 2 .mc files.

When opening one of them in VC editor, and "run without debug" I am getting an error in the terminal all the time.

****************************************


ERROR: Missing argument for option: y
org.apache.commons.cli.MissingArgumentException: Missing argument for option: y
at org.apache.commons.cli.Parser.processArgs(Parser.java:363)
at org.apache.commons.cli.Parser.processOption(Parser.java:395)
at org.apache.commons.cli.Parser.parse(Parser.java:210)
at org.apache.commons.cli.Parser.parse(Parser.java:88)
at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2431)
at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:342)
at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:371)
usage: monkeyc [-a <arg>] [-b <arg>] [-c <arg>] [-d <arg>] [-e]
[--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
[-m <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v]
[-w] [-x <arg>] [-y <arg>] [-z <arg>]
-a,--apidb <arg> API import file
-b,--apimir <arg> API MIR file
-c,--api-level <arg> API Level to target
-d,--device <arg> Target device
-e,--package-app Create an application package.
--Eno-invalid-symbolDo not error when a symbol is found to be invalid
-f,--jungles <arg> Jungle files
-g,--debug Print debug output
-h,--help Prints help information
-i,--import-dbg <arg> Import api.debug.xml
-k,--profile Enable profiling support
-l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative, 3=strict]
-m,--manifest <arg> Manifest file (deprecated)
-o,--output <arg> Output file to create
-p,--project-info <arg>projectInfo.xml file to use when compiling
-r,--release Strip debug information
-s,--sdk-version <arg> SDK version to target (deprecated, use -c
-t,--unit-test Enables compilation of unit tests
-u,--devices <arg> devices.xml file to use when compiling (deprecated)
-v,--version Prints the compiler version
-w,--warn Show compiler warnings
-x,--excludes <arg> Add annotations to the exclude list (deprecated)
-y,--private-key <arg> Private key to sign builds with
-z,--rez <arg> Resource files (deprecated)

* The terminal process "C:\Program Files\Common Files\Oracle\Java\javapath\java.exe '-Xms1g', '-Dfile.encoding=UTF-8', '-Dapple.awt.UIElement=true', '-jar', 'c:\Users\Gebruiker\AppData\Roaming\G
armin\ConnectIQ\Sdks\connectiq-sdk-win-4.1.5-2022-08-03-6e17bf167\bin\monkeybrains.jar', '-o', 'bin\GarminFenix.prg', '-f', 'c:\Programmeren\Monkey C\GarminFenixTest\GarminFenix\monkey.jungle', '-y', '', '-d', 'fenix7_sim', '-w'" terminated with exit code: 100.

*********************************************************************

What am I doing wrong? Did I forget something to install? 

Help is much appreciated...

  • -y is for your developer key  It looks like you don't have it set correctly.  Here's where you do that

  • Thanks!!

    It is set in the workspace settings. If I set it in de user settings I get another error:

    When I open settings, I see a JSON file with:

    {
        "php.validate.executablePath": "C:\Users\Gebruikers\.................\Bureaublad\PHP Execution"
    }
  • This one has been solved... but now I get another error:

    ERROR: C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C (Access denied)

    ERROR: C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C (Access denied)
    java.io.FileNotFoundException: C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C (Access denied)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:158)
    at com.garmin.connectiq.common.signing.KeyUtils.getPrivateKey(KeyUtils.java:105)
    at com.garmin.connectiq.common.signing.KeyUtils.getPrivateKey(KeyUtils.java:91)
    at com.garmin.connectiq.common.signing.KeyUtils.getPrivateKey(KeyUtils.java:55)
    at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2671)
    at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:342)
    at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:371)
    usage: monkeyc [-a <arg>] [-b <arg>] [-c <arg>] [-d <arg>] [-e]
    [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]
    [-m <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v]
    [-w] [-x <arg>] [-y <arg>] [-z <arg>]
    -a,--apidb <arg> API import file
    -b,--apimir <arg> API MIR file
    -c,--api-level <arg> API Level to target
    -d,--device <arg> Target device
    -e,--package-app Create an application package.
    --Eno-invalid-symbolDo not error when a symbol is found to be invalid
    -f,--jungles <arg> Jungle files
    -g,--debug Print debug output
    -h,--help Prints help information
    -i,--import-dbg <arg> Import api.debug.xml
    -k,--profile Enable profiling support
    -l,--typecheck <arg> Type check [0=off, 1=gradual, 2=informative, 3=strict]
    -m,--manifest <arg> Manifest file (deprecated)
    -o,--output <arg> Output file to create
    -p,--project-info <arg>projectInfo.xml file to use when compiling
    -r,--release Strip debug information
    -s,--sdk-version <arg> SDK version to target (deprecated, use -c
    -t,--unit-test Enables compilation of unit tests
    -u,--devices <arg> devices.xml file to use when compiling (deprecated)
    -v,--version Prints the compiler version
    -w,--warn Show compiler warnings
    -x,--excludes <arg> Add annotations to the exclude list (deprecated)
    -y,--private-key <arg> Private key to sign builds with
    -z,--rez <arg> Resource files (deprecated)

    * The terminal process "C:\Program Files\Java\jdk-19\bin\java.exe '-Xms1g', '-Dfile.encoding=UTF-8', '-Dapple.awt.UIElement=true', '-jar', 'c:\Users\Gebruiker\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.1.5-2022-08-03-6e17bf167\bin\monkeybrains.jar', '-o', 'bin\GarminFenix.prg', '-f', 'c:\Users\Gebruiker\xxxxxxxxxxxxxxxx\Documenten\Programmeren\Monkey C\GarminFenixTest\GarminFenix\monkey.jungle', '-y', 'C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C', '-d', 'fenix7_sim', '-w'" terminated with exit code: 100.

  • Looks like the compiler can't open your key file:

    ERROR: C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C (Access denied)
    java.io.FileNotFoundException: C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C (Access denied)

    ...

    '-y', 'C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C'

    It seems that you've set your developer key path to:

    "C:\Users\Gebruiker\Dropbox\Programmeren\Monkey C"

    Is this a folder or a file? It needs to be the full path (including filename) to the key file that you generated with:

    CTRL-SHIFT-P > Monkey C: Generate a Developer Key

    If the path is set correctly, try placing the key outside of your dropbox, in case dropbox is somehow preventing access to the key.

  • This was the trick... thank you so much.
    I assumed that the path was without the filename, as it is with the Java path.

    No all works! Thanks!