sst / ion

SST v3
https://sst.dev
MIT License
1.88k stars 219 forks source link

gcp + cloudflare not working #713

Open Ernxst opened 2 months ago

Ernxst commented 2 months ago

I was provisioning Google Cloud resources with ion for a while until I upgraded to 0.0.530 (and subsequently 0.0.545). Now, all deployments fail with a cryptic error:

❯ sst deploy
SST ❍ ion 0.0.545  ready!

➜  App:        sst-gcp
   Stage:      ernest

~  Deploying

|  Error       
|  Error: 13 INTERNAL: Request message serialization failure: b.Va is not
a function
|      at callErrorFromStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/call.ts:82:17)
|      at Object.onReceiveStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client.ts:360:55)
|      at Object.onReceiveStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client-
interceptors.ts:458:34)
|      at Object.onReceiveStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client-
interceptors.ts:419:48)
|      at /Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/resolving-call.ts:132:24
|      at processTicksAndRejections
(node:internal/process/task_queues:77:11)
|  for call at
|      at ServiceClientImpl.makeUnaryRequest
(/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client.ts:325:42)
|      at ServiceClientImpl.registerResourceOutputs
(/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/make-client.ts:189:15)
|      at /Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@pulumi/runtime/resource.ts:1087:33
|      at new Promise (<anonymous>)
|      at Object.<anonymous> (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@pulumi/runtime/resource.ts:1086:21)
|      at Generator.next (<anonymous>)
|      at fulfilled (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@pulumi/pulumi/runtime/resource.js:18:58)
|      at processTicksAndRejections
(node:internal/process/task_queues:95:5) {
|    code: 13,
|    details: 'Request message serialization failure: b.Va is not a
function',
|    metadata: Metadata { internalRepr: Map(0) {}, options: {} },
|    promise: Promise { <rejected> [Circular *1] }
|  }

×  Failed
   Error: 13 INTERNAL: Request message serialization failure: b.Va is not
a function
       at callErrorFromStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/call.ts:82:17)
       at Object.onReceiveStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client.ts:360:55)
       at Object.onReceiveStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client-
interceptors.ts:458:34)           
       at Object.onReceiveStatus (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client-
interceptors.ts:419:48)           
       at /Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/resolving-call.ts:132:24
       at processTicksAndRejections
(node:internal/process/task_queues:77:11)
   for call at
       at ServiceClientImpl.makeUnaryRequest
(/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/client.ts:325:42)
       at ServiceClientImpl.registerResourceOutputs
(/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@grpc/grpc-js/src/make-client.ts:189:15)
       at /Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@pulumi/runtime/resource.ts:1087:33
       at new Promise (<anonymous>)
       at Object.<anonymous> (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@pulumi/runtime/resource.ts:1086:21)
       at Generator.next (<anonymous>)
       at fulfilled (/Users/ernest/Projects/Repros/sst-
gcp/.sst/platform/node_modules/@pulumi/pulumi/runtime/resource.js:18:58)
       at processTicksAndRejections
(node:internal/process/task_queues:95:5) {
     code: 13,
     details: 'Request message serialization failure: b.Va is not a
function',
     metadata: Metadata { internalRepr: Map(0) {}, options: {} },
     promise: Promise { <rejected> [Circular *1] }
   }

I've created a minimal repro which shows just importing @pulumi/gcp breaks things. It seems any pulumi package does not work as the exact same error is observed when using @pulumiverse/sentry instead of @pulumi/gcp. Interestingly, downgrading sst to specific versions I used previously (which were working previously) also now no longer work (0.0.416, 0.0.473).

Ernxst commented 2 months ago

Upgraded to 0.1.1 and I've never used sst add before, but running sst add @pulumi/gcp (or whatever pulumi package) before running sst deploy fixes things. Guess the error is just that the providers are not installed beforehand. I'll leave this open in case requiring consumers to install all providers themselves is not expected behaviour.