gravitational/teleport · error
XPC connection interrupted
Error message
XPC connection interrupted
What it means
errXPCConnectionInterrupted (lib/vnet/daemon/common_darwin.go:56) wraps the macOS NSXPCConnectionInterrupted error code from NSCocoaErrorDomain. The XPC connection to the VNet daemon was dropped mid-communication. Per the code comment in client_darwin.go, when there are no daemon-side errors, this frequently means the client did not satisfy the daemon's code signing requirement.
Source
Thrown at lib/vnet/daemon/common_darwin.go:56
// errorCodeAlreadyRunning is returned within [vnetErrorDomain] errors to indicate that the daemon
// received a message to start after it was already running.
errorCodeAlreadyRunning = int(C.VNEAlreadyRunningError)
errAlreadyRunning = errors.New("VNet is already running")
// errorCodeMissingCodeSigningIdentifiers is returned within [vnetErrorDomain] Obj-C errors and
// transformed to [errMissingCodeSigningIdentifiers] in Go.
errorCodeMissingCodeSigningIdentifiers = int(C.VNEMissingCodeSigningIdentifiersError)
errMissingCodeSigningIdentifiers = errors.New("either identifier or team identifier is missing in code signing information; is the binary signed?")
)
var (
// nsCocoaErrorDomain is a generic error domain used in a lot of Apple's Cocoa frameworks.
nsCocoaErrorDomain = "NSCocoaErrorDomain"
// https://developer.apple.com/documentation/foundation/nsxpcconnectioninterrupted-swift.var
errorCodeNSXPCConnectionInterrupted = int(C.NSXPCConnectionInterrupted)
errXPCConnectionInterrupted = errors.New("XPC connection interrupted")
// https://developer.apple.com/documentation/foundation/nsxpcconnectioncodesigningrequirementfailure-swift.var
errorCodeNSXPCConnectionCodeSigningRequirementFailure = int(C.NSXPCConnectionCodeSigningRequirementFailure)
errXPCConnectionCodeSigningRequirementFailure = errors.New("code signing requirement failed")
// https://developer.apple.com/documentation/foundation/nsxpcconnectioninvalid-swift.var
errorCodeNSXPCConnectionInvalid = int(C.NSXPCConnectionInvalid)
errXPCConnectionInvalid = errors.New("XPC connection invalid")
)
func DaemonLabel() (string, error) {
path, err := darwinbundle.Path()
if err != nil {
return "", trace.Wrap(err)
}
cPath := C.CString(path)
defer C.free(unsafe.Pointer(cPath))View on GitHub (pinned to 1283425b60)
Solutions
- Capture logs in Console.app and search for `xpc_support_check_token ... status: -67050` to confirm whether the code signing requirement failed; if so, re-sign the client correctly.
- Check daemon logs for a startup error (e.g. inaccessible TELEPORT_HOME path) and fix the offending condition.
- Retry the start; if the daemon crashed, inspect its crash report and fix the underlying crash.
Defensive patterns
Strategy: try-catch
Type guard
func isXPCConnectionInterrupted(err error) bool { return errors.Is(err, vnetdaemon.ErrXPCConnectionInterrupted) } Try / catch
if err := client.RegisterAndCall(ctx, bundlePath, cfg); err != nil {
if errors.Is(err, vnetdaemon.ErrXPCConnectionInterrupted) {
log.ErrorContext(ctx, "XPC connection interrupted; check Console.app for xpc_support_check_token status -67050 and verify code signing")
}
return trace.Wrap(err)
} Prevention
- Keep client and daemon binaries properly signed so the XPC code signing requirement passes.
- Watch daemon logs at startup for immediate exits (e.g. unreadable TELEPORT_HOME).
- Reproduce with Console.app log capture to distinguish signing failures from daemon crashes.
When it happens
Trigger: C.StartVnet returns an NSCocoaErrorDomain error with code NSXPCConnectionInterrupted; the XPC service died or the connection was torn down during the handshake or while a call was in flight.
Common situations: Client binary not satisfying the daemon's code signing requirement (look for `xpc_support_check_token ... status: -67050` in Console.app logs); daemon crashing or exiting unexpectedly; TELEPORT_HOME pointing at a directory the daemon cannot access, causing the daemon to shut down right after start.
Related errors
- VNet is already running
- code signing requirement failed
- XPC connection invalid
- could not connect to the VNet daemon within the timeout
- either identifier or team identifier is missing in code sign
AI-assisted analysis of gravitational/teleport@1283425b60 (2026-09-02).
Data as JSON: /api/errors/9a196a86e02c5e7d.
Report an issue: GitHub.