Skip to content

balena build with podman-desktop fails to pull source images #2924

Open

Description

@msherman64

I was checking if it was possible to use the balena-cli with podman-desktop, and its docker integration.

However, when running balena build or balena deploy with any combination of fleets and dockerfiles, I get an Image manifest data unavailable error. It seems that Podman is stricter about the query parameters it expects, and is error-ing on:
(HTTP code 400) unexpected - failed to parse query parameter 'labels': "": unexpected end of JSON input

Is it possible that balena-cli is sending the query key labels with an empty value when pulling images?

The dockerfile to reproduce is:

FROM ubuntu:24.04

And the output of build --debug is below.

❯ balena build  -f chi-edge-dev2 --debug
[debug] new argv=[/opt/homebrew/Cellar/node@20/20.19.0_1/bin/node,/opt/homebrew/bin/balena,build,-f,chi-edge-dev2] length=5
[debug] Deprecation check: 0.03644 days since last npm registry query for next major version release date.
[debug] Will not query the registry again until at least 7 days have passed.
[debug] Event tracking error: Timeout awaiting 'response' for 0ms
[Debug]   Parsing input...
[Debug]   Loading project...
[Debug]   Resolving project...
[Info]    No "docker-compose.yml" file found at "/Users/shermanm/Developer/scratch/chi-edge-dev2"
[Info]    Creating default composition with source: "/Users/shermanm/Developer/scratch/chi-edge-dev2"
[Debug]   Creating project...
[Build]   Building services...
[Build]   main Preparing...
[Info]    Building for aarch64/raspberrypi4-64
[Debug]   Found build tasks:
[Debug]       main: build [.]
[Debug]   Resolving services with [raspberrypi4-64|aarch64]
[Debug]   Found project types:
[Debug]       main: Standard Dockerfile
[Debug]   Prepared tasks; building...
[Debug]   main: Image manifest data unavailable for ubuntu:24.04
[Build]   Built 1 service in 0:00
[Error]   Build failed.
(HTTP code 400) unexpected - failed to parse query parameter 'labels': "": unexpected end of JSON input

Error: (HTTP code 400) unexpected - failed to parse query parameter 'labels': "": unexpected end of JSON input
    at /opt/homebrew/Cellar/balena-cli/21.1.0/libexec/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:383:17
    at handler (/opt/homebrew/Cellar/balena-cli/21.1.0/libexec/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:426:11)
    at IncomingMessage.<anonymous> (/opt/homebrew/Cellar/balena-cli/21.1.0/libexec/lib/node_modules/balena-cli/node_modules/docker-modem/lib/modem.js:415:9)
    at IncomingMessage.emit (node:events:536:35)
    at IncomingMessage.emit (node:domain:489:12)
    at endReadableNT (node:internal/streams/readable:1698:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting


[debug] Timeout reporting error to sentry.io

Activity

  1. kb2ma commented on Apr 3, 2025

    @kb2ma
    Contributor

    @pipex Is this another instance of the array handling issue introduced with docker-modem v5.0.6?

  2. pipex commented on Apr 3, 2025

    @pipex
    Contributor

    @kb2ma Not sure, looking at the serialization fix it doesn't seem passing an empty labels would have worked before. I suspect is engine implementation dependent because I've also seen this issue with colima, see balena-io-modules/balena-compose#60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions