{"record":{"id":"0f4fd80df8e1e8a7","repo":"gravitational/teleport","slug":"the-real-rdpclient-client-implementation-was-not-i","errorCode":null,"errorMessage":"the real rdpclient.Client implementation was not included in this build","messagePattern":"the real rdpclient\\.Client implementation was not included in this build","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/srv/desktop/rdp/rdpclient/client_nop.go","lineNumber":45,"sourceCode":"import (\n\t\"context\"\n\t\"errors\"\n\t\"log/slog\"\n\t\"time\"\n\n\t\"github.com/gravitational/teleport/lib/srv/desktop/tdp\"\n\t\"github.com/gravitational/teleport/lib/srv/desktop/tdp/protocol/tdpb\"\n)\n\n// Client is the dummy RDP client.\ntype Client struct {\n}\n\n// New creates and connects a new Client based on opts.\n//\n//nolint:staticcheck // SA4023. False positive, depends on build tags.\nfunc New(_ tdp.MessageReadWriteCloser, _ *tdpb.ClientHello, cfg Config) (*Client, error) {\n\treturn nil, errors.New(\"the real rdpclient.Client implementation was not included in this build\")\n}\n\n// Run starts the RDP client, using the provided user certificate and private key.\n// It blocks until the client disconnects, then ensures the cleanup is run.\nfunc (c *Client) Run(ctx context.Context, certDER, keyDER []byte) error {\n\treturn errors.New(\"the real rdpclient.Client implementation was not included in this build\")\n}\n\nfunc (c *Client) GetClientUsername() string {\n\treturn \"\"\n}\n\n// GetClientLastActive returns the time of the last recorded activity.\nfunc (c *Client) GetClientLastActive() time.Time {\n\treturn time.Now().UTC()\n}\n\n// UpdateClientActivity updates the client activity timestamp.","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/gravitational/teleport/blob/1283425b60ec5f60d509ba4c791183d452923ff7/lib/srv/desktop/rdp/rdpclient/client_nop.go#L27-L63","documentation":"This is the stub (client_nop.go) build of rdpclient.New, compiled when the real RDP client (Windows/cgo or architecture-specific implementation) is excluded by build tags. It always returns this error — no connection can be made in this build.","triggerScenarios":"Calling rdpclient.New in a binary built without the RDP client build tag (e.g. non-Windows/non-cgo build or a build excluding the tagged client implementation file).","commonSituations":"Running Teleport desktop access on a build compiled without RDP support; developers testing on Linux without the cgo-enabled build; CI artifacts stripped of the real client.","solutions":["Rebuild the binary with the build tags/include the real rdpclient implementation (CGO-enabled build)","Verify desktop access is supported for the target platform of the artifact","If intentionally stubbed, guard desktop RDP features behind capability checks instead of calling New"],"exampleFix":"// before\ngo build ./...            # stub included, New always errors\n// after\ngo build -tags desktop_access_rdp ./...   # or CGO_ENABLED=1 with proper tags","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"c, err := rdpclient.New(conn, hello, cfg)\nif err != nil && strings.Contains(err.Error(), \"not included in this build\") {\n    return trace.NotImplemented(\"RDP desktop access unavailable in this build\")\n}","preventionTips":["Build production desktop-access binaries with the real client build tags","Add a startup capability check for RDP support","Document required build tags for desktop access"],"tags":["rdp","build-tags","desktop","stub"],"backgroundTag":"feature-not-compiled-in","analyzedSha":"1283425b60ec5f60d509ba4c791183d452923ff7","analyzedAt":"2026-09-02T04:06:41.601Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}