Skip to content

Confusing error when platform installation fails due to unavailable tool #2932

Closed
@per1234

Description

@per1234

Describe the problem

The tool dependencies-,toolsDependencies,-%3A%20the%20tools%20needed) of a platform may be specified in a package index. Arduino CLI will install these tools along with the platform.

Since they are typically executable binaries, a separate tool distribution package must be provided for each host architecture. If a tool dependency is not available for the host architecture, the core install command fails with an error message of the following form:

Error during install: Platform '<platform ID>' not found: platform is not available for your OS

(where <platform ID> is the ID of the platform the user is attempting to install)

🐛 The "Platform '<platform ID>' not found" part of the error message is misleading because the platform was indeed found. This may lead the user to think the failure was caused by an error they made either in providing the package index URL, or the platform ID.

To reproduce

Setup environment

$ arduino-cli version

arduino-cli  Version: git-snapshot Commit: 2947cfb71 Date: 2025-06-10T23:45:14Z

$ echo '
{
  "packages": [
    {
      "name": "foovendor",
      "maintainer": "Foo Maintainer",
      "websiteURL": "https://example.com/",
      "email": "foo@example.com",
      "platforms": [
        {
          "name": "Foo Boards",
          "architecture": "fooarchitecture",
          "version": "0.0.1",
          "category": "Contributed",
          "url": "https://downloads.arduino.cc/cores/staging/avr-1.8.6.tar.bz2",
          "archiveFileName": "avr-1.8.6.tar.bz2",
          "checksum": "SHA-256:ff1d17274b5a952f172074bd36c3924336baefded0232e10982f8999c2f7c3b6",
          "size": "7127080",
          "help": {
            "online": "https://example.com"
          },
          "boards": [],
          "toolsDependencies": [
            {
              "packager": "foovendor",
              "name": "footool",
              "version": "0.0.1"
            }
          ]
        }
      ],
      "tools": [
        {
          "name": "footool",
          "version": "0.0.1",
          "systems": []
        }
      ]
    }
  ]
}
' > "/tmp/package_foo_index.json"

Demo

$ arduino-cli core install --additional-urls file:///tmp/package_foo_index.json foovendor:fooarchitecture

Error during install: Platform 'foovendor:fooarchitecture' not found: platform is not available for your OS

Expected behavior

The error message does not contain misleading content.

This can be accomplished by simply removing the "not found" from the "Platform '<platform ID>' not found" part of the error message:

Error during install: Platform '<platform ID>': platform is not available for your OS

Arduino CLI version

2947cfb

Operating system

Windows

Operating system version

11

Additional context

Originally reported by @Adrivin at https://forum.arduino.cc/t/problem-when-adding-a-custom-board-in-board-manager/1387975

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    conclusion: resolvedIssue was resolvedtopic: codeRelated to content of the project itselftopic: package-managementRelated to the packaging and managing of the platform/librariestype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions