3rd party board installation ERROR ("file signature verification failed")

Hey peeps,

hopefully someone knows how to help me solve my problem. My brother and I are going to sell an Arduino compatible product and I am creating a "package_YOURNAMEHERE_index.json" file to help users install our 3rd party board files. When I tried to add the URL to Preferences > "Additional Board Manager URLs" and then open the Board Manager, it checks the package files and then spits out an error:

"https://www.midimods.com/software/package_moth_inc_index.json file signature verification failed. File ignored."

I am trying to trouble shoot the issue. At first I thought I might have the wrong Checksum or filesize, but now I am not sure. What are the different problems that can cause this error? If I get a list of possible reasons, I will gladly troubleshoot it myself. I just have no idea where to start troubleshooting after verifying the checksum and URLs.

Thanks!

Phil

I also encountered the same error with your URL. I don't think the checksum is the problem because that causes an error(something about file CRC) only when you try to install the package. Your file causes the error when Boards Manager is opened and the entry doesn't even appear in Boards Manager. So this indicates it's a problem with the actual JSON file rather than the package or tools that the json file references. The closest to any information I could find on this was: https://github.com/esp8266/Arduino/issues/1051 or the source if that means anything to you: Arduino/ContributionInstaller.java at master · arduino/Arduino · GitHub.

I agree that it is a problem with the JSON and not the package or tool files. I have scanned over the JSON several times and have no idea what is wrong or missing. I wish the error gave specifics about what is wrong with the JSON. Any suggestions on how to troubleshoot the JSON? Can anyone else take a look at my JSON and tell me what is missing/incorrect?

I think it has something to do with your server rather than the content of your json file. I just created a file with the exact same content on GitHub and it doesn't cause the signature verification error when I use it to do a Boards Manager install: https://gist.githubusercontent.com/per1234/1cfcc871a2fc8de15021/raw/09330794c368ce63609f06c066c44d8ece5a8590/package_moth_inc_index.json it does have a different error when you try to install but that's just the structure of the archive file and should be easy to fix.

cool. that did the trick! I wish they had a list of errors and ways to troubleshoot when it comes to 3rd party board installation. it would make this way faster

Now I am getting a different error. I am happy the Json file is being found and processed and has no checksum error. But now, when it tries to unpack the .zip package file, I get the following error:

"Invalid archive: it must contain a single root folder while file __MACOSX/ is outside moth_1.0.1/".

I am not sure exactly what it means. Can someone please help explain?

philmanofsky:
cool. that did the trick! I wish they had a list of errors and ways to troubleshoot when it comes to 3rd party board installation. it would make this way faster

Did you ever find out what was causing the signature verification to fail with the json file hosted on midimods.com? I'll add the information to Arduino IDE 1.6.x package_index.json format specification · arduino/Arduino Wiki · GitHub.

philmanofsky:
"Invalid archive: it must contain a single root folder while file __MACOSX/ is outside moth_1.0.1/".

I am not sure exactly what it means. Can someone please help explain?

The file www.midimods.com/software/moth_1.0.1.zip has the folder structure:

moth_1.0.1.zip
|_ MACOSX
|
moth_1.0.1

This is not allowed, all folders must be under the moth_1.0.1 folder so you could just move the _MACOSX folder to moth_1.0.1 but I'm not sure that will actually accomplish anything other than fixing the error. I don't have a mac so I don't know how _MACOSX is used but a search indicates this folder is automatically added by the built in compression program. So my advice is to create moth_1.0.1.zip without the _MACOSX folder(or remove that folder from the file), update the checksum and size values for that file in your json file, and then try a Boards Manager installation of your package on your mac and I'm guessing it will work fine without the _MACOSX folder because I've never seen this in any of the many other hardware packages I've installed.

Interesting, on my Mac it only shows one main folder with all the board components directly beneath it. I guess I could use a different program to compress the folder or just do it all on my Windows desktop. Thanks for the help. I figured that there was something I couldn't see going on, but my mac was just hiding the __MACOSX directory. So strange that it would do that.