{"record":{"id":"d720ca71282c97a1","repo":"temporalio/temporal","slug":"panic-err-d720ca","errorCode":null,"errorMessage":"panic(err)","messagePattern":"panic\\(err\\)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/testing/nettest/rpc_factory.go","lineNumber":73,"sourceCode":"}\n\nfunc (f *RPCFactory) CreateMatchingGRPCConnection(rpcAddress string) *grpc.ClientConn {\n\treturn f.dial(rpcAddress)\n}\n\nfunc (f *RPCFactory) dial(rpcAddress string) *grpc.ClientConn {\n\tdialOptions := append(f.dialOptions,\n\t\tgrpc.WithContextDialer(func(ctx context.Context, s string) (net.Conn, error) {\n\t\t\treturn f.listener.Connect(ctx.Done())\n\t\t}),\n\t\tgrpc.WithTransportCredentials(insecure.NewCredentials()),\n\t)\n\tconn, err := grpc.NewClient(\n\t\trpcAddress,\n\t\tdialOptions...,\n\t)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\treturn conn\n}\n","sourceCodeStart":55,"sourceCodeEnd":78,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/testing/nettest/rpc_factory.go#L55-L78","documentation":"nettest RPCFactory.dial creates grpc.ClientConn via grpc.NewClient for all gRPC connection creation methods and panics on error. grpc.NewClient rarely errors (only on bad options/parsing), so a panic here indicates the factory was constructed with invalid configuration rather than a transient network failure.","triggerScenarios":"Any of CreateRemoteFrontendGRPCConnection, CreateLocalFrontendGRPCConnection, CreateHistoryGRPCConnection, CreateMatchingGRPCConnection calling dial with dialOptions that make grpc.NewClient return an error — e.g. malformed service config in dial options or a broken custom dialer option.","commonSituations":"Misconfigured dial options (invalid target scheme, bad grpc.WithDefaultServiceConfig JSON); incompatible grpc-go version changes altering NewClient validation; corrupt TLS credentials options.","solutions":["Log the underlying err (temporarily replace panic) to see which dial option or address failed validation.","Fix the invalid dial option — commonly a malformed service config JSON or invalid credentials passed to NewRPCFactory.","Verify the grpc-go version matches what temporal's go.mod expects and rebuild."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// validate dial options / address before constructing the factory\nif _, _, err := net.SplitHostPort(addr); err != nil {\n\tt.Fatalf(\"invalid rpc address %q: %v\", addr, err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate addresses and service-config JSON passed into dial options.","Keep grpc-go versions aligned with temporal's go.mod."],"tags":["grpc","dial","testing","panic"],"backgroundTag":"grpc-client-creation-failed","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}