[issue] Issue validating invite token

Hello,

I have just deployed 1.17.1 n8n image on AWS ECS.
The instance is up and running.
I have sent invite links but those links produce an “Issue validating invite token / Invalid invite URL”

Capture d’écran 2023-11-22 à 14.28.40

Any ideas how to fix this issue ?

Thanks !

Information on your n8n setup

  • n8n version: 1.17.1
  • Database (default: SQLite): PostGreSQL
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker deployed on AWS ECS
  • Operating system: linux

Hi @Jean-Baptiste_LANVIN, welcome to the community!

I am so sorry you’re having trouble.

Can you confirm how you are distributing the invite links? Are you sending them out via email or are you using the link provided by n8n when SMTP isn’t configured?

And can you confirm the link structure is https://$hostname/signup?inviterId=$uuid&inviteeId=$uuid (just to make sure that no email client has stripped out any relevant part)?

Lastly, is there any error in your server logs when running into this problem, for example this one?

I am asking because I just tried reproducing this problem using an n8n instance deployed through docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n:1.17.1, but didn’t run into any trouble with the invite link copied to my clipboard.

Hi @MutedJam, thanks for your reply !

We are using the link provided by n8n and the structure is indeed https://$hostname/signup?inviterId=$uuid&inviteeId=$uuid

We have no error in the server logs.
We specified the following environment variables :

  • N8N_HOST
  • N8N_PROTOCOL
  • WEBHOOK_URL

Thanks again for you help :pray:

Hi @Jean-Baptiste_LANVIN, to narrow down the problem, can you remove the SMTP configuration from your environment variables (or config file), then re-deploy your n8n instance?

Afterwards, can you invite a new user? n8n should now copy the invite link to your clipboard rather than sharing it through email. If you test this invite link in a new incognito/private browser window, are you still running into the same problem?

Hi @MutedJam,
Sorry, maybe I was not clear enough but we don’t use SMTP configuration.
We are not sharing the invite links by email but just copying the links created by n8n.

Can you share your exact docker run commands (or better a combined docker compose config file) using which I can reproduce the problem on my end? So far my invitation links seem to work as expect.

I run n8n with ECS with the official image.
:bulb: noted that inviteeId and inviterId are the same in the invite link

Here is the task definition :

[
    {
        "logConfiguration": {
        "logDriver": "awslogs",
        "options": {
            "awslogs-group": "n8n_logs",
            "awslogs-region": "eu-west-3",
            "awslogs-stream-prefix": "n8n"
        }
        },
        "portMappings": [
        {
            "hostPort": 0,
            "protocol": "tcp",
            "containerPort": 5678
        }
        ],
        "secrets": [
          {
            "name": "DB_POSTGRESDB_DATABASE",
            "valueFrom": "database"
          },
          {
            "name": "DB_POSTGRESDB_HOST",
            "valueFrom": "host"
          },
          {
            "name": "DB_POSTGRESDB_PORT",
            "valueFrom": "port"
          },
          {
            "name": "DB_POSTGRESDB_USER",
            "valueFrom": "username"
          },
          {
            "name": "DB_POSTGRESDB_PASSWORD",
            "valueFrom": "password"
          }
        ],
        "environment": [
          {
            "name": "DB_TYPE",
            "value": "postgresdb"
          },
          {
            "name": "DB_POSTGRESDB_SCHEMA",
            "value": "public"
          },
          {
            "name": "N8N_HOST",
            "value": "n8n.eu-west-3.team"
          },
          {
            "name": "N8N_PROTOCOL",
            "value": "https"
          },
          {
            "name": "NODE_ENV",
            "value": "production"
          },
          {
            "name": "WEBHOOK_URL",
            "value": "https://n8n.eu-west-3.data.team/"
          }
        ],
        "cpu": 0,
        "memoryReservation": 1000,
        "volumesFrom": [],
        "image": "n8n:1.17.1",
        "essential": true,
        "name": "n8n",
        "mountPoints": [
          {
            "readOnly": false,
            "containerPath": "/home/node/.n8n",
            "sourceVolume": "n8n"
          }
      ]
    }

Hi @Jean-Baptiste_LANVIN, I am afraid I am not familiar with ECS. Are you able to reproduce this locally? And does the problem persist with the current n8n version 1.18.0?

Same problem with n8n 1.20.0. After enabling debug-level logging, I found out that the invite links are generated incorrectly. The “inviteeId” and “inviterId” are the same.

After digging a little more I saw that the “inviteeId” is the value that is also used as “inviter”.

The logged message was: “Request to resolve signup token failed because the ID of the inviter and/or the ID of the invitee were not found in database”

Not sure if the links sent by e-mail are also incorrect since we use the “copy invite link” menu from the Users page and then send it manually.

Having the same issue, 1.20.0. https://n8n.mydomain.com/signup?inviterId=b15e56b5-6295-47b7-8a35-7f4ec4c83f39&inviteeId=b15e56b5-6295-47b7-8a35-7f4ec4c83f39

STR

  1. invite new user
  2. copy url (from context menu)
  3. open in new incognito window

AR
Issue validating invite token

Does this persist for you at 1.21?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.