# Error latest version n8n@0.189.0

**URL:** <https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345>\
**Category:** Questions\
**Tags:** deployment\
**Created:** [August 4, 2022, 11:56am UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345 "2022-08-04T11:56:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mulen](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mulen](https://community.n8n.io/u/Mulen)\
**Post date:** [August 4, 2022, 11:56am UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/1 "2022-08-04T11:56:32Z")

</div>

Error upgrading to latest version, we use mysql as the database of n8n.

Our prior version of n8n was 0.188.0.

```auto
Initializing n8n process

/usr/local/lib/node_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:43

                nodes.forEach((node) => {

                      ^

TypeError: nodes.forEach is not a function

    at /usr/local/lib/node_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:43:23

    at Array.forEach (<anonymous>)

    at /usr/local/lib/node_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:41:23

    at runChunked (/usr/local/lib/node_modules/n8n/dist/src/databases/utils/migrationHelpers.js:75:15)

    at processTicksAndRejections (node:internal/process/task_queues:96:5)

    at async AddNodeIds1658932910559.up (/usr/local/lib/node_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:40:9)

```

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [August 4, 2022, 12:35pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/2 "2022-08-04T12:35:23Z")

</div>

Hi @Mulen, I am sorry to hear you’re having trouble. How are you deploying n8n? Are using docker?

---

<div class="post-metadata">

**Author:** ![Mulen](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mulen](https://community.n8n.io/u/Mulen)\
**Post date:** [August 4, 2022, 12:38pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/3 "2022-08-04T12:38:14Z")

</div>

@MutedJam Hi.

Yes docker. Every upgrade that i did was smooth but now from 0.188.0 to 0.189.0 it throws this error in logs.

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [August 4, 2022, 12:59pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/4 "2022-08-04T12:59:43Z")

</div>

Hi @Mulen, I just gave this a go on my end by first running the below docker compose config:

```nohighlight
version: '3.1'

services:

  db:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: n8n
    volumes:
      - ./dbdata:/var/lib/mysql

  n8n:
    image: n8nio/n8n:0.188.0
    restart: unless-stopped
    ports:
      - 5678:5678
    environment:
      - DB_TYPE=mysqldb
      - DB_MYSQLDB_DATABASE=n8n
      - DB_MYSQLDB_HOST=db
      - DB_MYSQLDB_USER=root
      - DB_MYSQLDB_PASSWORD=example
      - N8N_DIAGNOSTICS_ENABLED=false
      - N8N_BASIC_AUTH_ACTIVE=false
      - N8N_USER_MANAGEMENT_DISABLED=true
    depends_on:
      - db
    volumes:
      - ./data:/home/node/.n8n

```

n8n started as expected. I then created a dummy workflow including at least one node. Lastly I removed all containers, changed the n8n version to 0.189.0. However, n8n would start again as expected.

So I am afraid I can’t quite see where the migration is failing for you unfortunately. Are you perhaps using an image other than `n8nio/n8n:0.189.0` for your n8n container (a custom one for example)?

@mutdmour do you by any chance have an idea what might be wrong here? It seems the migration has been added in this PR of yours: [N8n 4168 add node ids by mutdmour · Pull Request #3788 · n8n-io/n8n (github.com)](https://github.com/n8n-io/n8n/pull/3788)

---

<div class="post-metadata">

**Author:** ![Mulen](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mulen](https://community.n8n.io/u/Mulen)\
**Post date:** [August 4, 2022, 1:05pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/5 "2022-08-04T13:05:05Z")

</div>

My docker compose file:

```auto
version: '3.1'

services:
  n8n:
    image: n8nio/n8n
    container_name: n8n
    networks: 
      techtools:
        ipv4_address: 172.19.0.7
    dns:
      - 172.19.0.9
    restart: always
    volumes:
      - ~/.n8n:/home/node/.n8n

    environment:
      DB_TYPE: $DBTYPE
      DB_MYSQLDB_DATABASE: $DB
      DB_MYSQLDB_HOST: $DBHOST
      DB_MYSQLDB_PORT: $DBPORT
      DB_MYSQLDB_USER: $DBUSER
      DB_MYSQLDB_PASSWORD: $DBPASSWORD
      N8N_BASIC_AUTH_ACTIVE: $N8NAUTH
      N8N_BASIC_AUTH_USER: $N8NUSER
      N8N_BASIC_AUTH_PASSWORD: $N8NPASS
      N8N_ENCRYPTION_KEY: $ENCRKEY
      EXECUTIONS_PROCESS: $EXECPROC
      NODE_TLS_REJECT_UNAUTHORIZED: 0
      TZ: $TIMEZONE
      N8N_DIAGNOSTICS_ENABLED: 'false'
      N8N_USER_MANAGEMENT_DISABLED: 'true'
      #N8N_USE_DEPRECATED_REQUEST_LIB: 'true'
      #N8N_LOG_LEVEL: verbose
    # Wait 5 seconds to start n8n to make sure that PostgreSQL is ready
    # when n8n tries to connect to it
    #EXECUTIONS_PROCESS: main = single process / low RAM, own = multiple process / high RAM
    command: /bin/sh -c "sleep 5; n8n start"
networks:
  techtools:
    external: true
    name: techtools_network

```

Env Variables:

```auto
DBTYPE=mysqldb
DB=n8n
DBHOST=<IP>
DBPORT=3306
DBUSER=n8n
DBPASSWORD=<PASS>
N8NAUTH=true
N8NUSER=n8n
N8NPASS=<PASS>
TIMEZONE=Europe/Athens
ENCRKEY=<KEY>
EXECPROC=main

```

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [August 4, 2022, 1:23pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/6 "2022-08-04T13:23:02Z")

</div>

Hm, this is looking good to me. Do you by any chance have a workflow without any nodes that n8n would try to migrate when hitting this error?

---

<div class="post-metadata">

**Author:** ![Mulen](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mulen](https://community.n8n.io/u/Mulen)\
**Post date:** [August 4, 2022, 1:28pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/7 "2022-08-04T13:28:57Z")

</div>

No, all my workflows have nodes. 😕

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [August 4, 2022, 1:33pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/8 "2022-08-04T13:33:41Z")

</div>

So in that case I’d say let’s wait if @mutdmour has any more insights to share on what this migration does.

If you urgently need to upgrade you can consider exporting your credentials and workflows from your 0.188.0 n8n instance [using the CLI](https://docs.n8n.io/reference/cli-commands/#export-workflows-and-credentials), stop your old 0.188.0 instance and start n8n@0.189.0 using a fresh database, so no migration needs to happen. You can then import your workflows and credentials again.

---

<div class="post-metadata">

**Author:** ![Mulen](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mulen](https://community.n8n.io/u/Mulen)\
**Post date:** [August 4, 2022, 1:41pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/9 "2022-08-04T13:41:40Z")

</div>

Thanks.

I’ll wait, maybe @mutdmour has a solution. I can’t risk doing a clean install.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 4, 2022, 2:31pm UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/10 "2022-08-04T14:31:55Z")

</div>

Hey @Mulen,

This is something we are aware of and a fix is being worked on, Could you add your details onto this Github Issue?

> <https://github.com/n8n-io/n8n/issues/3826>
>
> \*\*Describe the bug\*\*
> Just after the latest update of the Docker image (n8nio/n8…n:latest@sha256:3b9eb2c6996bbae3044033a4bc4c18108b6de218562ded2ae3f36f9d9aa66980), the container is unhealthy and I now have these errors in logs
> 
> \`\`\`
> 2022-08-03T19:05:25+02:00	/usr/local/lib/node\_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:43
> 2022-08-03T19:05:17+02:00 at async AddNodeIds1658932910559.up (/usr/local/lib/node\_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:40:9)
> 2022-08-03T19:05:17+02:00 at processTicksAndRejections (node:internal/process/task\_queues:96:5)
> 2022-08-03T19:05:17+02:00 at runChunked (/usr/local/lib/node\_modules/n8n/dist/src/databases/utils/migrationHelpers.js:75:15)
> 2022-08-03T19:05:17+02:00 at /usr/local/lib/node\_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:41:23
> 2022-08-03T19:05:17+02:00 at Array.forEach (\<anonymous\>)
> 2022-08-03T19:05:17+02:00 at /usr/local/lib/node\_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:43:23
> 2022-08-03T19:05:17+02:00	TypeError: nodes.forEach is not a function
> 2022-08-03T19:05:17+02:00 ^
> 2022-08-03T19:05:17+02:00 nodes.forEach((node) =\> {
> 2022-08-03T19:05:17+02:00	/usr/local/lib/node\_modules/n8n/dist/src/databases/migrations/mysqldb/1658932910559-AddNodeIds.js:43
> \`\`\`
> 
> \*\*To Reproduce\*\*
> Steps to reproduce the behavior:
> 1. Update the Docker image of N8N to n8nio/n8n:latest@sha256:3b9eb2c6996bbae3044033a4bc4c18108b6de218562ded2ae3f36f9d9aa66980
> 
> \*\*Expected behavior\*\*
> The migration should execute fine
> 
> \*\*Environment (please complete the following information):\*\*
> - OS: Docker (Ubuntu 22.04 LTS host)
> - n8n Version: n8nio/n8n:latest@sha256:3b9eb2c6996bbae3044033a4bc4c18108b6de218562ded2ae3f36f9d9aa66980
> - Node.js Version: 16.16.0
> - Database system: mysqldb
> - Operation mode: N/A
> 
> \*\*Additional context\*\*
> Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![Mulen](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mulen](https://community.n8n.io/u/Mulen)\
**Post date:** [August 5, 2022, 8:41am UTC](https://community.n8n.io/t/error-latest-version-n8n-0-189-0/16345/11 "2022-08-05T08:41:52Z")

</div>

Fixed with newest version n8n@0.189.1

Thank you.
