After updating our self hosted n8n instance to version 1.1.1 I encountered the following error message from the Gmail trigger:
ERROR: Authorization failed - please check your credentials
Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See Integrating Google Sign-In into your web app | Authentication | Google for Developers .
Before updating the flow was working just fine. The trouble started directly after updating our n8n instance to v1.1.1. We tried to fix the issue by updating n8n to version 1.2.1 but the issue still persists.
In addition I’ve also tried to fix this by refreshing the Gmail connection in n8n, and I also made sure the configuration in Google console was still right. I even tried to connect to Gmail by using a service account instead of oath but unfortunatly this still didn’t fix the issue for me.
Jon
August 14, 2023, 3:43pm
3
Hey @Erhan_Ozturk ,
Welcome to the community
I just checked my own instance and the GMail nodes I set up months ago are still working on 1.2.1, Are you using OAuth or a Service Account?
When you tried to authenticate again did the initial connection work?
Hi @Jon I’m using OAuth for this connection. I had no trouble to reauthenticate the connection, that part worked just like expected.
Jon
August 15, 2023, 8:07am
5
Hey @Erhan_Ozturk ,
Are there any errors in the docker logs? Assuming you are using docker
Hi @Jon I’m indeed using docker. See below for the error I saw in the docker logs. Other than this I didn’t encounter anything out of the ordinary
There was a problem in ‘Gmail Trigger’ node in workflow ‘36’: ‘Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. ’ “{\n node: ‘Gmail Trigger’,\n workflowId: ‘36’,\n error: NodeApiError: Authorization failed - please check your credentials\n at Object.googleApiRequest (/home/node/.n8n/nodes/node_modules/n8n-nodes-base/nodes/Google/Gmail/GenericFunctions.ts:153:9)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at Object.poll (/home/node/.n8n/nodes/node_modules/n8n-nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts:251:19)\n … 4 lines matching cause stack trace …\n at Timeout.retryFunction [as _onTimeout] (/usr/local/lib/node_modules/n8n/dist/ActiveWorkflowRunner.js:499:17) {\n context: {},\n timestamp: 1692017851837,\n severity: ‘warning’,\n node: {\n parameters: [Object],\n id: ‘da098599-d578-420b-900a-e1d34b84f286’,\n name: ‘Gmail Trigger’,\n type: ‘n8n-nodes-base.gmailTrigger’,\n typeVersion: 1,\n position: [Array],\n credentials: [Object]\n },\n description: ‘Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. ’,\n httpCode: null,\n [cause]: NodeApiError: Authorization failed - please check your credentials\n at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1103:19)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at Object.googleApiRequest (/home/node/.n8n/nodes/node_modules/n8n-nodes-base/nodes/Google/Gmail/GenericFunctions.ts:87:20)\n at Object.poll (/home/node/.n8n/nodes/node_modules/n8n-nodes-base/nodes/Google/Gmail/GmailTrigger.node.ts:251:19)\n at executeTrigger (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/ActiveWorkflows.js:58:38)\n at ActiveWorkflows.activatePolling (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/ActiveWorkflows.js:70:9)\n at ActiveWorkflows.add (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/ActiveWorkflows.js:40:62)\n at ActiveWorkflowRunner.add (/usr/local/lib/node_modules/n8n/dist/ActiveWorkflowRunner.js:460:17)\n at Timeout.retryFunction [as _onTimeout] (/usr/local/lib/node_modules/n8n/dist/ActiveWorkflowRunner.js:499:17) {\n context: {},\n timestamp: 1692017851837,\n severity: ‘warning’,\n node: [Object],\n httpCode: ‘401’,\n description: ‘Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. ’,\n [cause]: [Error]\n }\n },\n file: ‘GmailTrigger.node.js’,\n function: ‘poll’\n}”
A fresh install of version 1.2.1 has fixed the problem
2 Likes
system
Closed
August 24, 2023, 5:28am
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.