{"record":{"id":"2346ba02778fae84","repo":"pulumi/pulumi","slug":"unmarshaling-new-inputs-w-2346ba","errorCode":null,"errorMessage":"unmarshaling new inputs: %w","messagePattern":"unmarshaling new inputs: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/go/pulumi/context.go","lineNumber":1581,"sourceCode":"\n\t// Wrap the transform in a callback function.\n\tcallback := func(innerCtx context.Context, request []byte) (proto.Message, error) {\n\t\tvar req pulumirpc.ResourceHookRequest\n\t\terr := proto.Unmarshal(request, &req)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unmarshaling request: %w\", err)\n\t\t}\n\t\tvar newInputs, oldInputs, newOutputs, oldOutputs resource.PropertyMap\n\t\tmOpts := plugin.MarshalOptions{\n\t\t\tKeepUnknowns:     true,\n\t\t\tKeepSecrets:      true,\n\t\t\tKeepResources:    true,\n\t\t\tKeepOutputValues: true,\n\t\t}\n\t\tif req.NewInputs != nil {\n\t\t\tnewInputs, err = plugin.UnmarshalProperties(req.NewInputs, mOpts)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"unmarshaling new inputs: %w\", err)\n\t\t\t}\n\t\t}\n\t\tif req.OldInputs != nil {\n\t\t\toldInputs, err = plugin.UnmarshalProperties(req.OldInputs, mOpts)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"unmarshaling old inputs: %w\", err)\n\t\t\t}\n\t\t}\n\t\tif req.NewOutputs != nil {\n\t\t\tnewOutputs, err = plugin.UnmarshalProperties(req.NewOutputs, mOpts)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"unmarshaling new outputs: %w\", err)\n\t\t\t}\n\t\t}\n\t\tif req.OldOutputs != nil {\n\t\t\toldOutputs, err = plugin.UnmarshalProperties(req.OldOutputs, mOpts)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"unmarshaling old outputs: %w\", err)","sourceCodeStart":1563,"sourceCodeEnd":1599,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/sdk/go/pulumi/context.go#L1563-L1599","documentation":"After decoding the ResourceHookRequest, the SDK unmarshals req.NewInputs from its serialized property form using plugin.UnmarshalProperties. Failure here means the marshaled property map for the resource's new inputs cannot be converted into a resource.PropertyMap — typically a schema/serialization incompatibility or corrupt property payload.","triggerScenarios":"Engine sends hook callbacks with NewInputs marshaled by an incompatible serializer version, or property values containing structures the SDK's UnmarshalProperties rejects (unknown wire format, unsupported secret/signature encoding).","commonSituations":"Version skew between the pulumi CLI/engine and the sdk/go module; custom or patched marshaling in a forked monitor; properties containing newer features (output values, resource references) sent to an older SDK.","solutions":["Upgrade github.com/pulumi/pulumi/sdk/v3 to match the running CLI version.","Upgrade the CLI so both sides use the same property serialization format.","Re-run the operation to rule out a transient/corrupt payload.","Simplify or fix the resource inputs producing the failure (e.g. exotic secret/signature values).","If it persists, capture the resource type and file a minimal repro upstream."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"unmarshaling new inputs\") {\n\treturn fmt.Errorf(\"hook inputs undecodable; realign CLI/SDK versions: %w\", err)\n}","preventionTips":["Upgrade sdk/v3 together with the CLI.","Avoid exotic input values (hand-rolled secrets/signatures) in hook-monitored resources.","Reproduce with a minimal resource before filing issues."],"tags":["go","pulumi-sdk","serialization","properties"],"backgroundTag":"property-unmarshal-failed","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}