You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: On first container build, XPC timeout for request to com.apple.container.apiserver/containerCreate #857
If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
Follow the steps in docs/tutorial.md, until and including running the command container build --tag web-test --file Dockerfile .
Current behavior
On the terminal, I receive the following error:
Error: internalError: "failed to create container" (cause: "internalError: "XPC timeout for request to com.apple.container.apiserver/containerCreate"")
Expected behavior
Container to build successfully, and for it to be ready to run.
NOTE: Running the build command again did succeed. Maybe the timeout value is not appropriate, or maybe there's some other race condition at play.
@aoberoi Hi! Thanks for the report! Can you confirm if this happens consistently when you try starting a container build for the first time? And just to confirm, is this happening with the main branch or with the package installed with the 0.6.0 installer?
If this is happening consistently, I'd say let's first try to collect container system logs and boot logs. The steps would be like:
container system start (if it was already running, do a container system stop first)
container system logs --debug --follow
In a new terminal, run your build command above.
When that is done, see if you can get the container's bootlogs by running container logs --boot builder
Provide the output from 2 and 4 here
Let me know if there's any issues with these instructions! Thanks!
I also cannot complete the tutorial with the 0.6.0 installer version (container CLI version 0.6.0 (build: release, commit: a23bcf0)) - macOS 26.1 - M3 Max
Output from 2: Filtering the log data using "subsystem ==[cd] "com.apple.container"" Timestamp Thread Type Activity PID TTL 2025-11-28 16:27:47.158452+0000 0x6aaa9c Error 0x0 49106 0 container-apiserver: [com.apple.container:APIServer] handler for containerDial threw error invalidState: "no sandbox client exists: container is stopped" 2025-11-28 16:27:47.212047+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] starting start [uuid=buildkit] 2025-11-28 16:27:47.213737+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] configuring XPC server [uuid=buildkit] 2025-11-28 16:27:47.213909+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] starting XPC server [uuid=buildkit] 2025-11-28 16:27:47.214137+0000 0x6aaab3 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] createEndpointxpc handler [uuid=buildkit] 2025-11-28 16:27:47.214614+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]bootstrapxpc handler [uuid=buildkit] 2025-11-28 16:27:47.218878+0000 0x6aa0d4 Info 0x0 49113 0 container-network-vmnet: [com.apple.container:NetworkVmnetHelper] allocated attachment [hostname=buildkit] [gateway=192.168.64.1] [id=default] [address=192.168.64.2/24] 2025-11-28 16:27:47.221267+0000 0x6aaab3 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] creating NATNetworkInterface with network reference [uuid=buildkit] 2025-11-28 16:27:47.601575+0000 0x6aaab4 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]startProcessxpc handler [uuid=buildkit] 2025-11-28 16:27:47.680485+0000 0x6aa001 Info 0x0 49106 0 container-apiserver: [com.apple.container:APIServer] registering container buildkit with exit monitor 2025-11-28 16:27:47.680607+0000 0x6aab52 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]statexpc handler [uuid=buildkit] 2025-11-28 16:27:47.681420+0000 0x6aaab3 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]waitxpc handler [uuid=buildkit] 2025-11-28 16:27:52.687979+0000 0x6aab52 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]dialxpc handler [uuid=buildkit] 2025-11-28 16:27:52.864636+0000 0x6aa0d7 Info 0x0 49114 0 container-core-images: [com.apple.container:ImagesHelper] ImagesService: pull(reference:platform:insecure:progressUpdate:) - ref: docker.io/library/python:alpine, platform: Optional(ContainerizationOCI.Platform(osVersion: nil, osFeatures: nil, variant: Optional("v8"), _rawOS: "linux", _rawArch: "arm64")), insecure: false
Output from 4. container logs --boot builder
Error: invalidArgument: "failed to fetch container logs for builder: notFound: "get failed: container builder not found""
I did setup the DNS step as "container" instead of "test" as I wanted to have .container as the domain.
@katiewasnothere thanks for providing a procedure to gather logs. Unfortunately (or fortunately) I can't gather logs related to that issue anymore because I've since updated to the 0.7.0 release, and I was able to follow the tutorial successfully.
As far as the other suggestions:
Rosetta 2: I already had it installed when I ran into the error a few weeks ago. This is not likely part of the cause.
local DNS domain: I did not follow those optional steps when I had the error, but I also didn't after updating to 0.7.0 and I did not have the error. So I don't think this is related either.
Leaving the issue open for @aledbrown, who might still want to get to the bottom of it.
@katiewasnothere it was a fresh install of 0.6.0. I will uninstall that and grab the 0.7.0 version and try again when I get a chance. As @aoberoi got it to work with the new version it'll likely be fine for me as well. Thanks.
I have just installed container CLI version 0.7.1 (build: release, commit: 420be74) and I got the same error on my first execution on one of my own Dockerfiles. On the subsequent run the error did not occur.
Activity
boychoi commentedon Nov 12, 2025
you should try this
the document says it is optional
but i think it is nessasary
so when you follow that step you will get build success result ^ _ ^
katiewasnothere commentedon Nov 25, 2025
@aoberoi Hi! Thanks for the report! Can you confirm if this happens consistently when you try starting a container build for the first time? And just to confirm, is this happening with the main branch or with the package installed with the 0.6.0 installer?
If this is happening consistently, I'd say let's first try to collect
containersystem logs and boot logs. The steps would be like:container system start(if it was already running, do acontainer system stopfirst)container system logs --debug --followcontainer logs --boot builderLet me know if there's any issues with these instructions! Thanks!
aledbrown commentedon Nov 28, 2025
I also cannot complete the tutorial with the 0.6.0 installer version (container CLI version 0.6.0 (build: release, commit: a23bcf0)) - macOS 26.1 - M3 Max
Output from 2:
Filtering the log data using "subsystem ==[cd] "com.apple.container"" Timestamp Thread Type Activity PID TTL 2025-11-28 16:27:47.158452+0000 0x6aaa9c Error 0x0 49106 0 container-apiserver: [com.apple.container:APIServer] handler for containerDial threw error invalidState: "no sandbox client exists: container is stopped" 2025-11-28 16:27:47.212047+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] starting start [uuid=buildkit] 2025-11-28 16:27:47.213737+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] configuring XPC server [uuid=buildkit] 2025-11-28 16:27:47.213909+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] starting XPC server [uuid=buildkit] 2025-11-28 16:27:47.214137+0000 0x6aaab3 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]createEndpointxpc handler [uuid=buildkit] 2025-11-28 16:27:47.214614+0000 0x6aaaa2 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]bootstrapxpc handler [uuid=buildkit] 2025-11-28 16:27:47.218878+0000 0x6aa0d4 Info 0x0 49113 0 container-network-vmnet: [com.apple.container:NetworkVmnetHelper] allocated attachment [hostname=buildkit] [gateway=192.168.64.1] [id=default] [address=192.168.64.2/24] 2025-11-28 16:27:47.221267+0000 0x6aaab3 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] creating NATNetworkInterface with network reference [uuid=buildkit] 2025-11-28 16:27:47.601575+0000 0x6aaab4 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]startProcessxpc handler [uuid=buildkit] 2025-11-28 16:27:47.680485+0000 0x6aa001 Info 0x0 49106 0 container-apiserver: [com.apple.container:APIServer] registering container buildkit with exit monitor 2025-11-28 16:27:47.680607+0000 0x6aab52 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]statexpc handler [uuid=buildkit] 2025-11-28 16:27:47.681420+0000 0x6aaab3 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]waitxpc handler [uuid=buildkit] 2025-11-28 16:27:52.687979+0000 0x6aab52 Info 0x0 49511 0 container-runtime-linux: [com.apple.container:RuntimeLinuxHelper]dialxpc handler [uuid=buildkit] 2025-11-28 16:27:52.864636+0000 0x6aa0d7 Info 0x0 49114 0 container-core-images: [com.apple.container:ImagesHelper] ImagesService: pull(reference:platform:insecure:progressUpdate:) - ref: docker.io/library/python:alpine, platform: Optional(ContainerizationOCI.Platform(osVersion: nil, osFeatures: nil, variant: Optional("v8"), _rawOS: "linux", _rawArch: "arm64")), insecure: falseOutput from 4.
container logs --boot builderError: invalidArgument: "failed to fetch container logs for builder: notFound: "get failed: container builder not found""
I did setup the DNS step as "container" instead of "test" as I wanted to have .container as the domain.
aoberoi commentedon Dec 4, 2025
@katiewasnothere thanks for providing a procedure to gather logs. Unfortunately (or fortunately) I can't gather logs related to that issue anymore because I've since updated to the 0.7.0 release, and I was able to follow the tutorial successfully.
As far as the other suggestions:
Leaving the issue open for @aledbrown, who might still want to get to the bottom of it.
katiewasnothere commentedon Dec 5, 2025
@aledbrown what steps did you take to install
container? Did you already have acontainerinstallation before updating to 0.6.0?aledbrown commentedon Dec 8, 2025
@katiewasnothere it was a fresh install of 0.6.0. I will uninstall that and grab the 0.7.0 version and try again when I get a chance. As @aoberoi got it to work with the new version it'll likely be fine for me as well. Thanks.
blimey74 commentedon Jan 8, 2026
I have just installed container CLI version 0.7.1 (build: release, commit: 420be74) and I got the same error on my first execution on one of my own Dockerfiles. On the subsequent run the error did not occur.
0xpr03 commentedon Feb 1, 2026
Had the same just now - even with the test dns domain.
Re-ran the command and it worked.
JaewonHur commentedon Feb 13, 2026
Hi @0xpr03, thank you for reporting this issue.
Is it initial install of
v0.9.0?Could you share the system log? You can get one by
container system logsafter running that command.0xpr03 commentedon Feb 16, 2026
Hey, I upgraded my OS in the meantime and had stopped the engine.
paulcdejean commentedon Aug 1, 2026
Is it possible this is related to this issue? #2051
Fix vminit image install during system start
Fix vminit image install during system start