balena push / logs (local mode): multi-line prints are not shown

Hi,
I’ve been chasing this bug for quite a while now and finally found the culprit.
It seems that, when using local mode, any multi-line prints to the console will not be sent back using either balena push or balena logs.
I put together the simplest demo I could think of in this repository: GitHub - edorgeville/balena-console-logs: balena push / logs (local mode): multi-line prints are not shown

To reproduce, set a device to local mode and balena push to it. Changing the value of the linesPerLoop variable on line #2 to 2 or more will stop any logs from getting reported back. For comparison, run node index.js or nodemon to run the app locally.
Here is a recording of the results (click on the image to go to the source, the forum system bot seems to replace the GIF with a JPG automatically):
balena-console-logs

Additional information:

  • balena-cli version: 12.38.7
  • Device type: rapsberry pi 4
  • balenaOS version: raspberrypi4-64-2.65.0+rev1-dev-v12.2.11

Thanks in advance for your help.
Erwan

Bumping my own thread, can anyone on the balena team help me on this? Thanks!

Hey Erwan, I’ll open an issue on your behalf and the CLI team will have a look when they have the chance. Thanks for reporting this, and apologies for not getting back to you sooner.

1 Like

Hi @sradevski, any news?

Hey, thanks for all your work with creating a replication for this issue! We have issue When using local mode, any multi-line prints to the console will not be sent back using either balena push or balena logs. · Issue #2185 · balena-io/balena-cli · GitHub opened against this, but we’re still working on a fix. We’ve got your thread and this issue linked, so once we have an update, someone will come back and let you know.

1 Like