https://pulumi.com logo
#typescript
Title
# typescript
b

best-lifeguard-91445

12/21/2020, 10:43 PM
I'm getting a panic error when trying to preview my stack - any ideas?
Copy code
panic: interface conversion: interface {} is string, not int
    goroutine 1468 [running]:
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.SerializeValueForHash(0xc0005e2f08|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.SerializeValueForHash(0xc0005e2f08>, 0x54033c0, 0x6fa5e00, 0xc000d08f00)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20200910230100-328eb4ff41df/helper/schema/serialize.go:24 +0x959
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.SerializeResourceForHash(0xc0005e2f08|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.SerializeResourceForHash(0xc0005e2f08>, 0x5a626e0, 0xc0022b6f00, 0xc000cdfd90)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20200910230100-328eb4ff41df/helper/schema/serialize.go:115 +0x386
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.HashResource.func1(0x5a626e0|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.HashResource.func1(0x5a626e0>, 0xc0022b6f00, 0xc00228d510)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20200910230100-328eb4ff41df/helper/schema/set.go:32 +0x6f
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).hash(0xc00228d500|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).hash(0xc00228d500>, 0x5a626e0, 0xc0022b6f00, 0xc00228d360, 0xc00228d540)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20200910230100-328eb4ff41df/helper/schema/set.go:251 +0x44
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).add(0xc00228d500|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).add(0xc00228d500>, 0x5a626e0, 0xc0022b6f00, 0x0, 0x5a626e0, 0xc0022b6f00)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/v2@v2.0.0-20200910230100-328eb4ff41df/helper/schema/set.go:231 +0x8b
    <http://github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).Add(...)|github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Set).Add(...)>
Refresh works -- but up/preview causes the error above..
b

billowy-army-68599

12/21/2020, 10:48 PM
can you share your code?
g

gentle-diamond-70147

12/21/2020, 10:48 PM
This looks similar to https://github.com/pulumi/pulumi/issues/5770 which was fixed recently. What provider version are you using?
b

best-lifeguard-91445

12/21/2020, 10:56 PM
v2.16.0
@billowy-army-68599 - I have a large codebase / stack. I can't share it easily.
g

gentle-diamond-70147

12/21/2020, 10:58 PM
Are you using AWS? If so, can you check that version and update to 3.19.2 which contains the fix?
sorry, 3.19.2
b

best-lifeguard-91445

12/21/2020, 10:59 PM
{     "name": "aws",     "devDependencies": {         "@types/node": "^10.17.45"     },     "dependencies": {         "@pulumi/aws": "^3.21.0",         "@pulumi/awsx": "^0.23.0",         "@pulumi/pulumi": "^2.16.0"     } }
I'll downgrade to 3.19.2 and try
which awsx is compatible ?
Different error with 3.19.2:
Copy code
fatal error: concurrent map read and map write

goroutine 1932 [running]:
runtime.throw(0x236dde7, 0x21)
        C:/hostedtoolcache/windows/go/1.15.6/x64/src/runtime/panic.go:1116 +0x79 fp=0xc002c4fc70 sp=0xc002c4fc40 pc=0xa4a5d9
This same stack works in a different environment 😕