Error when creating Firestore or Realtime DB credentials

I tried creating both Firestore and Realtime Database credentials from withn the node and from the main menu. I get the same varying(32) error. I have activated APIs, added the correct redirect etc. etc. from the Google | Docs page.

However, I can add the Google OAuth2 API

Any advice to conquer this error? Thank you.

Just to confirm. Did you follow the steps below?

1 Like

That looks a database issue to me, it is expecting 32 characters but getting more.

What version of n8n are you running and are you using the SQLite database or did you opt for something else?

Hi, @RicardoE105
Yes that’s what I did, I’ve used GCP for a while so I had some idea, I followed it anyway. I believe I linked to it in the OP.

Running 0.139.1 on PostgreSQL 12.8 (via CapRover so I assume it’s also using SQLite) I’ve already reinstalled once because of the issue I had after upgrading from 116.1 to 139.1 where I (still) couldn’t see any Input or Output Data in the expression modals.

Are there any config options I should change?

Thank you

Can you share the workflow you are using? Just select, copy and then paste here.

Hi @RicardoE105

It’s a blank workflow except for Realtime Database. So it’s probably not a specific workflow issue. It’s a credential issue.

For example, I can’t add the creds via the main menu either, even with a completely blank Workflow

Hey @bocaz,

I tested it out and it is working fine for me. How are you hosting n8n? As @jon mentioned, it can be an issue with your DB.

@harshil1712 See my above post for setup details

What is the recommended version of PostgreSQL? 12 didn’t seem to work and now 12.8 is apparently causing me issues. Does anyone have a fully working install from which they would inform me of their version of Postgres.

Thank you

The recommended version for Postgres is 13+. You may want to check your existing DB. Are you facing the same issue with other nodes as well?

1 Like


Thanks for that, I will try with Postgres 13. I assume 13.4 is okay?

Yes the issue was with any OAuth credentials/ Google nodes. Issue is present on Postgres 12 as well and seems to be just about any version of n8n from 0.116.1+ (I didn’t try them all but that’s the lowest I went)

By the way, what is the latest stable version of n8n, 0.142.0?

Okay, so I’ve tried Postgres 12, 12.8, 13 and 13.4. all with 0.142.0 and I still get that same error:

Problem creating credentials

There was a problem creating the credentials:
value too long for type character varying(32)

I can’t understand why except that I’m running it using CapRover - but no one seems to be having that issue and CapRover gets 0.142.0 from the n8n docker repo, so it’s not altered. Postgres seems to spin up fine.

Here’s (some of) my logs:

[75] ERROR: value too long for type character varying(32)
[75] STATEMENT: INSERT INTO "public"."credentials_entity"("name", "data", "type", "nodesAccess", "createdAt", "updatedAt") VALUES ($1, $2, $3, $4, DEFAULT, DEFAULT) RETURNING "id", "createdAt", "updatedAt"

Any suggestions appreciated.

The only other thing to note is that I’m on Ubuntu, and this mentions Debian (I know Ubuntu is built on Debian, but, well I’m just coming with anything at this point)

[1] LOG: starting PostgreSQL 13.4 (Debian 13.4-4.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

Found some promising results based on the credentials_entity table in Postgres:

Specifically: n8n/1587669153312-InitialMigration.ts at d3a1d3ffefbbe2be42c960cd7f5bf67fd0846269 · n8n-io/n8n · GitHub

In the end I had to make open up the Postgres for public access and run:

ALTER TABLE "public"."credentials_entity" ALTER COLUMN "type" SET DATA TYPE varchar(128);

It was set as varchar(32) and it is now working.

1 Like