I have a new problem on Google Sheet Oauth credentials. When trying to create such credential I have the following error after clicking on “Sign in with Google”
Problem creating credential
SQLITE_CONSTRAINT: FOREIGN KEY constraint failed
I tried other credential types and I didn’t have errors so it seems specific to google sheet ?
See attached, I tried a Google Drive credential with the same Oauth IDs and got no error.
Hi @Valerian_Lebert Sorry you’re running into this - this should have been fixed, as our engineers had eyes on this last week Can you update / restart your instance and see if that fixes it up?
Hi @Valerian_Lebert - ah, sorry about that. Are you also self-hosting n8n?
Could you try to update to latest, and also try creating new credentials? If you’re self-hosting, there may be an issue with your database If that fails, it might be worth looking for any other signs of corruption (and then try fixing them as per Recovering Data From A Corrupt SQLite Database), or recover a backup of your database. It also would be worth to see if you’ve got any other information in your server logs, too
I think I am on the latest as I don’t have any notification of a new version (updated this morning). Maybe the fix you are talking about is not yet released ??
I could create new credentials, only Google Sheets seems to cause problem (of course I didn’t try EVERY credentials type but I tried Airtable, Google Drive …)
I would be glad to provide useful logs. Which logs could be helpful ?
Don’t worry, I wouldn’t have asked you to try every credential
And the fix was something that went out on cloud What do your instance or Docker logs have to say? Any logs would be helpful! You may need to set your N8N_LOG_LEVEL to DEBUG for this
Could be that during a previous upgrade something went wrong and it was downgraded. What I would do is export all of your workflows and credentials, Stop n8n, rename the current database (just so you have a backup), Start n8n, Go through the initial setup then import the workflows and credentials and see if that helps.
At the end it’s not a blocking issue as I can just spam the click button to create the credential but it still a strange issue. Tell me if you need other material to investigate on your side
From what I can see in this thread it may be fixed in a new release already, I am just not sure which release fixed it. I know I am not able to reproduce this on 1.6.1 which is what I am currently running though.