Issues Compiling, probably relating to Developer Key format

I am having big issues compiling my app.  I'm getting an error message saying the key format is not valid.  I initially generated it using the (correct) Monkey C extension in Visual Studio.  That format did not work.  Chat GPT advised me to use Open SSL to convert to PEM - tried that many times in different ways.  It's still saying the key format is not right.

Help would be much appreciated.

  • Ignore most things about CIQ you get from Chat GPT.  You're not the first one  to have issues with CIQ and AI

    Use VSC and the Monkey C Extension to create the key file, and when you compile, the command line you see in the terminal window should point to the key file

  • Thanks very much. So does that mean the key does not need to be PEM format? My Monkey C extension gives a file with no extension. I’ve tried both, so maybe something else is wrong.

  • You can call the file anything you want, as long as it's thje key created by the monkey C extension.

    My key is in a file named "ciq.key" for example.

    Forget about Chat GPT with CIQ.  It pretty much has no clue.  Come to this forum and ask instead.

  • So does that mean the key does not need to be PEM format?

    TL;DR the key is supposed to be in DER format but that shouldn't matter as the Monkey C extension creates it that way automatically when you select "Monkey C: Generate Developer Key". And when you do that, the extension also automatically sets the path to the key in its settings, so you shouldn't have to do *anything* else after generating the key to get it to work.

    If you are stuck and you truly want to manually generate a key, use the procedure outlined here, written by a human Garmin employee:

    [https://developer.garmin.com/connect-iq/core-topics/security/#generating-a-key-using-openssl]

    It's interesting that asking a human or even reading/watching content generated by a human is now the last resort, even though chatgpt and other LLMs wouldn't even exist without decades of human-generated internet content.

    It's also interesting that people seem to be so shocked when chatgpt and other LLMs are wrong about something, and they often disbelieve a person who tells them something that contradicts chatgpt. Chatgpt is only regurgitating information that was written by humans, yet it's somehow seen as more authoritative than any real human.

    ---

    Chat GPT advised me

    chatgpt doesn't know anything and isn't able to actually "advise" you to do anything. It just predicts the most likely text, with a bias towards telling you exactly what you want to hear. It doesn't have a personality or mind, and it's not an individual entity of any kind.

    If you tell it you are having problems with your CIQ key format, it doesn't have the ability to actually analyze your problem as a human would. It just parrots what actual humans have said on similar topics, but in this case, it is giving you useless "advice". No real human would tell you to use OpenSSL to convert your CIQ key to PEM after generating it from the Monkey C extension. Why would that be necessary? The whole point of Garmin providing a command to automatically generate your key is so you don't have to do manual stuff like that. Of course, LLMs are not capable of this kind of critical thinking, either.

    And actually, if you were to just do a classic web search and read content that actual humans wrote about Connect IQ developer keys, you would see that the necessary format is DER. The actual advice that's given for manually generating a CIQ developer key is to first create a PEM key in OpenSSL, then convert it to DER. Basically the opposite of what chatgpt is telling you.

    https://developer.garmin.com/connect-iq/core-topics/security/ 

    https://medium.com/@bgallois/garmin-app-development-without-the-visual-studio-code-85628e4b6ba1 

    Connect IQ is a very niche topic (I can count the number of regular posters in this forum on one hand), so it's unsurprising that LLMs wouldn't be very helpful here.

    But it's good advice in general to be very skeptical about what LLMs tell you on any subject. You almost have to be an expert on a subject to be able to tell when chatgpt is BS'ing you about it, but that defeats the purpose, right? Btw, all chatgpt does is make stuff up - it just so happens that a lot of time, the stuff it makes up is true. But when it's wrong, it's confidently wrong, and it's very hard for the user to tell the difference. Chatgpt doesn't know what it doesn't know, because it doesn't know anything.

    I think it's a huge mistake for people to anthropomorphize LLMs to the extent that we do, but it comes so naturally because they're designed as conversational chatbots.

    But you wouldn't have a convo with a magic 8-ball or assume that it's giving you good advice, would you?

    Help would be much appreciated.

    Idk if this is obvious or not, but it really would've been helpful if you had:

    - told us the *exact* steps you took to use the key in VS Code

    - copied and pasted the exact build output from the terminal, including the command line and the error message

    Without any of that, I can only guess that:

    1) you used the Monkey C extension to generate the key (as you said)

    2) but you also manually changed the Monkey C extension setting for the Developer Key Path to point to the folder in which the key was created, instead of the key itself. 

    If you did 2), that would be the problem.

    When you do 1), the extension automatically sets the developer key location to point to the newly generated key. You shouldn't have to do anything after generating the key from within VS Code. On the contrary, you should get a little notification that the developer key path was set to \PATH\TO\FOLDER\YOU\SELECTED\developer_key. (Note that the name of the key file is automatically set to developer_key without prompting you.)

    If I'm wrong about 2), I can only guess that maybe you have spaces in your key path and this is causing the problem? Garmin historically has had issues with file/folder names that contain spaces. Then again, I just tried using a key in a folder path containing spaces on Windows, and it worked fine.

  • My Monkey C extension gives a file with no extension

    The extension of a file doesn't determine its contents, it's just a hint to the system about what those contents might be.

    Since the key file is both created and used by Garmin software, I can see why they didn't feel the need to give it an extension of .DER (for example).

    A good reason for *not* setting the extension is to prevent curious users from trying to double click on the file to launch it. For example, if you double-click on a .DER file in Windows, the OS thinks you're trying to install a public security certificate for the internet (which you aren't). It obviously won't work, and you'll just get a confusing error message.

    Since the key file has no extension, that kind of issue is avoided.

  • Thanks very much.   I managed to get my app going on the simulator.  Hoping to try it on my actual watch - again AI is advising on this, so I guess that's fraught with risk.  Being advised to copy the .prg to the App folder.  When I do so a log is created in the watch saying:

    "Error: 'Signature check failed on file: UnderwaterHockey'
    Time: 2025-08-18T03:03:23Z
    Part-Number: 006-B3291-00
    Firmware-Version: '28.02'
    Language-Code: eng"

    Does that mean I still have issues with the developer key?

  • You must use SDK 7.4.3 or greater to sideload an app.  And there are things like app settings you can't do with sideloads.

    If you got this far, your key is good.  Make sure you have it saved off in the cloud or something.

    You may want to check "news and announcements" and the "new developer FAQ"