#CodeGen mod error on Hello World getting started

1 messages ยท Page 1 of 1 (latest)

misty oxide
#

Firstly thank you for a great product, loving what I see so far! Sorry for the nooby question its my first time running Dagger - the getting started guide all works for me on an arm64 cloud VM but I'm having troubles running locally with my M1 Mac.

Local specs:

Model: Apple M1 Max
OS: MacOs Sonoma 14.3 (23D56)

Docker client version:
 Version:           25.0.4-rd
 API version:       1.44
 Go version:        go1.21.8
 Git commit:        c4cd0a9
 Built:             Fri Mar  8 09:09:46 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Dagger Engine version: registry.dagger.io/engine:v0.11.1

Heres my trying to call the same hello world func on a local module path:

$ pwd
~/dev/daggerverse/hello

$ dagger -m . call hello

Error: input: moduleSource.withContextDirectory.asModule resolve: failed to create module: select: failed to update codegen and runtime: failed to generate code: failed to get modified source directory for go module sdk codegen: select: process "/usr/local/bin/codegen --module-context /src --module-name hello --introspection-json-path /schema.json"

The log file inside the dagger engine shows some errors:

/ # cat /var/lib/dagger/runc-overlayfs/executor/runc-log.json
{"level":"fatal","msg":"nsexec[1078]: could not ensure we are a cloned binary: No such file or directory","time":"2024-04-24T07:35:15Z"}
{"error":"waiting for init preliminary setup: EOF","level":"warning","msg":"","time":"2024-04-24T07:35:15Z"}
{"level":"error","msg":"runc run failed: unable to start container process: can't copy bootstrap data to pipe: write init-p: broken pipe","time":"2024-04-24T07:35:15Z"}
{"level":"error","msg":"container does not exist","time":"2024-04-24T07:35:15Z"}
{"level":"fatal","msg":"nsexec[1167]: could not ensure we are a cloned binary: No such file or directory","time":"2024-04-24T07:38:46Z"}
{"error":"waiting for init preliminary setup: EOF","level":"warning","msg":"","time":"2024-04-24T07:38:46Z"}
{"level":"error","msg":"runc run failed: unable to start container process: can't copy bootstrap data to pipe: write init-p: broken pipe","time":"2024-04-24T07:38:46Z"}
{"level":"error","msg":"container does not exist","time":"2024-04-24T07:38:46Z"}
{"level":"fatal","msg":"nsexec[1252]: could not ensure we are a cloned binary: No such file or directory","time":"2024-04-24T07:38:59Z"}
{"error":"waiting for init preliminary setup: EOF","level":"warning","msg":"","time":"2024-04-24T07:38:59Z"}
{"level":"error","msg":"runc run failed: unable to start container process: can't copy bootstrap data to pipe: write init-p: broken pipe","time":"2024-04-24T07:38:59Z"}
{"level":"error","msg":"container does not exist","time":"2024-04-24T07:38:59Z"}

Any help would be much appreciated!

shy cairn
#

Hey @misty oxide ! Can you show what files are in that directory and the module code?

misty oxide
#

Hey @shy cairn , thanks for lending a hand here! Sure I get the same error when running directly from remote

eg.

dagger -m github.com/shykes/daggerverse/hello@main call hello
# or 
dagger -m github.com/shykes/daggerverse/hello@v0.1.2 call hello

See attached for the /var/lib/dagger/runc-overlayfs/executor/runc-log.json

#

There is an error from buildkit on the dagger engine container:

complete successfully: exit code: 1 kind:*buildkit.ExecError stack:<nil>]"

Full log attached

high creek
#

@misty oxide any chances you have rosetta enabled in your Docker Desktop settings

#

and/or the DEFAULT_PLATFORM env variable set?

#

can you please also run a docker inspect registry.dagger.io/engine:v0.11.1 and share the results here? ๐Ÿ™

shy cairn
#

By any chance did the stdout error include exec: "git": executable file not found in $PATH?

misty oxide
#

Thank you @high creek and @shy cairn for the pointers!

The DOCKER_DEFAULT_PLATFORM env var was unset however rosetta *was * enabled, though disabling it has caused dagger cli to hang and produces different errors in the dagger engine container (attached) - none of which seem to be missing git binary.

Hang:

$ dagger -m github.com/shykes/daggerverse/hello@v0.1.2 call hello


โœ˜ connect 5m0.8s
! start engine: attach to telemetry: context deadline exceeded

Error: start engine: attach to telemetry: context deadline exceeded

Output of docker inspect registry.dagger.io/engine:v0.11.1 attached!

Thanks again!

high creek
#

So the image got incorrectly pulled the first time and doesn't get re pulled automatically

misty oxide
#

Yes that worked!! Thank you ๐Ÿ™ ๐Ÿ™ ๐Ÿ™

high creek
#

I'll open an issue tomorrow to finally address this since it has been biting a few users recently. Cc @shy cairn and @violet zinc to see if we can add something quick in the docs meanwhile

high creek
violet zinc