Error pushing balenasound app using CLI

I’m sorry if it might be a noob question. I’m new to the CLI.

I try to push balenasound app using CLI on Windows 10.
I installed the CLI, run the commands from the balena-sound-master directory.
Login goes fine and then I get an error on the push command:

PS C:\balena-sound-master> balena push balena-sound --debug
[debug] new argv=[C:\Program Files\balena-cli\client\bin\node.exe,C:\Program Files\balena-cli\client\bin\run,push,balena-sound] length=4
[Debug] Using build source directory: .
[Debug] Pushing to cloud for application: balena-sound
Cannot read property ‘handle’ of undefined

TypeError: Cannot read property ‘handle’ of undefined
at PushCmd.pushToCloud (C:\Program Files\balena-cli\client\build\commands\push.js:89:48)
at process._tickCallback (internal/process/next_tick.js:68:7)

Any idea what I do wrong?

hi there,
once logged in, try running balena appsto see if your balenaCloud applications are listed. if yes then there is no problem with the connection and there you can see if the name of the application is correct. I you have a new error message that can give you more clues.

how did you install the CLI? and which version are you using? balena -v

one more thing, have you created the application balena-sound in the dashboard?

BalenaCLI v12.37.0
I installed it running the .exe installation file.

I didn’t create any application. Once I created the application using the web and then tried to push the app, I had an error on duplicate name (or some error similar to that, I don’t remember the exact term).

When I list the apps I can see my list of apps (just have one at the moment for testing).

From what I understand you have only 1 app in your Balena account that isn’t the balena-sound application?

Before you can push from the CLI to your device you need to have to create an application in the Balena dashboard. See Step 2 in the “Provision your Device” chapter here: https://sound.balenalabs.io/docs/

Maybe I have some misunderstanding of the process.

I tried to have multi-room devices. I created balena-sound using the dashboard but somehow I couldn’t see my second device on the dashboard (my first one was Pi4, the second one was Pi3). I assumed that I didn’t create the app to support Pi 0 so it didn’t support the Pi3. I couldn’t find a way creating the balena-sound using the dashboard and to choose the app architecture like when creating an empty app (I could choose the device type just when adding a device).

After this fail attempt, I tried to use the CLI in order to do that and check if creating the app using the CLI, will make it smoother to add two different devices to the app.

I hope I was clear enough with the process I had.

I think I start to understand my mistake.
I have to create an app through the dashboard and to install the balensOS to a device. Only after I did that, I have to push the balenasound to the device. Am I right?

How do I know which devices it will push it when I have several apps on the dashboard?

If the pi3 doesn’t show up on the dashboard it’s not connected to the internet properly. Is it connected by Ethernet or Wifi?

Our tutorial here suggest creating an app with the Pi Zero device type to maximize using different devices: https://www.balena.io/blog/diy-raspberry-pi-multi-room-audio-system/

You run balena push <application name> and that will send a new version of the app to every device flashed with that application. So if the Pi3 and Pi4 are running on separate applications you should run the balena push command twice

I am aware of this recommendation. The problem is, once I create an app using the balenasound deploy app (I don’t know how to call this link that creates balenasound app automatically), There is no way to choose the type of device.

If you click the Deploy with Balena button again after you already created a first balena sound application, you can click the blue “create new application instead” link in the top left. That will give you the “Create and deploy to application” modal instead which allows setting the device type and name.

That’s the tip of the century. That is exactly what I was looking for.

BUT… still, I add an RPi4 device and everything goes smoothly. When I add RPi3, I can’t see it on the dashboard.

Hi

  • Which device type did you choose for your new created application?
  • How are you provisioning the pi3? did you download another image from the dashboard for your new application?

For the first device, I chose RPi4, downloaded the image, and flashed it.
For the second device, I chose RPi3 (no the 64-bit version), downloaded the image, and flashed it.

I use the same application (balena-sound) from the dashboard, I just choose the “Add device” option.

I found the issue.
I use RPi 3b+, that as far as I read, should be able to connect to 5Hz Wi-Fi with no issue.
I connected an external Wi-Fi dongle and now I can see it was connected and I’m able to see it in the dashboard.
Seems like the Pi 3b+ is not able to connect to the 5Hz Wi-Fi as well with the build-in Wi-Fi chip.

Hi, Oggioo, Do you have another RPi 3b+ that you can test to see if this is a hardware issue perhaps? If not, can you try connecting to the internet with a plain Raspbian OS image?
Another potential diagnostic step might be to move the RPi 3b+ closer to the router without the dongle to see if the RPi 3 network card isn’t powerful enough to reach the router, even though the wifi dongle is.

Hi Oggioo, In addition to Zane’s suggestions, I have a request: That CLI error you initially posted should not occur - would you be able to enable support access for these application so I could investigate that please? To do that, use the “Actions” tab on the left, and then the “Grant support access” button (and share the application ids with me). Thank you, Scott

Sure. Did it. ID 1780302

Hi Oggioo, I am wondering if the issue is your wifi network. If it’s on the 5ghz band it won’t play with the pi3s. I am just saying this because you said pi4 works and pi3s work with a wifi dongle.

A file has been uploaded using Jellyfish: https://jel.ly.fish/80a3a1e7-3b3e-45d2-8837-5fb47065f637