{"record":{"id":"9a196a86e02c5e7d","repo":"gravitational/teleport","slug":"xpc-connection-interrupted","errorCode":null,"errorMessage":"XPC connection interrupted","messagePattern":"XPC connection interrupted","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/vnet/daemon/common_darwin.go","lineNumber":56,"sourceCode":"\n\t// errorCodeAlreadyRunning is returned within [vnetErrorDomain] errors to indicate that the daemon\n\t// received a message to start after it was already running.\n\terrorCodeAlreadyRunning = int(C.VNEAlreadyRunningError)\n\terrAlreadyRunning       = errors.New(\"VNet is already running\")\n\n\t// errorCodeMissingCodeSigningIdentifiers is returned within [vnetErrorDomain] Obj-C errors and\n\t// transformed to [errMissingCodeSigningIdentifiers] in Go.\n\terrorCodeMissingCodeSigningIdentifiers = int(C.VNEMissingCodeSigningIdentifiersError)\n\terrMissingCodeSigningIdentifiers       = errors.New(\"either identifier or team identifier is missing in code signing information; is the binary signed?\")\n)\n\nvar (\n\t// nsCocoaErrorDomain is a generic error domain used in a lot of Apple's Cocoa frameworks.\n\tnsCocoaErrorDomain = \"NSCocoaErrorDomain\"\n\n\t// https://developer.apple.com/documentation/foundation/nsxpcconnectioninterrupted-swift.var\n\terrorCodeNSXPCConnectionInterrupted = int(C.NSXPCConnectionInterrupted)\n\terrXPCConnectionInterrupted         = errors.New(\"XPC connection interrupted\")\n\n\t// https://developer.apple.com/documentation/foundation/nsxpcconnectioncodesigningrequirementfailure-swift.var\n\terrorCodeNSXPCConnectionCodeSigningRequirementFailure = int(C.NSXPCConnectionCodeSigningRequirementFailure)\n\terrXPCConnectionCodeSigningRequirementFailure         = errors.New(\"code signing requirement failed\")\n\n\t// https://developer.apple.com/documentation/foundation/nsxpcconnectioninvalid-swift.var\n\terrorCodeNSXPCConnectionInvalid = int(C.NSXPCConnectionInvalid)\n\terrXPCConnectionInvalid         = errors.New(\"XPC connection invalid\")\n)\n\nfunc DaemonLabel() (string, error) {\n\tpath, err := darwinbundle.Path()\n\tif err != nil {\n\t\treturn \"\", trace.Wrap(err)\n\t}\n\n\tcPath := C.CString(path)\n\tdefer C.free(unsafe.Pointer(cPath))","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/gravitational/teleport/blob/1283425b60ec5f60d509ba4c791183d452923ff7/lib/vnet/daemon/common_darwin.go#L38-L74","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"func isXPCConnectionInterrupted(err error) bool { return errors.Is(err, vnetdaemon.ErrXPCConnectionInterrupted) }","tryCatchPattern":"if err := client.RegisterAndCall(ctx, bundlePath, cfg); err != nil {\n    if errors.Is(err, vnetdaemon.ErrXPCConnectionInterrupted) {\n        log.ErrorContext(ctx, \"XPC connection interrupted; check Console.app for xpc_support_check_token status -67050 and verify code signing\")\n    }\n    return trace.Wrap(err)\n}","preventionTips":["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."],"tags":["macos","xpc","vnet","network"],"backgroundTag":"xpc-connection-interrupted","analyzedSha":"1283425b60ec5f60d509ba4c791183d452923ff7","analyzedAt":"2026-09-02T04:06:41.601Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}