Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug: 0.109.1 -> 0.109.2 : Migration from 0107004 to 0108002 failed #5957

Closed
wuzhiping opened this issue Jun 25, 2023 · 3 comments · Fixed by #5980
Closed

🐛 Bug: 0.109.1 -> 0.109.2 : Migration from 0107004 to 0108002 failed #5957

wuzhiping opened this issue Jun 25, 2023 · 3 comments · Fixed by #5980
Assignees
Milestone

Comments

@wuzhiping
Copy link

Migration from 0107004 to 0108002 failed ────────────────────────────────────┐│
││ Error
││ -----
││ TypeError: Cannot read properties of null (reading 'type')
││ at u (/usr/src/app/docker/main.js:1:1368013)
││ at processTicksAndRejections (node:internal/process/task_queues:96:5)
││ at async p (/usr/src/app/docker/main.js:1:1368934)
││ at async Object.t.default [as handler]
││ (/usr/src/app/docker/main.js:1:1369335)
││ at async Function.upgrade (/usr/src/app/docker/main.js:1:1334775)
││ at async InstanceWrapper.useFactory [as metatype]
││ (/usr/src/app/docker/main.js:1:892870)
││ at async Injector.instantiateClass
││ (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:355:37)
││ at async callback
││ (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:56:34)
││ at async Injector.resolveConstructorParams
││ (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:136:24)
││ at async Injector.loadInstance
││ (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:61:13)
││
││
││ Please raise an issue in our github by using following link :
││ https://github.com/nocodb/nocodb/issues/new?labels=Type%3A%20Bug&template=bug_report.md
││
││ Or contact us in our Discord community by following link :
││ https://discord.gg/5RgZmkW ( message @o1lab, @pranavxc or @wingkwong )
││
│└──────────────────────────────────────────────────────────────────────────────┘
| [Nest] 74 - 06/25/2023, 11:22:23 AM ERROR [ExceptionHandler] Cannot read properties of null (reading 'type')
| 0|main | TypeError: Cannot read properties of null (reading 'type')
| 0|main | at u (/usr/src/app/docker/main.js:1:1368013)
| 0|main | at processTicksAndRejections (node:internal/process/task_queues:96:5)
| 0|main | at async p (/usr/src/app/docker/main.js:1:1368934)
| 0|main | at async Object.t.default [as handler] (/usr/src/app/docker/main.js:1:1369335)
| 0|main | at async Function.upgrade (/usr/src/app/docker/main.js:1:1334775)
| 0|main | at async InstanceWrapper.useFactory [as metatype] (/usr/src/app/docker/main.js:1:892870)
| 0|main | at async Injector.instantiateClass (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:355:37)
| 0|main | at async callback (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:56:34)
| 0|main | at async Injector.resolveConstructorParams (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:136:24)
| 0|main | at async Injector.loadInstance (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:61:13)

@wuzhiping wuzhiping changed the title 0.109.1 -> 0.109.2 : Migration from 0107004 to 0108002 failed 🐛 Bug: 0.109.1 -> 0.109.2 : Migration from 0107004 to 0108002 failed Jun 25, 2023
@WeT-Klb
Copy link
Contributor

WeT-Klb commented Jun 27, 2023

I have exactly the same problem on a QNAP-NAS. When upgrading to 0.109.2 the console show this:

[Nest] 12 - 06/27/2023, 6:25:34 AM ERROR [ExceptionHandler] Cannot read properties of undefined (reading 'cn')
TypeError: Cannot read properties of undefined (reading 'cn')
at u (/usr/src/app/docker/main.js:1:1368450)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async p (/usr/src/app/docker/main.js:1:1368934)
at async Object.t.default [as handler] (/usr/src/app/docker/main.js:1:1369335)
at async Function.upgrade (/usr/src/app/docker/main.js:1:1334775)
at async InstanceWrapper.useFactory [as metatype] (/usr/src/app/docker/main.js:1:892870)
at async Injector.instantiateClass (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:355:37)
at async callback (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:56:34)
at async Injector.resolveConstructorParams (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:136:24)
at async Injector.loadInstance (/usr/src/app/node_modules/@nestjs/core/injector/injector.js:61:13)

Only it seems the reason in first line differs from the writer before.
When switching back to 0.109.1 everything works again - but not sure if the data in database already changed something during trying to upgrade.

@pranavxc
Copy link
Member

We have fixed the issues in the latest release, please try it out.

When switching back to 0.109.1 everything works again - but not sure if the data in database already changed something during trying to upgrade.

In situations where the upgrader encounters a failure midway, it initiates a rollback process that undoes any changes made. This seamless process occurs because we execute the upgrader within a transaction, allowing for smooth downgrading without any issues. However, it is important to note that downgrading is not feasible if there is a newly added Knex migration present.

@WeT-Klb
Copy link
Contributor

WeT-Klb commented Jun 28, 2023

Today i tried the the new upgrade - and it seems all data are still present. At least this time the upgrade worked smoothly.

@wingkwong wingkwong added this to the 0.109.3 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants