Cannot add API Credentials

Hi there,

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.


Part of API key removed for security reasons. Error Message at the lower right.

Does someone know what I can do about it?
BR soeren

Welcome to the community @soerenh

That is quite strange. What version of n8n are you running?

I’m using the docker image, tagged latest.
The instance itself says 0.129.0

i redeployed the whole thing just in case something broke but nope, the freshly started container gets the same error on creating credentials

hope that helps

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)

Ok, i fixed it. Somehow.

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.

Glad to hear that you could get it working and thanks for sharing the solution for also others to find in the future!

Have fun!