Custom Board Index not Loading Package or in Dropdown

Hi,

I am trying to create a custom board (just renamed Lillypad for now) to load via the "Additional Boards Manager URLs". Right now my index json file seems to load but the package is not downloaded and nothing appears in the boards dropdown.

Below is my json file. It is correct to generate the checksum with the ziped file, yes?

{
    "packages": [
      {
        "name": "Scanner Pro",
        "maintainer": "Owen Schwartz",
        "websiteURL": "https://github.com/oschwartz10612/Scanner-Pro-MK3",
        "email": "oschwartz10612@gmail.com",
        "help": {
          "online": "https://github.com/oschwartz10612/Scanner-Pro-MK3"
        },
        "platforms": [
          {
            "name": "Scanner Pro MK3",
            "architecture": "avr",
            "version": "1.0.0",
            "category": "Contributed",
            "help": {
              "online": "https://github.com/oschwartz10612/Scanner-Pro-MK3"
            },
            "url": "https://github.com/oschwartz10612/Scanner-Pro-MK3/raw/master/board/scannerpro.zip",
            "archiveFileName": "scannerpro.zip",
            "checksum": "SHA-256:648b195e378ba7533c48d9028e09d9c5175c1e1aa74ecc57eb21d288b3c24624",
            "size": "5850631",
            "boards": [
              {"name": "Scanner Pro MK3"}
            ],
            "toolsDependencies": [
              {
                "packager": "arduino",
                "name": "avr-gcc",
                "version": "4.8.1-arduino5"
              },
              {
                "packager": "arduino",
                "name": "avrdude",
                "version": "6.0.1-arduino5"
              }
            ]
          }
        ],
        "tools":[]
      }
    ]
  }

Thanks,
Owen

Owen-Schwartz:
Right now my index json file seems to load

That's odd. When I try to install it, I get an error message: "Invalid archive: it must contain a single root folder". As the error message would indicate, the problem is your .zip file doesn't contain a single root folder. Instead, you have a bunch of folders and files directly under the .zip file, which is not supported. Zip your board folder, then update the JSON file with the new checksum and I think it will work. If not, I'm happy to provide more assistance.

Hi,

Thanks for the helpfull and quick reply!

I changed the folder structure a bit and zipped a root folder, changed the checksum, and updated the size, but the same result as before seems to still be the case. Json will download but nothing from there.

I am curious as to how you are seeing that error. That might help me debug.

Here is the updated json:

{
    "packages": [
      {
        "name": "Scanner Pro",
        "maintainer": "Owen Schwartz",
        "websiteURL": "https://github.com/oschwartz10612/Scanner-Pro-MK3",
        "email": "oschwartz10612@gmail.com",
        "help": {
          "online": "https://github.com/oschwartz10612/Scanner-Pro-MK3"
        },
        "platforms": [
          {
            "name": "Scanner Pro MK3",
            "architecture": "avr",
            "version": "1.0.0",
            "category": "Contributed",
            "help": {
              "online": "https://github.com/oschwartz10612/Scanner-Pro-MK3"
            },
            "url": "https://github.com/oschwartz10612/Scanner-Pro-MK3/raw/master/arduino_board/scanner-pro.zip",
            "archiveFileName": "scanner-pro.zip",
            "checksum": "SHA-256:06cad7d01ddd6100da3a2740f7593e1421bf79f092c999ab8f90a1ea9796ae2f",
            "size": "5880718",
            "boards": [
              {"name": "Scanner Pro MK3"}
            ],
            "toolsDependencies": [
              {
                "packager": "arduino",
                "name": "avr-gcc",
                "version": "4.8.1-arduino5"
              },
              {
                "packager": "arduino",
                "name": "avrdude",
                "version": "6.0.1-arduino5"
              }
            ]
          }
        ],
        "tools":[]
      }
    ]
  }

Thanks again,
Owen

You're getting close, but you still have that nightmare __MACOSX that macOS puts in the .zip files. You might not even be able to see it by default on macOS because I think they try to hide it from you. You can learn how to create .zip files without this folder here:

Owen-Schwartz:
I am curious as to how you are seeing that error.

It's shown at the bottom of Boards Manager after the installation fails:

After you close Boards Manager, you can see a more detailed error output in the Arduino IDE's console window:

Invalid archive: it must contain a single root folder while file __MACOSX/ is outside scanner-pro/
java.lang.RuntimeException: java.io.IOException: Invalid archive: it must contain a single root folder while file __MACOSX/ is outside scanner-pro/
 at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:175)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Invalid archive: it must contain a single root folder while file __MACOSX/ is outside scanner-pro/
 at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:180)
 at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:82)
 at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:163)
 at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
 ... 1 more

Hi,

Thank you! Everything seems to be working as expected! I appreciate the help!

Owen