this error is brutal: `Invalid asset encountered w...
# general
b
this error is brutal:
Invalid asset encountered when unmarshaling resource property
it happens when i
pulumi refresh
pulumi stack export
has the following data:
Copy code
{
    "urn": "[…]$command:local:Command::build-command",
    "custom": true,
    "id": "build-command5ffdbbd8",
    "type": "command:local:Command",
    "inputs": {
        "addPreviousOutputInEnv": true,
        "assetPaths": [
            "build/**"
        ],
        "create": "pnpm build --sourcemapClient --minify=false",
        "dir": "../../web-app"
    },
    "outputs": {
        "addPreviousOutputInEnv": true,
        "assetPaths": [
            "build/**"
        ],
        "assets": {
            "build/client/.DS_Store": {
                "4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
                "hash": "9d19c5664746dacd091a0b016973eb023b8bdea8716e2b223b9153e8699e4c29"
            },
            […]
        },
        […]
    },
    […]
}
as you can see, the
.DS_Store
asset has a
hash
property rather than the expected path/text/uri properties. this is the case for every asset in that
outputs.assets
map.
i suppose the workaround is to not use
assetPaths
on my
Command
resource
e
Are you on a recent version of Pulumi? I thought we'd fixed this issue, seen it before with azure-native refreshes
b
v3.153.1
e
damn, can you raise an issue with details on where you saw this. We'll take a look.
b
i'd love to, but chasing a deadline and worked around this by avoiding
assetPaths
with
local.Command
(from
@pulumi/command
). some notes: • assetPaths was an array containing a single relative glob • the
stack export
output showed the
outputs.assets
of the command containing
{ hash }
objects • the error shows up when running
update
after a
refresh
command • error triggered by this line: https://github.com/pulumi/pulumi/blob/e15e594b4e1b81edb36c03aac1d9f99aeee6bad8/sdk/nodejs/runtime/rpc.ts#L743 i'm somewhat confident that's all you need to reproduce...
e
thanks
Copied bits of this thread to https://github.com/pulumi/pulumi/issues/18926