i’ve started using n8n a month ago and run into a problem. unfortunatly n8n does not let my create Credentials anymore. I discovered it while adding n8n yesterday and tried out of curiosity other apis (eg home assistant) and got the same error.
I was able to get some logs out. I’ve just tried to add home assistant, got the known error message and the container log states the following.
ERROR RESPONSE
Error: Cannot update entity because entity id is not set in the entity.
at /usr/local/lib/node_modules/n8n/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js:129:39
at Array.map ()
at ReturningResultsEntityUpdator. (/usr/local/lib/node_modules/n8n/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js:123:46)
at step (/usr/local/lib/node_modules/n8n/node_modules/typeorm/node_modules/tslib/tslib.js:143:27)
at Object.next (/usr/local/lib/node_modules/n8n/node_modules/typeorm/node_modules/tslib/tslib.js:124:57)
at /usr/local/lib/node_modules/n8n/node_modules/typeorm/node_modules/tslib/tslib.js:117:75
at new Promise ()
at Object.__awaiter (/usr/local/lib/node_modules/n8n/node_modules/typeorm/node_modules/tslib/tslib.js:113:16)
at ReturningResultsEntityUpdator.insert (/usr/local/lib/node_modules/n8n/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js:88:24)
at InsertQueryBuilder. (/usr/local/lib/node_modules/n8n/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:76)
at step (/usr/local/lib/node_modules/n8n/node_modules/typeorm/node_modules/tslib/tslib.js:143:27)
at Object.next (/usr/local/lib/node_modules/n8n/node_modules/typeorm/node_modules/tslib/tslib.js:124:57)
at fulfilled (/usr/local/lib/node_modules/n8n/node_modules/typeorm/node_modules/tslib/tslib.js:114:62)
The docker container is managed by rancher and i just only put the env info in the secrets instead of directly in the workload (so it is hidden all the time) and then redeployed.
As i think this should not change anything but now it stores again and adding API credentials works again. I don’t really understand why its working now but it is.