balena-io / balena-cli

The official balena CLI tool.
Apache License 2.0
452 stars 138 forks source link

Balena push build fails quietly on node13 but only for Multi-container builds #1733

Open StefKors opened 4 years ago

StefKors commented 4 years ago

Problem: Balena push does not update the device, livepush was not starting or streaming logs

After a lot of debugging with colleagues, we got it running by using a local version of the balena-cli and rebuilding the cli while on node12. Later I confirmed that globally installing with node 12 also works.

The problem appears with multi-container builds on Node v13, with single container builds on Node v13 it doesn't have any issues.

I've attached the logs and steps for a number of scenarios

Multicontainer

Node v13

1) nvm use 13 2) global install balena-cli 3) balena push 4) fails quietly

Node v12

1) nvm use 12 2) global install balena-cli 3) balena push 4) success

(nvm) Build /w Node v12, Run /w Node v13

Note: nvm installs packages separated on node version. After running nvm use 13 it will use the balena-cli version built with Node v13 1) nvm use 12 2) global install balena-cli 3) nvm use 13 4) balena push 5) fails quietly

(local bin) Build /w Node v12, Run /w Node v13

1) nvm use 12 2) cd balena-cli 3) npm ci 4) npm run build 5) cd ../balena-on-balena 6) nvm use 13 7) ../balena-cli/bin/balena push 8) fails quietly

Single container

Using the balena-node-hello-world example project.

Node v13 NUC

1) nvm use 13 2) npm install balena-cli 3) balena push 4) success

Node v13 PI

Device: PI3 HOST OS VERSION balenaOS 2.47.0+rev1 SUPERVISOR VERSION: 10.6.27

1) nvm use 13 2) npm install balena-cli 3) balena push 4) success

References

All logs from the steps above are available here: https://gist.github.com/StefKors/0ad194f713473476cfa547d9f5ca41df This is the flowdock thread in devenv: https://www.flowdock.com/app/rulemotion/resin-starters/threads/k2pOfGmtmXgndmATXJ0DDgSHms3

pdcastro commented 4 years ago

Preliminary investigation suggests that the sudden exit / crash (?) with Node 13 happens in the resin-multibuild package. Deeper investigation required. (cc: @CameronDiver)

CameronDiver commented 4 years ago

Yeah it seemed like that to me, I didn't see where though after taking a quick look.