Error when receiving file from appsmith application

I receive a base 64 file (original xlsx file). I have a function that does this:

return [
  {
    json: {},
    binary: {
        data: {
				data: items[0].json.file,
				mimeType: $node["Webhook"].json["query"]["type"], // Optional but should be set if possible (optional)
				fileName: $node["Webhook"].json["query"]["filename"], // Optional but should be set if possible (optional)
			}    }
  }
]

and this is the error it returns .

ERROR: Method Promise.prototype.then called on incompatible receiver [object Object]`

Can you help me to interpret this error
here is the complete process code :

What version of n8n are you using?

I had the same issue a couple of days ago and fixed it by updating to the latest version of n8n. Can you try that out?

this is my version
n8n Version:

0.142.0

There was a bug in vm2 which broke the Function-Node is why we did roll back the version of it.

The issue you describe is not in any of our docker-images. I made sure of that, so I assume you either created your own one or you run the code another way. No matter what, if you pull the latest code and you run npm run bootstrap the problem should be gone.

I updated n8n to the latest version, problem solved

Thanks

1 Like