pulumi/pulumi · error
unmarshaling new inputs: %w
Error message
unmarshaling new inputs: %w
What it means
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.
Source
Thrown at sdk/go/pulumi/context.go:1581
// Wrap the transform in a callback function.
callback := func(innerCtx context.Context, request []byte) (proto.Message, error) {
var req pulumirpc.ResourceHookRequest
err := proto.Unmarshal(request, &req)
if err != nil {
return nil, fmt.Errorf("unmarshaling request: %w", err)
}
var newInputs, oldInputs, newOutputs, oldOutputs resource.PropertyMap
mOpts := plugin.MarshalOptions{
KeepUnknowns: true,
KeepSecrets: true,
KeepResources: true,
KeepOutputValues: true,
}
if req.NewInputs != nil {
newInputs, err = plugin.UnmarshalProperties(req.NewInputs, mOpts)
if err != nil {
return nil, fmt.Errorf("unmarshaling new inputs: %w", err)
}
}
if req.OldInputs != nil {
oldInputs, err = plugin.UnmarshalProperties(req.OldInputs, mOpts)
if err != nil {
return nil, fmt.Errorf("unmarshaling old inputs: %w", err)
}
}
if req.NewOutputs != nil {
newOutputs, err = plugin.UnmarshalProperties(req.NewOutputs, mOpts)
if err != nil {
return nil, fmt.Errorf("unmarshaling new outputs: %w", err)
}
}
if req.OldOutputs != nil {
oldOutputs, err = plugin.UnmarshalProperties(req.OldOutputs, mOpts)
if err != nil {
return nil, fmt.Errorf("unmarshaling old outputs: %w", err)View on GitHub (pinned to 793f7b2e16)
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.
Defensive patterns
Strategy: try-catch
Try / catch
if err != nil && strings.Contains(err.Error(), "unmarshaling new inputs") {
return fmt.Errorf("hook inputs undecodable; realign CLI/SDK versions: %w", err)
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- the value of property %q is a string that contains non-UTF8
- unexpected Asset property value for %q
- unexpected Asset Archive property value for %q
- marshaling hooks: %w
- marshaling args: %w
AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31).
Data as JSON: /api/errors/2346ba02778fae84.
Report an issue: GitHub.