{"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/0c51461d27177d997e14c642fe18c11668fc09a3/credentials/alts/alts.go#L234-L270","documentation":"Returned during an ALTS server handshake (alts.ServerHandshake) after the handshake completes, when checkRPCVersions reports the local RPC protocol version range [2.1, 2.1] does not overlap with the connecting client's reported RPC versions. This is the server-side mirror of error 183.","triggerScenarios":"A gRPC-Go ALTS server (NewServerCreds) accepts a connection, the ALTS handshake with the metadata-server handshaker service completes, but the client's negotiated max/min RPC versions do not intersect [2.1, 2.1]. Reached only on GCP.","commonSituations":"Clients connecting from a newer/older grpc-go or a non-Go gRPC implementation whose ALTS RPC versions differ; mixed-version fleets during a rolling upgrade; a custom ALTS handshaker returning unexpected versions.","solutions":["Ensure all clients and the server run grpc-go versions whose advertised ALTS RPC versions overlap with [2.1, 2.1].","Complete the rolling upgrade so both ends are on the same grpc-go release.","Check the PeerRPCVersions in server logs to identify the offending client version and update it."],"exampleFix":"// before: mixed fleet — server v1.70, some clients on a build advertising 1.0 RPC versions\ncreds := alts.NewServerCreds(alts.DefaultServerOptions())\ns := grpc.NewServer(grpc.Creds(creds)) // some clients fail with version mismatch\n\n// after: upgrade all clients to a grpc-go release advertising 2.1\n// (no code change on server; coordinate a fleet-wide grpc-go bump)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// In the server's accept loop, log and continue rather than crashing the server.\n// The error is per-connection; gRPC server already handles it, but monitor it:\ngo func() {\n    for err := range serverErrCh {\n        if strings.Contains(err.Error(), \"RPC versions is not compatible\") {\n            metrics.ALTSVersionMismatches.Inc()\n            log.Printf(\"client ALTS version mismatch: %v\", err)\n        }\n    }\n}()","preventionTips":["Keep the entire fleet on a single grpc-go version until a coordinated upgrade.","Expose ALTS version-mismatch metrics to detect clients on old builds.","Log PeerRPCVersions when available to identify the offending client version."],"tags":["grpc","alts","version-mismatch","gcp","handshake","server"],"backgroundTag":null,"analyzedSha":"0c51461d27177d997e14c642fe18c11668fc09a3","analyzedAt":"2026-08-11T14:49:15.055Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}