Google Cloud Natural Language, credentials error too "long value"?

Hi All,

Im new to n8n, but have done quite a bit of automation before. First of all - I must say n8n is by far the most powerfull and easy tool I have tried to date :muscle:

I ran into a problem that I do not seem to be able to fix. I want to use the Google Cloud Natural Language node in my setup to do sentiment analysis.

I have an active google Oauth account that I already use for other nodes (sheet and drive).

Trying to setup my Google console with the same Oauth account, but I have to enter it again with key+secret. When I do this get this error when pressing “sign in with Google”:

Problem creating credential
value too long for type character varying(32)

Looking at my logs, I see the same error

Mar 08 22:26:11 ERROR RESPONSE
Mar 08 22:26:11 QueryFailedError: value too long for type character varying(32)
Mar 08 22:26:11 at new QueryFailedError (/app/code/node_modules/typeorm/error/QueryFailedError.js:11:28)
Mar 08 22:26:11 at PostgresQueryRunner.<anonymous> (/app/code/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:247:31)
Mar 08 22:26:11 at step (/app/code/node_modules/tslib/tslib.js:141:27)
Mar 08 22:26:11 at Object.throw (/app/code/node_modules/tslib/tslib.js:122:57)
Mar 08 22:26:11 at rejected (/app/code/node_modules/tslib/tslib.js:113:69)
Mar 08 22:26:11 at runMicrotasks (<anonymous>)
Mar 08 22:26:11 at processTicksAndRejections (internal/process/task_queues.js:95:5) {
Mar 08 22:26:11 length: 98,
Mar 08 22:26:11 severity: 'ERROR',
Mar 08 22:26:11 code: '22001',
Mar 08 22:26:11 detail: undefined,
Mar 08 22:26:11 hint: undefined,
Mar 08 22:26:11 position: undefined,
Mar 08 22:26:11 internalPosition: undefined,
Mar 08 22:26:11 internalQuery: undefined,
Mar 08 22:26:11 where: undefined,
Mar 08 22:26:11 schema: undefined,
Mar 08 22:26:11 table: undefined,
Mar 08 22:26:11 column: undefined,
Mar 08 22:26:11 dataType: undefined,
Mar 08 22:26:11 constraint: undefined,
Mar 08 22:26:11 file: 'varchar.c',
Mar 08 22:26:11 line: '633',
Mar 08 22:26:11 routine: 'varchar',
Mar 08 22:26:11 query: 'INSERT INTO "public"."credentials_entity"("name", "data", "type", "nodesAccess", "createdAt", "updatedAt") VALUES ($1, $2, $3, $4, DEFAULT, DEFAULT) RETURNING "id", "createdAt", "updatedAt"',
Mar 08 22:26:11 parameters: [
Mar 08 22:26:11 'Google Cloud Natural Language account',
Mar 08 22:26:11 '***** Edited: not for your eyes *****',
Mar 08 22:26:11 'googleCloudNaturalLanguageOAuth2Api',
Mar 08 22:26:11 '[{"nodeType":"n8n-nodes-base.googleCloudNaturalLanguage","date":"2022-03-08T21:26:11.454Z"}]'
Mar 08 22:26:11 ]
Mar 08 22:26:11 }

So I guess the details trying to be saved are longer than defined length.
Since I could do it before, I guess it must have something to do with the node I’m using.

Looking at the node name (in logs) it is called googleCloudNaturalLanguageOAuth2Api which is 35 characters long…

Any tips or ideas how to solve this would be appreciated, thanks in advance.

// Lars Emil

Welcome to the community @biozork

Thanks for bringing this up. I will have a look at it.

What database are you using? SQLite (the default one), Postgres, MySQL?

Ok found the issue when using a database different than SQLite. It turns out that SQLite does not enforce varchar limits. Therefore, we did not notice the error before. I will fix the issue tomorrow, and it will be available in the next release. Again, thanks for bringing this up.

3 Likes

Awesome. Thank you for a quick reaction.

I have installed n8n via Cloudron(.io), so I’m not completely sure if it uses mysql or postgresql

Got fixed. We will let you know when it’s released.

3 Likes

Got released with [email protected]

1 Like

I can confirm it works for me now. Thanks!

1 Like

Google Cloud Natural Language , credentials error too long value* "? … I have an active google Oauth account that I love language quiz already use for other … The credentials used to authenticate this device. … [Output only] The error message of the most recent error , … Builder setNumId(long value ). Explicit(Value to Int64). public static explicit operator long (Value value). Extracts the integer value from a Value. The Apex programming language is saved and runs in the cloud —the … value so that it represents a Long value which has a wider range, …Parameter …