#Error: unexpected end of JSON input

1 messages · Page 1 of 1 (latest)

topaz drum
#

Hello, I'm using Dagger CLI to execute the below query but I got the error message Error: unexpected end of JSON input. What's wrong ?

dagger query <<QUERY
{
  container(id: "$container_id") {
    publish(address: "$image_name")
  }
}
QUERY
gilded kite
#

👋 are you using the latest CLI? this seems to work for me:

130|marcos:tmp/test (⎈ |kind-kind)$ dagger  query -s <<QUERY
{
  container(id: "$container_id") {
    publish(address: "$image_name")
  }
}
QUERY

Connected to engine f338a5db9507
Error: build: failed to solve: failed to solve: no containers to export
topaz drum
#

yes, i'm using the latest

> dagger version
dagger v0.6.1 linux/amd64
topaz drum
gilded kite
#

oh! that's on the engine logs!

#

I get a different error in the logs though 🤔

time="2023-06-12T17:36:55Z" level=error msg="/moby.buildkit.v1.Control/Solve returned error: rpc error: cod
e = Unknown desc = no containers to export"                                                                
no containers to export  ```

are you also running the `v.0.6.1` engine?
topaz drum
#

yes, it's running the engine v0.6.1

gilded kite
#

@topaz drum wanna jump into a quick audio channel to troubleshoot together?

#

I can't seem to be able to reproduce

topaz drum
#

@gilded kite sure

gilded kite
#

dagger  query -s <<QUERY
{
  container(id: "$container_id") {
    publish(address: "$image_name")
  }
}
QUERY
topaz drum
#

dagger query -s <<QUERY
{
container(id: "$container_id") {
publish(address: "$image_name")
}
}
QUERY
Connected to engine 7382677cd5d3
Error: build: failed to solve: unexpected end of JSON input

gilded kite
gilded kite
#

found the issue, the containerd_id wasn't correct and the API was returning a confusing error message. I'll open an issue to fix this

topaz drum
#

cool. Thank you for taking the time to look into it

#

the command now is running with no error but it 's building first before publishing. Is this normal?