newrelic / terraform-provider-newrelic

Terraform provider for New Relic
https://registry.terraform.io/providers/newrelic/newrelic/latest/docs
Mozilla Public License 2.0
200 stars 244 forks source link

Error: Plugin did not respond provider New Relic #2674 #2677

Closed machaadolarissa closed 1 month ago

machaadolarissa commented 1 month ago

Hello!

I'm encountering errors when using version 3.37.0 of the New Relic provider. When fixed, version 3.36.1 works normally.

│ Error: Plugin did not respond │ │ │ │ The plugin encountered an error, and failed to respond to the │ plugin.(GRPCProvider).ReadResource call. The plugin logs may contain more │ details. ╵ Stack trace from the terraform-provider-newrelic_v3.37.0 plugin: panic: interface conversion: interface {} is nil, not []interface {} goroutine 151 [running]: github.com/newrelic/terraform-provider-newrelic/v2/newrelic.flattenDashboardWidget(0xc00045b0a8, {0xc000bccc00, 0x28}) /home/runner/work/terraform-provider-newrelic/terraform-provider-newrelic/newrelic/structures_newrelic_one_dashboard.go:1206 +0x2785 github.com/newrelic/terraform-provider-newrelic/v2/newrelic.flattenDashboardPage(0xc0006d29f8) /home/runner/work/terraform-provider-newrelic/terraform-provider-newrelic/newrelic/structures_newrelic_one_dashboard.go:1109 +0x350 github.com/newrelic/terraform-provider-newrelic/v2/newrelic.flattenDashboardEntity(0xc0006d2600, 0x111fed8?) /home/runner/work/terraform-provider-newrelic/terraform-provider-newrelic/newrelic/structures_newrelic_one_dashboard.go:949 +0x19c github.com/newrelic/terraform-provider-newrelic/v2/newrelic.resourceNewRelicOneDashboardRead({0x111fed8, 0xc000430540}, 0xc00014f000, {0xe004c0?, 0xc000152980?}) /home/runner/work/terraform-provider-newrelic/terraform-provider-newrelic/newrelic/resource_newrelic_one_dashboard.go:840 +0x2fd github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc000507a40, {0x111fe30, 0xc0008ab170}, 0xd?, {0xe004c0, 0xc000152980}) /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:724 +0x11b github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource.RefreshWithoutUpgrade(0xc000507a40, {0x111fe30, 0xc0008ab170}, 0xc0000bc4e0, {0xe004c0, 0xc000152980}) /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:1015 +0x549 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc000148030, {0x111fe30?, 0xc0008ab080?}, 0xc000b177c0) /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/grpc_provider.go:613 +0x48a github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc000150000, {0x111fe30?, 0xc0008aa8d0?}, 0xc0005d85a0) /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:748 +0x48b github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xf22700?, 0xc000150000}, {0x111fe30, 0xc0008aa8d0}, 0xc0002a5a40, 0x0) /home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x169 google.golang.org/grpc.(*Server.processUnaryRPC(0xc0002721e0, {0x1124f18, 0xc000602d00}, 0xc00082be60, 0xc000134870, 0x17ae090, 0x0) /home/runner/go/pkg/mod/google.golang.org/grpc@v1.57.1/server.go:1358 +0xe15 google.golang.org/grpc.(Server).handleStream(0xc0002721e0, {0x1124f18, 0xc000602d00}, 0xc00082be60, 0x0) /home/runner/go/pkg/mod/google.golang.org/grpc@v1.57.1/server.go:1735 +0x9e7 [google.golang.org/grpc.(Server](http://google.golang.org/grpc.(*Server)).serveStreams.func1.1() /home/runner/go/pkg/mod/google.golang.org/grpc@v1.57.1/server.go:970 +0xbb created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 56 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.57.1/server.go:981 +0x145 Error: The terraform-provider-newrelic_v3.37.0 plugin crashed! This is always indicative of a bug within the plugin. It would be immensely helpful if you could report the crash with the plugin's maintainers so that it can be fixed. The output above should help diagnose the issue.

pranav-new-relic commented 1 month ago

Hi @machaadolarissa - we first identified a report of the same bug via #2675, after which a release was cut over (v3.37.1, the latest version as on 24 May 2024) with a fix to this issue; we've also received a confirmation in the issue as you may find, that the issue is no longer seen with v3.37.1.

Can you please upgrade to this version and give this a try? Thanks!