diff --git a/js/modules/k6/grpc/client.go b/js/modules/k6/grpc/client.go index 7dacaa5abeb..4d975730a6a 100644 --- a/js/modules/k6/grpc/client.go +++ b/js/modules/k6/grpc/client.go @@ -38,6 +38,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/metadata" grpcstats "google.golang.org/grpc/stats" "google.golang.org/grpc/status" @@ -151,7 +152,7 @@ func (c *Client) Connect(addr string, params map[string]interface{}) (bool, erro opts = append(opts, grpc.WithTransportCredentials(credentials.NewTLS(tlsCfg))) } else { - opts = append(opts, grpc.WithInsecure()) + opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) } if ua := state.Options.UserAgent; ua.Valid {