Error Building Release Only for Existing Applications

I am the creator of this repository: GitHub - ShiromMakkad/LedFx-balenaSound: LedFx and balenaSound With One Click!

The repository works great, but I can only deploy it when creating a new application. Whenever I try to use balena push or use the deploy to Balena button, I get the following error:

[Success]           Successfully built service multiroom-client
[Success]           Successfully built service bluetooth
[Success]           Successfully built service upnp
[Success]           Successfully built service spotify
[Success]           Successfully built service audio
[Success]           Successfully built service airplay
[Success]           Successfully built service multiroom-server
[Success]           Successfully built service sound-supervisor
[Info]              Uploading images
[Success]           Successfully uploaded images
[Error]             Error:: It is necessary that each release that has a release version1 and has a status that is equal to "success" and is not invalidated, belongs to an application that owns exactly one release that has a release version2 that is equal to the release version1 and has a status that is equal to "success" and is not invalidated.
[Info]              Built on arm05
[Success]           Release successfully created!
[Info]              Release: a56d6c4b4e5f521ab729b3e7328f5135 (id: 1732814)
[Info]              Build finished in 3 minutes, 49 seconds

As you can see, it properly builds the release except for one error. Then it just doesn’t upload them. If I delete the application and rebuild it, everything works. These issues only started happening after I upgraded to a Raspberry Pi 4, I never had this problem on my 3B+. If I add my device to the repository before the first build, it fails too.

I believe this has something to do with my LedFx docker container not supporting linux/arm/v8, but it does support linux/arm/v7. Unfortunately, adding v8 support isn’t possible because Cython isn’t available for v8. Still, the image runs perfectly on a Pi 4, but Balena’s platform seems to just throw out the image instead of running it on a Pi 4.

Having to reflash or move all my devices for even minor changes is INCREDIBLY frustrating. These issues have persisted for weeks.

How can I fix this?

Hi,

In your case, I think you should create the Dockerfile.<device-type> file for all aarch64 devices supported by your device and use the base image for RPI 3B+ in those files. So our builders won’t use RPI 4 base images (which are aarch64) and you build will pass.

You can find more details about project resolutions in our docs here Deploy to your fleet - Balena Documentation.

My impression was that these files were only used when building an image. My image is built and on DockerHub. Where would I put these files? I don’t want to build shirom/ledfx in my build since I have to maintain it in two separate places. Also, it can take over 2 hours to build.

Your image on DockerHub is multi-arch and each of the variants can be targeted using a specific sha256 digest (e.g. armv7):

services:
  ledfx:
    image: shirom/ledfx@sha256:dbcb1e03178d21678ca31bbdd4392a01094662ef6e4cc132cfb2d4c62295bf17
...

I am not sure if this helps, but you could keep two different docker-compose files, one for each arch and build/deploy each one to the correct application separately.