I cant run my workflow anymore

I get this error:

There was a problem saving the workflow: “Object.defineProperty called on non-object”

Sometimes it can, sometimes it cant save anymore
I cant Activate the workflow either

0|n8n      | TypeError: Object.defineProperty called on non-object
0|n8n      |     at Function.defineProperty (<anonymous>)
0|n8n      |     at create (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/ObservableObject.js:11:12)
0|n8n      |     at create (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/ObservableObject.js:8:27)
0|n8n      |     at create (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/ObservableObject.js:8:27)
0|n8n      |     at Object.create (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/ObservableObject.js:8:27)
0|n8n      |     at new Workflow (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:24:47)
0|n8n      |     at ActiveWorkflowRunner.add (/usr/lib/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:240:32)
0|n8n      |     at async /usr/lib/node_modules/n8n/dist/src/Server.js:352:21
0|n8n      |     at async /usr/lib/node_modules/n8n/dist/src/ResponseHelper.js:76:26

When i do “Save as” with another name, It does save and activate, When i change the name back to the original it breaks again

Edit: It doesnt

Got an extra error:

Could not remove webhooks of workflow "9" because of error: "Object.defineProperty called on non-object"

Normally running the workflow raises no error, just when activating the workflow

I’ve just determined, If the Workflow has had 1 error during an activated run, it breaks forever

Strange. What n8n version are you running exactly? What nodes does it contain? Are there any nodes which are not part of n8n by default?

The only function nodes are the ones i succesfully use in other workflows which run perfectly

This is N8N version 0.99.1 (I run the workflow to automatically update n8n)

It seems like this part causes the error (Same code as the other workflows, Just a different field to check)(Thing to note is that not every row contains this field)

const staticData = getWorkflowStaticData('node');
const newTweetIds = items.map((item) => item.json['AssignedTo']);
const oldTweetIds = staticData.oldTweetIds;

if (!oldTweetIds) {
  staticData.oldTweetIds = newTweetIds;
  return items;

const actualNewTweetIds = newTweetIds.filter((id) => !oldTweetIds.includes(id));
const actualNewTweets = items.filter((data) =>
staticData.oldTweetIds = [...actualNewTweetIds, ...oldTweetIds];

return actualNewTweets;

Yes I guess the problem is exactly that, that not all of them return data and so undefined gets returned instead. I will have a look.

I came to the conclusion that it must have had something to do with the WorkFlowStaticData as it only happened when the workflow is activated

Had to do that null ended up in the data which is somehow object for JavaScript.

The bug got fixed:

Will be released with the next version. Will update here once it got released.

Amazing for updating so fast! :smiley:

Got released with [email protected]