N8n 1.33.0 Init Problem There was a problem loading init data: Unauthorized

Hello, when updating n8n from version 1.30.0 to 133.0, a login error occurs
Init Problem There was a problem loading init data: Unauthorized

I’m using Docker with Postgres

Follow my docker compose code

version: '3.8'

volumes:
  db_storage:
  n8n_storage:

services:
  postgres:
    image: postgres:16
    restart: always
    environment:
      - POSTGRES_USER
      - POSTGRES_PASSWORD
      - POSTGRES_DB
      - POSTGRES_NON_ROOT_USER
      - POSTGRES_NON_ROOT_PASSWORD
    volumes:
      - db_storage:/var/lib/postgresql/data
      - ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
      interval: 5s
      timeout: 5s
      retries: 10

  n8n:
    image: docker.n8n.io/n8nio/n8n:1.30.0
    restart: always
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
      - DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
      - DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
      - GENERIC_TIMEZONE=America/Sao_Paulo
    ports:
      - 5678:5678
    links:
      - postgres
    volumes:
      - n8n_storage:/home/node/.n8n
    depends_on:
      postgres:
        condition: service_healthy

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @Larri_Benedetti

I do not see that you have configured https, so that workaround should help

1 Like

I am getting the same error, I am using the Postgres with a worker docker compose instance. I had n8n running perfectly fine up until last month, but when I updated my container, my “docker-compose.yml” and my “init-data.sh”, I started having some errors.

Already tried using:

• user-management:reset
• ldap:reset
• using an earlier commit of init-data.sh

But no to no avail, any ideas?

Have you tried to set the N8N_SECURE_COOKIE?

Yes, I just tried setting N8N_SECURE_COOKIE=FALSE on my .env file and I am still getting the “Init Error” followed by “Error while submitting results”.

I am also getting “WARN[0000] /root/docker/docker-compose.yml: version is obsolete” which I don’t believe it was there before I updated n8n.

Edit: So I was setting up the N8N_SECURE_COOKIE on my .env file instead of configuring like this page shows. Setting the cookie to false worked for me, thank you.

1 Like

So not sure if this is a consequence of setting N8N_SECURE_COOKIE to false, but now I can’t log in to my google drive account, I get {“status”: “error”, “message”: “Unauthorized” }, again this was working perfectly fine before the update.

maybe your token is expired?

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