Skip to content

stdout from arduino-fwuploader is not logged #1497

Open
@per1234

Description

@per1234

Describe the problem

The non-GUI aspects of the Arduino IDE's "WiFi101 / WiFiNINA Firmware Updater" and "Upload SSL Root Certificates" features are provided by a command line tool named "Arduino Firmware Uploader" (executable name arduino-fwuploader).

Only the most basic feedback is provided in the IDE's GUI about the progress of updating firmware or uploading a certificate. In the event the process fails, the logs can be checked for the output of the tool, which should provide more information about the problem.

🐛 Only the stderr stream from arduino-fwuploader is printed in the logs. The stdout stream may contain information essential for troubleshooting the failure.

To reproduce

Equipment

Steps

  1. Connect the Arduino board to your computer using a USB cable.
  2. Run the following command from the root of the Arduino IDE installation folder:
    ./resources/app/node_modules/arduino-ide-extension/build/arduino-cli monitor --port <serial port>
    
    (where <serial port> is replaced by the port address of the board)
    This will not be possible if using the Linux AppImage package of the IDE. You can open the port in a standalone installation of Arduino CLI, Arduino IDE 1.x Serial Monitor, or any other application.
  3. Start Arduino IDE 2.x from the command line.
  4. Select Tools > WiFi101 / WiFiNINA Firmware Updater from the Arduino IDE menus.
  5. Select the board from the "Select Board" menu.
  6. Click the Check Updates button.
  7. Click the INSTALL button.
  8. Wait for the firmware installation process to fail.
  9. Open the window of the command line terminal you started the IDE from.
    🐛 The arduino-fwuploader output shown in the logs is not very helpful:
    fwuploader ERROR Error: Error executing "C:\ide 2\tip\130-8783952\resources\app\node_modules\arduino-ide-extension\build\arduino-fwuploader.exe" firmware flash --fqbn    arduino:mbed_nano:nanorp2040connect --address COM8 --module [email protected]: error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
    error during sketch flashing: exit status 1
        at ChildProcess.<anonymous> (C:\ide 2\tip\130-8783952\resources\app\node_modules\arduino-ide-extension\lib\node\exec-util.js:53:31)
        at ChildProcess.emit (node:events:394:28)
        at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
    
  10. Run the arduino-fwuploader command shown in the logs from a command line terminal.
    🙂 The output contains valuable information about the cause of the failure:
    $ "C:/ide 2/tip/130-8783952/resources/app/node_modules/arduino-ide-extension/build/arduino-fwuploader.exe" firmware flash --fqbn arduino:mbed_nano:nanorp2040connect --address COM8 --module [email protected]
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    TOUCH: error during reset: opening port at 1200bps: Serial port busy
    rp2040load 1.0.1 - compiled with go1.15.8
    .....................
    error during sketch flashing: exit status 1
    

Expected behavior

The logs contain the combined stdout and stderr streams from arduino-fwuploader.

Arduino IDE version

2.0.0-snapshot-8783952

Operating system

Windows

Operating system version

10

Additional context

I used "Tools > WiFi101 / WiFiNINA Firmware Updater" for the demo, but the same problem also occurs with the "Upload SSL Root Certificates" feature.

Issue checklist

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: 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