First attempt to use balenaOS and it does not look good. Any ideas what may be wrong?
Thanks!
Installed balena CLI on MacOS (High Sierra)
% balena version --all
balena-cli version "12.44.1"
Node.js version "12.20.0"
Downloaded balenaOS for RaspberryPi3 (balena-cloud-raspberrypi3-64-2.65.0+rev1-dev-v12.2.11.img )
Run balena local configure as in the documentation:
% sudo balena local configure ./balena-cloud-raspberrypi3-64-2.65.0+rev1-dev-v12.2.11.img
[debug] new argv=[/usr/local/lib/balena-cli/bin/node,/usr/local/lib/balena-cli/bin/run,local:configure,./balena-cloud-raspberrypi3-64-2.65.0+rev1-dev-v12.2.11.img] length=4
ERR_INVALID_ARG_TYPE: The "original" argument must be of type function. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function. Received undefined
at Object.promisify (internal/util.js:279:11)
at /usr/local/lib/balena-cli/build/commands/local/configure.js:178:37
at runInFat (/usr/local/lib/balena-cli/node_modules/balena-image-fs/build/index.js:62:18)
at async tryInteract (/usr/local/lib/balena-cli/node_modules/balena-image-fs/build/index.js:81:16)
at async diskInteract (/usr/local/lib/balena-cli/node_modules/balena-image-fs/build/index.js:109:12)
at async /usr/local/lib/balena-cli/node_modules/balena-image-fs/build/index.js:126:20
at async Object.withOpenFile (/usr/local/lib/balena-cli/node_modules/file-disk/build/index.js:106:16)
at async Object.interact (/usr/local/lib/balena-cli/node_modules/balena-image-fs/build/index.js:124:16)
at async LocalConfigureCmd.prepareConnectionFile (/usr/local/lib/balena-cli/build/commands/local/configure.js:177:13)
at async LocalConfigureCmd.run (/usr/local/lib/balena-cli/build/commands/local/configure.js:92:37)
at async LocalConfigureCmd._run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
at async Config.runCommand (/usr/local/lib/balena-cli/node_modules/@oclif/config/lib/config.js:175:24)
at async CustomMain.run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/main.js:27:9)
at async CustomMain._run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
at async Promise.all (index 1)
at async oclifRun (/usr/local/lib/balena-cli/build/app.js:75:5)
What installation method did you use to install the CLI? Could you try mounting the image (double click on the .img file) and see if the image can be mounted and you see a resin-boot volume with a system-connections directory?
Could you also please retry the operation using the --debug flag? As in
sudo balena local configure --debug balena-cloud-raspberrypi3-64-2.65.0+rev1-dev-v12.2.11.img
Actually I could just replicate this with one of the unmanaged images from the balenaOS website. This looks like a bug in the CLI. Let me try to pinpoint the issue and I’ll try to provide a workaround
Thanks for reporting this, this is indeed a bug in the CLI, I have created an issue on the balena-cli repository and linked it to this forum ticket.
You can fix the problem for the moment by mounting the image (double-click on the .img on Finder) and wait for the resin-boot volume to appear. There you can make a copy of the resin-sample.ignore file under the system-connections folder and rename it to resin-wifi. You can then eject the image and retry running the command
sudo balena local configure balena-cloud-raspberrypi3-64-2.65.0+rev1-dev-v12.2.11.img
This should show you a prompt to configure your wifi credentials. You can achieve the same by directly editing the resin-wifi file if you want.
Hey @mparris, could you please provide the full filename of the image you are attempting to configure, and the result of the balena local configure command when --debug is provided as Felipe demonstrated above?
I just want to make sure we are looking at the same issue, and not something else.
balena local configure “balena-cloud-raspberrypi4-64-2.73.1+rev1-dev-v12.4.6.img” --debug
[debug] new argv=[C:\Program Files\balena-cli\client\bin\node.exe,C:\Program Files\balena-cli\client\bin\run,local:configure,balena-cloud-raspberrypi4-64-2.73.1+rev1-dev-v12.4.6.img] length=4
ERR_INVALID_ARG_TYPE: The “original” argument must be of type function. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The “original” argument must be of type function. Received undefined
at Object.promisify (internal/util.js:279:11)
at C:\Program Files\balena-cli\client\build\commands\local\configure.js:178:37
at runInFat (C:\Program Files\balena-cli\client\node_modules\balena-image-fs\build\index.js:62:18)
at async tryInteract (C:\Program Files\balena-cli\client\node_modules\balena-image-fs\build\index.js:81:16)
at async diskInteract (C:\Program Files\balena-cli\client\node_modules\balena-image-fs\build\index.js:109:12)
at async C:\Program Files\balena-cli\client\node_modules\balena-image-fs\build\index.js:126:20
at async Object.withOpenFile (C:\Program Files\balena-cli\client\node_modules\file-disk\build\index.js:106:16)
at async Object.interact (C:\Program Files\balena-cli\client\node_modules\balena-image-fs\build\index.js:124:16)
at async LocalConfigureCmd.prepareConnectionFile (C:\Program Files\balena-cli\client\build\commands\local\configure.js:177:13)
at async LocalConfigureCmd.run (C:\Program Files\balena-cli\client\build\commands\local\configure.js:92:37)
at async LocalConfigureCmd._run (C:\Program Files\balena-cli\client\node_modules@oclif\command\lib\command.js:43:20)
at async Config.runCommand (C:\Program Files\balena-cli\client\node_modules@oclif\config\lib\config.js:175:24)
at async CustomMain.run (C:\Program Files\balena-cli\client\node_modules@oclif\command\lib\main.js:27:9)
at async CustomMain._run (C:\Program Files\balena-cli\client\node_modules@oclif\command\lib\command.js:43:20)
at async Promise.all (index 1)
at async oclifRun (C:\Program Files\balena-cli\client\build\app.js:75:5)
Thank you @mparris, I can confirm that is the same issue and I’ve been able to reproduce it as well. Could you try installing v12.43.2 and trying again?
I’m going to make sure the GitHub issue that Felipe opened receives some attention soon as it’s quite easy to reproduce.