Skip to content

Serial log can be truncated at end of wokwi-cli run #38

@egnor

Description

@egnor

System info

% uname -a
Linux roc 6.17.0-6-generic #6-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct  7 13:34:17 UTC 2025 x86_64 GNU/Linux
% arduino-cli version
arduino-cli  Version: 1.3.1 Commit: 08ff7e2b Date: 2025-08-28T13:51:45Z
% wokwi-cli --version
Wokwi CLI v0.19.0 (95ac9a33d1df)

Reproduction steps

  1. install arduino-cli and wokwi-cli per above
  2. unzip the test sketch: wokwi_bug.zip
  3. cd wokwi_bug
  4. arduino-cli compile --export-binaries
  5. wokwi-cli --scenario scenario.yaml --serial-log-file serial.txt && tail serial.txt

Expected result

serial.txt contains the whole serial log as printed on stdout, including 100 nana- followed by batman!

% tail serial.txt
nana-
nana-
nana-
nana-
nana-
nana-
nana-
nana-
nana-
batman

Actual result

NOTE this often takes multiple tries to reproduce!! Re-run the last command as needed. When I ran it 10 times, I had 5 successes and 5 failures. On failure the actual amount of output varies.

% tail serial.txt
nana-
nana-
nana-
nana-
nana-
nana-
nana-
nana-
nana-
nan

Discussion

The full serial output is always printed to stdout, it just doesn't make it into the log file for some reason. Feels like the program exits before fully writing the serial log file?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions