DrFaust92 / terraform-provider-bitbucket

Terraform Bitbucket Cloud provider.
https://registry.terraform.io/providers/drfaust92/bitbucket
Mozilla Public License 2.0
36 stars 29 forks source link

Plugin Crashed #199

Open infystar opened 3 months ago

infystar commented 3 months ago

Plugin crashed while performing "terraform plan" operation. Tried with different versions but still the same issue. Below are the logs

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).UpgradeResourceState call. The │ plugin logs may contain more details.

Stack trace from the terraform-provider-bitbucket_v2.34.0.exe plugin:

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x10 pc=0xf530d6]

goroutine 53 [running]: github.com/terraform-providers/terraform-provider-bitbucket/bitbucket.(Client).Do(0xc000261218, {0x112c0ba, 0x3}, {0xc000458540, 0x59}, 0x0, {0x113674c, 0x10}) github.com/terraform-providers/terraform-provider-bitbucket/bitbucket/client.go:89 +0x576 github.com/terraform-providers/terraform-provider-bitbucket/bitbucket.(Client).Get(...) github.com/terraform-providers/terraform-provider-bitbucket/bitbucket/client.go:115 github.com/terraform-providers/terraform-provider-bitbucket/bitbucket.resourceDefaultReviewersRead({0x0?, 0x0?}, 0xc0005a1300, {0x107d920?, 0xc000412aa0?}) github.com/terraform-providers/terraform-provider-bitbucket/bitbucket/resource_default_reviewers.go:88 +0x2c5 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0x127d420?, {0x127d420?, 0xc000495680?}, 0xd?, {0x107d920?, 0xc000412aa0?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:719 +0x87 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc000210d20, {0x127d420, 0xc000495680}, 0xc0001c5520, {0x107d920, 0xc000412aa0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:1015 +0x585 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc00039e0f0, {0x127d420?, 0xc0001b5ce0?}, 0xc000436900) github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/grpc_provider.go:613 +0x4a5 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(server).ReadResource(0xc000239d60, {0x127d420?, 0xc0004b25a0?}, 0xc000076a20) github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:748 +0x4b1 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x10fe9c0?, 0xc000239d60}, {0x127d420, 0xc0004b25a0}, 0xc000184770, 0x0) github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170 google.golang.org/grpc.(Server).processUnaryRPC(0xc0001a21e0, {0x1280f78, 0xc000408340}, 0xc0004ba5a0, 0xc0003a6e70, 0x179a370, 0x0) google.golang.org/grpc@v1.51.0/server.go:1340 +0xd33 google.golang.org/grpc.(Server).handleStream(0xc0001a21e0, {0x1280f78, 0xc000408340}, 0xc0004ba5a0, 0x0) google.golang.org/grpc@v1.51.0/server.go:1713 +0xa36 google.golang.org/grpc.(Server).serveStreams.func1.2() google.golang.org/grpc@v1.51.0/server.go:965 +0x98 created by google.golang.org/grpc.(Server).serveStreams.func1 google.golang.org/grpc@v1.51.0/server.go:963 +0x28a

act-mreeves commented 3 months ago

I'd try to narrow it down such as running terraform plan with a target and the TF you are trying to create here.

One thing that is a common error is using the wrong username.

  1. Set BITBUCKET_USERNAME from username shown here: https://bitbucket.org/account/settings/
  2. Set BITBUCKET_PASSWORD from password setup here: https://bitbucket.org/account/settings/app-passwords/