{"record":{"id":"f0d07f74389525a0","repo":"grpc/grpc-go","slug":"client-side-rpc-versions-is-not-compatible-with-th","errorCode":null,"errorMessage":"client-side RPC versions is not compatible with this server, local versions: %v, peer versions: %v","messagePattern":"client-side RPC versions is not compatible with this server, local versions: (.+?), peer versions: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"credentials/alts/alts.go","lineNumber":252,"sourceCode":"\t\tMinRpcVersion: minRPCVersion,\n\t}\n\tshs, err := handshaker.NewServerHandshaker(ctx, hsConn, rawConn, opts)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tsecConn, authInfo, err := shs.ServerHandshake(ctx)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\t// Close the handshaker since we have obtained a connection.\n\tdefer shs.Close()\n\taltsAuthInfo, ok := authInfo.(AuthInfo)\n\tif !ok {\n\t\treturn nil, nil, errors.New(\"server-side auth info is not of type alts.AuthInfo\")\n\t}\n\tmatch, _ := checkRPCVersions(opts.RPCVersions, altsAuthInfo.PeerRPCVersions())\n\tif !match {\n\t\treturn nil, nil, fmt.Errorf(\"client-side RPC versions is not compatible with this server, local versions: %v, peer versions: %v\", opts.RPCVersions, altsAuthInfo.PeerRPCVersions())\n\t}\n\treturn secConn, authInfo, nil\n}\n\nfunc (g *altsTC) Info() credentials.ProtocolInfo {\n\treturn *g.info\n}\n\nfunc (g *altsTC) Clone() credentials.TransportCredentials {\n\tinfo := *g.info\n\tvar accounts []string\n\tif g.accounts != nil {\n\t\taccounts = make([]string, len(g.accounts))\n\t\tcopy(accounts, g.accounts)\n\t}\n\treturn &altsTC{\n\t\tinfo:      &info,\n\t\tside:      g.side,","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/grpc/grpc-go/blob/03255a9237b6eb32710f6bc4f2de9a675b99fe36/credentials/alts/alts.go#L234-L270","documentation":"Symmetric to the client side: in the ALTS server handshake (alts.go:250-252), after the handshake completes the server checks RPC protocol versions against the connecting client's. If the version windows don't overlap, the connection is rejected. Reported server-side.","triggerScenarios":"An ALTS server (running on GCP) receives a client whose RPC protocol versions are incompatible — e.g. a much older or much newer client than the server's compiled ALTS range.","commonSituations":"Version skew between client and server gRPC builds; a client from outside the supported ALTS generation; mixed environments after a protocol bump.","solutions":["Upgrade or downgrade the client to a gRPC version whose ALTS versions overlap the server's.","If both sides can move, align to a single supported gRPC release.","Avoid ALTS for cross-version or non-GCP traffic; use TLS."],"exampleFix":"// before (server pinned to old gRPC, new client connects)\n// after\n# rebuild server and client from the same gRPC release\n# or serve TLS:\ncreds, _ := credentials.NewServerTLSFromFile(cert, key)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"secConn, _, err := creds.ServerHandshake(rawConn)\nif err != nil {\n    if strings.Contains(err.Error(), \"RPC versions\") {\n        log.Printf(\"rejecting ALTS client due to version mismatch\")\n    }\n    return err\n}","preventionTips":["Keep the ALTS server on a gRPC version compatible with your client fleet.","Roll upgrades in an order that keeps version windows overlapping.","Log peer RPC versions on handshake failure for diagnostics."],"tags":["go","grpc","alts","security","versioning"],"analyzedSha":"03255a9237b6eb32710f6bc4f2de9a675b99fe36","analyzedAt":"2026-08-07T00:29:34.215Z","schemaVersion":2},"datasetVersion":"2026-08-07T03:17:09.362Z"}