I get "terminated with exit code: 100" when following the "Your first Connect IQ app"

Hi - I've followed all the instructions so far and I'm getting the error above:

Here is the log:

 *  Executing task in folder 55watchface: C:\Program Files\Common Files\Oracle\Java\javapath\java.exe -Xms1g -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar c:\Users\brain\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.1.5-2022-08-03-6e17bf167\bin\monkeybrains.jar -o bin\55watchface.prg -f c:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\monkey.jungle -y  -d fr55_sim -w 
 
 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\brain\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.1.5-2022-08-03-6e17bf167\bin\monkeybrains.jar', '-o', 'bin\55watchface.prg', '-f', 'c:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\monkey.jungle', '-y', '', '-d', 'fr55_sim', '-w'" terminated with exit code: 100. 
 *  Terminal will be reused by tasks, press any key to close it.

Any tips please?

  • Thanks - now I'm getting even more errors Slight smile

    I'm being blocked by Garmin from posting the log in a code block now? SO here is the unformatted log ouput.

    Executing task in folder 55watchface: C:\Program Files\Common Files\Oracle\Java\javapath\java.exe -Xms1g -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar c:\Users\brain\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.1.5-2022-08-03-6e17bf167\bin\monkeybrains.jar -o bin\55watchface.prg -f c:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\monkey.jungle -y c:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\developer_key -d fr55_sim -w

    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:5,6: extraneous input '55' expecting {'Method', ID}
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:21,15: no viable alternative at input '[new55'
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:21,17: no viable alternative at input 'new55'
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:21,23: missing ';' at 'watchfaceView'
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:21,37: mismatched input ')' expecting {'+', '-', '~', '!', 'Method', 'true', 'false', 'null', 'NaN', 'new', '[', '{', '(', ':', '$', INTNUMBER, HEXNUMBER, OCTALNUMBER, FLOATNUMBER, ID, STRING, CHAR}
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:21,39: mismatched input ']' expecting {'as', '[', '.', ';'}
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:26,18: no viable alternative at input 'as55'
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:27,11: no viable alternative at input 'Application.getApp()as55'
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceApp.mc:27,35: extraneous input '55' expecting {'Method', 'interface', 'Null', '{', '(', ID}
    ERROR: fr55: C:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\55watchfaceView.mc:6,6: extraneous input '55' expecting {'Method', ID}
    WARNING: The launcher icon (30x30) isn't compatible with the specified launcher icon size of the device 'fr55' (35x35). Image will be scaled to the target size.
    WARNING: fr55: No supported languages are defined. It's a good idea to indicate which languages you are supporting.

    * 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\brain\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.1.5-2022-08-03-6e17bf167\bin\monkeybrains.jar', '-o', 'bin\55watchface.prg', '-f', 'c:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\monkey.jungle', '-y', 'c:\Users\brain\OneDrive\Desktop\Tech\Garmin Watch SDK\55\55watchface\source\developer_key', '-d', 'fr55_sim', '-w'" terminated with exit code: 100.
    * Terminal will be reused by tasks, press any key to close it.

    Any advice warmly appreciated.

  • Looks like the problem here is that you named your app "55watchface", which means that the app class in the initially generated code is named "55watchface", but that's not allowed because Monkey C identifiers aren't allowed to start with a digit. That's why the compiler is spitting out a bunch of errors when it tries to build your code.

    In an ideal world, the Monkey C extension would've prevented you from naming your app that way. The easiest way to fix this problem would be to go through the process of creating your app again, but this time use a name that starts with a letter, such as "FiftyFiveWatchFace".

  • perl -p -i -e 's/\b55/FiftyFive/g' $(git ls-files)
    rename -v 's#/55#/FiftyFive#g' $(git ls-files)

    This would do the trick as well for renaming everything in the current project.

  • That assumes they're using Linux (they're clearly on Windows) and that all their files are source-controlled with git. Even on Mac, perl is deprecated (will no longer be installed by default at some point.)

    It's a good solution if you're on Linux (or you're using WSL in Windows), but I still think the easiest thing to do -- especially if you haven't written any code yet -- is to recreate the app from scratch.

  • Yes, and we're talking a few simple edits here if you want to keep the code you've written so far

  • Perl runs on Windows. You can probably do the same with python or powershell nowadays. But I do not know either syntax.

    Been three years when they announced deprecations for all scripting languages: https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes#3318257

    https://www.reddit.com/r/perl/comments/bxxizq/apple_deprecating_inclusion_of_perl_and_other

  • Sure and using WSL (Windows Subsystem for Linux) on Windows, you can run the exact commands that you mentioned (assuming you're using git for source control.)

    My point was that it's great advice in general, but not really applicable to this exact situation, imo. (I assume most people who are new to development of any kind on Windows are not going to dive into using WSL or command line tools)

    If I had to fix an existing small project which only had minor edits after creation, I would probably just use search and replace within VS Code, and rename files by hand. There's even a pretty nice bulk renaming powertoy for windows, although it's probably overkill for this situation.

    I find search and replace within VS Code to be pretty nice actually. It supports pretty much everything you would expect it to have, including regexp support, include/exclude file filters, word matching, case matching, and case-preserving replacement.

    I like the command line a lot and use it on the daily, but for me there's a time and place.

  • I agree.  In this case, it only involves a few simple edits, and maybe the renaming of a couple files (if desired).  Doing more seems like overkill.  Change a couple of class names to wathcface55 and change manifest.xml to use the new entry point

  • Thanks all - changing the project name did the trick, sorry I needed help with such a simple thing! Will keep reading through  :)