Hello, I am following BalenaSound project and can’t seem to push balena-sound-master files to my device.
After successfully logging in with balena-cli, unzipping balena-sound-master and cd’ing into its folder, I use :
balena push application-name
After adding debug 1 , this is the output:
Debug: original argv0="balena" argv=[/home/mal/balena-cli/balena,/snapshot/versioned-source/bin/balena,push,XXXXXXXXXXX] length=4
[debug] Using . as build source
[debug] Connecting to builder at https://builder.balena-cloud.com/v3/build?owner=gh_XXXXXXX&app=XXXXXXXXX&dockerfilePath=&emulated=false&nocache=false&headless=false
| Uploading source package to balena cloud[debug] received HTTP 200 OK
[debug] handling message: {"type":"metadata","resource":"buildLogId","value":1020819}
[debug] handling message: {"message":"\u001b[31m[Error]\u001b[39m An error occured: Cannot set headers after they are sent to the client","isError":true}
[Error] An error occured: Cannot set headers after they are sent to the client
[debug] handling message: {"message":"\u001b[31m[Error]\u001b[39m Not deploying release.","isError":true}
[Error] Not deploying release.
RemoteBuildFailedError: Remote build failed
at Bluebird.then (/snapshot/versioned-source/build/utils/remote-build.js:56:23)
at tryCatcher (/snapshot/versioned-source/node_modules/bluebird/js/release/util.js:16:23)
at Promise.module.exports.Promise._settlePromiseFromHandler (/snapshot/versioned-source/node_modules/bluebird/js/release/promise.js:517:31)
at Promise.module.exports.Promise._settlePromise (/snapshot/versioned-source/node_modules/bluebird/js/release/promise.js:574:18)
at Promise.module.exports.Promise._settlePromise0 (/snapshot/versioned-source/node_modules/bluebird/js/release/promise.js:619:10)
at Promise.module.exports.Promise._settlePromises (/snapshot/versioned-source/node_modules/bluebird/js/release/promise.js:699:18)
at _drainQueueStep (/snapshot/versioned-source/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/snapshot/versioned-source/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/snapshot/versioned-source/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues [as _onImmediate] (/snapshot/versioned-source/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:120:23)
If you need help, don't hesitate in contacting our support forums at
https://forums.balena.io
For bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/
Note I edited out possibly sensible info as user and device name.
Cool, thanks for the info. I will try reproduce on my side. Can you give me some detail about your laptop OS, the CLI version you are using and how you installed the CLI?
May I ask when may it be that you people take a look at it and answer? Of course this is a public tutorial and I am not expecting (free) premium support, just asking.
I am actually working on reproducing it now, so we will see if I hit the same issue and then go from there. I assume this is the first time you are pushing code to balena right?
I’ve just reached balena because of this project, now that it is running (quite well ) I am wondering about balena in general.
I haven’t used Docker yet. I am wondering, can I actually install regular linux packages/apps into a Docker container and run them alongside this bluetooth receiver project via SSH?
I’ve ssh’ed into the rpi from the dashboard, apt-get is not there.
Feel free to direct me to docs or make me open a new thread.
Thanks
Hi @mal , I would recommend starting from https://www.balena.io/docs/learn/getting-started/raspberrypi3/nodejs/ . You can install regular package in the container, to install these you would add them to your Dockerfile.template (think of it a recipe that builds the userspace) . You can also test install from ssh in the container but i think you would need to run apt-get update && apt-get install wget , but note that anything installed via SSH at run time will not persist or be saved to the image. you need to install things via Dockerfile to make them reproducible and persistent.
FYI, with regard to the issue with CLI version 11.7.5 (which required you to install v11.7.4), I understand the issue was actually with the backend (image builders) rather than the CLI, and it has been fixed. Using the latest CLI version should now be OK.