Skip to content

ERROR detecting boards: error getting board info from Arduino Cloud #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mkovalevski opened this issue Jul 29, 2020 · 6 comments · Fixed by #1982
Closed

ERROR detecting boards: error getting board info from Arduino Cloud #880

mkovalevski opened this issue Jul 29, 2020 · 6 comments · Fixed by #1982
Assignees
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@mkovalevski
Copy link

mkovalevski commented Jul 29, 2020

I run arduino-cli in my React app and when I tested app without network i got this message:

Error: Command failed: .\extra\arduino-cli.exe board list --format json
Error detecting boards: error getting board info from Arduino Cloud

I want my app work without network. How can I download board info and work with it offline?

@ubidefeo

This comment has been minimized.

@mkovalevski

This comment has been minimized.

@ubidefeo

This comment has been minimized.

@rsora

This comment has been minimized.

@rsora rsora added the status: waiting for information More information must be provided before work can proceed label Aug 11, 2020
@github-actions github-actions bot added the stale label Sep 11, 2020
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project and removed status: waiting for information More information must be provided before work can proceed labels Jan 27, 2022
@per1234
Copy link
Contributor

per1234 commented Jan 27, 2022

I have reopened this because the bug is not resolved.

To reproduce

  1. Disconnect your computer from the Internet.
  2. Run the command arduino-cli board list

The command fails and no ports are listed:

$ arduino-cli version
arduino-cli.exe  Version: nightly-20220125 Commit: 23e7cb5 Date: 2022-01-25T01:29:37Z

$ arduino-cli board list
Error detecting boards: Error getting board info from Arduino Cloud

$ echo $?
5

It is reasonable to print a warning that it could not collect the supplemental convenience information by querying Arduino's online database. However, there is no reason this should cause the command to fail to list the ports and the board identifications from the data of the installed platforms.

@ubidefeo
Copy link

@per1234 , @cmaglie
Upon further examination, I have noticed the following:
if a user has multiple boards connected, one of which with a resolvable fqbn via means of installed boards.txt, and the other which cannot be resolved unless the CLI is able to query the service, even the normally recognised one will be skipped and CLI will generate an error and even break the JSON output.

I'll be analyzing the following scenario

Command executed: arduino-cli board list --format json

Internet connection ACTIVE

Single board

  • Nano RP2040 Connect
[
  {
    "matching_boards": [
      {
        "name": "Arduino Nano RP2040 Connect",
        "fqbn": "arduino:mbed_nano:nanorp2040connect"
      }
    ],
    "port": {
      "address": "/dev/cu.usbmodem2101",
      "label": "/dev/cu.usbmodem2101",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x005E",
        "serialNumber": "416523501C9D8090",
        "vid": "0x2341"
      }
    }
  }
]

Single board

  • ESP32 module, VID:PID not defined as a pair in a board
[
  {
    "matching_boards": [
      {
        "name": "ESP32S2 Native USB",
        "fqbn": "esp32:esp32:esp32s2usb"
      }
    ],
    "port": {
      "address": "/dev/cu.usbmodem03",
      "label": "/dev/cu.usbmodem03",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x0003",
        "serialNumber": "0",
        "vid": "0x303A"
      }
    }
  }
]

Two boards

  • Nano RP2040 Connect
  • ESP32 module, VID:PID not defined as a pair in a board
[
  {
    "matching_boards": [
      {
        "name": "Arduino Nano RP2040 Connect",
        "fqbn": "arduino:mbed_nano:nanorp2040connect"
      }
    ],
    "port": {
      "address": "/dev/cu.usbmodem2101",
      "label": "/dev/cu.usbmodem2101",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x005E",
        "serialNumber": "416523501C9D8090",
        "vid": "0x2341"
      }
    }
  },
  {
    "matching_boards": [
      {
        "name": "ESP32S2 Native USB",
        "fqbn": "esp32:esp32:esp32s2usb"
      }
    ],
    "port": {
      "address": "/dev/cu.usbmodem03",
      "label": "/dev/cu.usbmodem03",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x0003",
        "serialNumber": "0",
        "vid": "0x303A"
      }
    }
  }
]

Internet connection INACTIVE

Single board

  • Nano RP2040 Connect
[
  {
    "matching_boards": [
      {
        "name": "Arduino Nano RP2040 Connect",
        "fqbn": "arduino:mbed_nano:nanorp2040connect"
      }
    ],
    "port": {
      "address": "/dev/cu.usbmodem2101",
      "label": "/dev/cu.usbmodem2101",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x005E",
        "serialNumber": "416523501C9D8090",
        "vid": "0x2341"
      }
    }
  }
]

Single board

  • ESP32 module, VID:PID not defined as a pair in a board
Error detecting boards: Error getting board info from Arduino Cloud
null

Two boards

  • Nano RP2040 Connect
  • ESP32 module, VID:PID not defined as a pair in a board
Error detecting boards: Error getting board info from Arduino Cloud
null

Besides the Nano RP2040 Connect not being recognised when an unrecognisable board is part of the set,
the JSON formatting is now broken, rendering any chance of parsing impossible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants