temporalio/temporal · error

panic(err)

Error message

panic(err)

What it means

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.

Source

Thrown at common/testing/nettest/rpc_factory.go:73

}

func (f *RPCFactory) CreateMatchingGRPCConnection(rpcAddress string) *grpc.ClientConn {
	return f.dial(rpcAddress)
}

func (f *RPCFactory) dial(rpcAddress string) *grpc.ClientConn {
	dialOptions := append(f.dialOptions,
		grpc.WithContextDialer(func(ctx context.Context, s string) (net.Conn, error) {
			return f.listener.Connect(ctx.Done())
		}),
		grpc.WithTransportCredentials(insecure.NewCredentials()),
	)
	conn, err := grpc.NewClient(
		rpcAddress,
		dialOptions...,
	)
	if err != nil {
		panic(err)
	}

	return conn
}

View on GitHub (pinned to bde624efd1)

Solutions

  1. Log the underlying err (temporarily replace panic) to see which dial option or address failed validation.
  2. Fix the invalid dial option — commonly a malformed service config JSON or invalid credentials passed to NewRPCFactory.
  3. Verify the grpc-go version matches what temporal's go.mod expects and rebuild.
Defensive patterns

Strategy: validation

Validate before calling

// validate dial options / address before constructing the factory
if _, _, err := net.SplitHostPort(addr); err != nil {
	t.Fatalf("invalid rpc address %q: %v", addr, err)
}

Prevention

When it happens

Trigger: 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.

Common situations: Misconfigured dial options (invalid target scheme, bad grpc.WithDefaultServiceConfig JSON); incompatible grpc-go version changes altering NewClient validation; corrupt TLS credentials options.

Related errors


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/d720ca71282c97a1. Report an issue: GitHub.