Error when migrating from 4.1.1 to 4.2.x

I encountered an error while upgrading my instance from PeerTube 4.1.1 to 4.2.x using YunoHost.

I previously made a similar post on the YunoHost forum, and someone else got the same error, but no solutions have been found, and I believe it’s not caused by YunoHost (I may be wrong), so I’m posting here.

The main error message seems to be here:

2022-07-25 04:15:55,675: DEBUG - + sudo -u peertube env PATH=/opt/node_n/n/versions/node/16/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production /opt/node_n/n/versions/node/16/bin/node dist/scripts/migrations/peertube-4.2.js
2022-07-25 04:15:59,746: DEBUG - Generate avatar miniatures from existing avatars.
2022-07-25 04:24:28,706: DEBUG - Error
2022-07-25 04:24:28,708: DEBUG -     at Query.run (/var/www/peertube/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)
2022-07-25 04:24:28,708: DEBUG -     at /var/www/peertube/node_modules/sequelize/lib/sequelize.js:311:28
2022-07-25 04:24:28,709: DEBUG -     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-07-25 04:24:28,709: DEBUG -     at async PostgresQueryInterface.select (/var/www/peertube/node_modules/sequelize/lib/dialects/abstract/query-interface.js:407:12)
2022-07-25 04:24:28,709: DEBUG -     at async Function.findAll (/var/www/peertube/node_modules/sequelize/lib/model.js:1134:21) {
2022-07-25 04:24:28,709: DEBUG -   name: 'SequelizeDatabaseError',
2022-07-25 04:24:28,709: DEBUG -   parent: error: column Actor->Avatars.actorId does not exist
2022-07-25 04:24:28,709: DEBUG -       at Parser.parseErrorMessage (/var/www/peertube/node_modules/pg-protocol/dist/parser.js:287:98)
2022-07-25 04:24:28,709: DEBUG -       at Parser.handlePacket (/var/www/peertube/node_modules/pg-protocol/dist/parser.js:126:29)
2022-07-25 04:24:28,709: DEBUG -       at Parser.parse (/var/www/peertube/node_modules/pg-protocol/dist/parser.js:39:38)
2022-07-25 04:24:28,709: DEBUG -       at Socket.<anonymous> (/var/www/peertube/node_modules/pg-protocol/dist/index.js:11:42)
2022-07-25 04:24:28,709: DEBUG -       at Socket.emit (node:events:527:28)
2022-07-25 04:24:28,710: DEBUG -       at Socket.emit (node:domain:475:12)
2022-07-25 04:24:28,710: DEBUG -       at addChunk (node:internal/streams/readable:315:12)
2022-07-25 04:24:28,710: DEBUG -       at readableAddChunk (node:internal/streams/readable:289:9)
2022-07-25 04:24:28,710: DEBUG -       at Socket.Readable.push (node:internal/streams/readable:228:10)
2022-07-25 04:24:28,710: DEBUG -       at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
2022-07-25 04:24:28,710: DEBUG -     length: 122,
2022-07-25 04:24:28,710: DEBUG -     severity: 'ERROR',
2022-07-25 04:24:28,710: DEBUG -     code: '42703',
2022-07-25 04:24:28,710: DEBUG -     detail: undefined,
2022-07-25 04:24:28,710: DEBUG -     hint: undefined,
2022-07-25 04:24:28,711: DEBUG -     position: '8604',
2022-07-25 04:24:28,711: DEBUG -     internalPosition: undefined,
2022-07-25 04:24:28,711: DEBUG -     internalQuery: undefined,
2022-07-25 04:24:28,711: DEBUG -     where: undefined,
2022-07-25 04:24:28,711: DEBUG -     schema: undefined,
2022-07-25 04:24:28,711: DEBUG -     table: undefined,
2022-07-25 04:24:28,711: DEBUG -     column: undefined,
2022-07-25 04:24:28,711: DEBUG -     dataType: undefined,
2022-07-25 04:24:28,711: DEBUG -     constraint: undefined,
2022-07-25 04:24:28,711: DEBUG -     file: 'parse_relation.c',
2022-07-25 04:24:28,711: DEBUG -     line: '3504',
2022-07-25 04:24:28,712: DEBUG -     routine: 'errorMissingColumn',
2022-07-25 04:24:28,712: DEBUG -     sql: 'SELECT "AccountModel"."id", "AccountModel"."name", "AccountModel"."description", "AccountModel"."actorId", "AccountModel"."userId", "AccountModel"."applicationId", "AccountModel"."createdAt", "AccountModel"."updatedAt", "Actor"."id" AS "Actor.id", "Actor"."type" AS "Actor.type", "Actor"."preferredUsername" AS "Actor.preferredUsername", "Actor"."url" AS "Actor.url", "Actor"."publicKey" AS "Actor.publicKey", "Actor"."privateKey" AS "Actor.privateKey", "Actor"."followersCount" AS "Actor.followersCount", "Actor"."followingCount" AS "Actor.followingCount", "Actor"."inboxUrl" AS "Actor.inboxUrl", "Actor"."outboxUrl" AS "Actor.outboxUrl", "Actor"."sharedInboxUrl" AS "Actor.sharedInboxUrl", "Actor"."followersUrl" AS "Actor.followersUrl", "Actor"."followingUrl" AS "Actor.followingUrl", "Actor"."remoteCreatedAt" AS "Actor.remoteCreatedAt", "Actor"."serverId" AS "Actor.serverId", "Actor"."createdAt" AS "Actor.createdAt", "Actor"."updatedAt" AS "Actor.updatedAt", "Actor->Server"."id" AS "Actor.Server.id", "Actor->Server"."host" AS "Actor.Server.host", "Actor->Server"."redundancyAllowed" AS "Actor.Server.redundancyAllowed", "Actor->Server"."createdAt" AS "Actor.Server.createdAt", "Actor->Server"."updatedAt" AS "Actor.Server.updatedAt", "Actor->Avatars"."id" AS "Actor.Avatars.id", "Actor->Avatars"."filename" AS "Actor.Avatars.filename", "Actor->Avatars"."height" AS "Actor.Avatars.height", "Actor->Avatars"."width" AS "Actor.Avatars.width", "Actor->Avatars"."fileUrl" AS "Actor.Avatars.fileUrl", "Actor->Avatars"."onDisk" AS "Actor.Avatars.onDisk", "Actor->Avatars"."type" AS "Actor.Avatars.type", "Actor->Avatars"."actorId" AS "Actor.Avatars.actorId", "Actor->Avatars"."createdAt" AS "Actor.Avatars.createdAt", "Actor->Avatars"."updatedAt" AS "Actor.Avatars.updatedAt", "VideoChannels"."id" AS "VideoChannels.id", "VideoChannels"."name" AS "VideoChannels.name", "VideoChannels"."description" AS "VideoChannels.description", "VideoChannels"."support" AS "VideoChannels.support", "VideoChannels"."actorId" AS "VideoChannels.actorId", "VideoChannels"."accountId" AS "VideoChannels.accountId", "VideoChannels"."createdAt" AS "VideoChannels.createdAt", "VideoChannels"."updatedAt" AS "VideoChannels.updatedAt", "VideoChannels->Actor"."id" AS "VideoChannels.Actor.id", "VideoChannels->Actor"."type" AS "VideoChannels.Actor.type", "VideoChannels->Actor"."preferredUsername" AS "VideoChannels.Actor.preferredUsername", "VideoChannels->Actor"."url" AS "VideoChannels.Actor.url", "VideoChannels->Actor"."publicKey" AS "VideoChannels.Actor.publicKey", "VideoChannels->Actor"."privateKey" AS "VideoChannels.Actor.privateKey", "VideoChannels->Actor"."followersCount" AS "VideoChannels.Actor.followersCount", "VideoChannels->Actor"."followingCount" AS "VideoChannels.Actor.followingCount", "VideoChannels->Actor"."inboxUrl" AS "VideoChannels.Actor.inboxUrl", "VideoChannels->Actor"."outboxUrl" AS "VideoChannels.Actor.outboxUrl", "VideoChannels->Actor"."sharedInboxUrl" AS "VideoChannels.Actor.sharedInboxUrl", "VideoChannels->Actor"."followersUrl" AS "VideoChannels.Actor.followersUrl", "VideoChannels->Actor"."followingUrl" AS "VideoChannels.Actor.followingUrl", "VideoChannels->Actor"."remoteCreatedAt" AS "VideoChannels.Actor.remoteCreatedAt", "VideoChannels->Actor"."serverId" AS "VideoChannels.Actor.serverId", "VideoChannels->Actor"."createdAt" AS "VideoChannels.Actor.createdAt", "VideoChannels->Actor"."updatedAt" AS "VideoChannels.Actor.updatedAt", "VideoChannels->Actor->Server"."id" AS "VideoChannels.Actor.Server.id", "VideoChannels->Actor->Server"."host" AS "VideoChannels.Actor.Server.host", "VideoChannels->Actor->Server"."redundancyAllowed" AS "VideoChannels.Actor.Server.redundancyAllowed", "VideoChannels->Actor->Server"."createdAt" AS "VideoChannels.Actor.Server.createdAt", "VideoChannels->Actor->Server"."updatedAt" AS "VideoChannels.Actor.Server.updatedAt", "VideoChannels->Actor->Avatars"."id" AS "VideoChannels.Actor.Avatars.id", "VideoChannels->Actor->Avatars"."filename" AS "VideoChannels.Actor.Avatars.filename", "VideoChannels->Actor->Avatars"."height" AS "VideoChannels.Actor.Avatars.height", "VideoChannels->Actor->Avatars"."width" AS "VideoChannels.Actor.Avatars.width", "VideoChannels->Actor->Avatars"."fileUrl" AS "VideoChannels.Actor.Avatars.fileUrl", "VideoChannels->Actor->Avatars"."onDisk" AS "VideoChannels.Actor.Avatars.onDisk", "VideoChannels->Actor->Avatars"."type" AS "VideoChannels.Actor.Avatars.type", "VideoChannels->Actor->Avatars"."actorId" AS "VideoChannels.Actor.Avatars.actorId", "VideoChannels->Actor->Avatars"."createdAt" AS "VideoChannels.Actor.Avatars.createdAt", "VideoChannels->Actor->Avatars"."updatedAt" AS "VideoChannels.Actor.Avatars.updatedAt", "VideoChannels->Account"."id" AS "VideoChannels.Account.id", "VideoChannels->Account"."name" AS "VideoChannels.Account.name", "VideoChannels->Account"."description" AS "VideoChannels.Account.description", "VideoChannels->Account"."actorId" AS "VideoChannels.Account.actorId", "VideoChannels->Account"."userId" AS "VideoChannels.Account.userId", "VideoChannels->Account"."applicationId" AS "VideoChannels.Account.applicationId", "VideoChannels->Account"."createdAt" AS "VideoChannels.Account.createdAt", "VideoChannels->Account"."updatedAt" AS "VideoChannels.Account.updatedAt", "VideoChannels->Account->Actor"."id" AS "VideoChannels.Account.Actor.id", "VideoChannels->Account->Actor"."type" AS "VideoChannels.Account.Actor.type", "VideoChannels->Account->Actor"."preferredUsername" AS "VideoChannels.Account.Actor.preferredUsername", "VideoChannels->Account->Actor"."url" AS "VideoChannels.Account.Actor.url", "VideoChannels->Account->Actor"."publicKey" AS "VideoChannels.Account.Actor.publicKey", "VideoChannels->Account->Actor"."privateKey" AS "VideoChannels.Account.Actor.privateKey", "VideoChannels->Account->Actor"."followersCount" AS "VideoChannels.Account.Actor.followersCount", "VideoChannels->Account->Actor"."followingCount" AS "VideoChannels.Account.Actor.followingCount", "VideoChannels->Account->Actor"."inboxUrl" AS "VideoChannels.Account.Actor.inboxUrl", "VideoChannels->Account->Actor"."outboxUrl" AS "VideoChannels.Account.Actor.outboxUrl", "VideoChannels->Account->Actor"."sharedInboxUrl" AS "VideoChannels.Account.Actor.sharedInboxUrl", "VideoChannels->Account->Actor"."followersUrl" AS "VideoChannels.Account.Actor.followersUrl", "VideoChannels->Account->Actor"."followingUrl" AS "VideoChannels.Account.Actor.followingUrl", "VideoChannels->Account->Actor"."remoteCreatedAt" AS "VideoChannels.Account.Actor.remoteCreatedAt", "VideoChannels->Account->Actor"."serverId" AS "VideoChannels.Account.Actor.serverId", "VideoChannels->Account->Actor"."createdAt" AS "VideoChannels.Account.Actor.createdAt", "VideoChannels->Account->Actor"."updatedAt" AS "VideoChannels.Account.Actor.updatedAt", "VideoChannels->Account->Actor->Server"."id" AS "VideoChannels.Account.Actor.Server.id", "VideoChannels->Account->Actor->Server"."host" AS "VideoChannels.Account.Actor.Server.host", "VideoChannels->Account->Actor->Server"."redundancyAllowed" AS "VideoChannels.Account.Actor.Server.redundancyAllowed", "VideoChannels->Account->Actor->Server"."createdAt" AS "VideoChannels.Account.Actor.Server.createdAt", "VideoChannels->Account->Actor->Server"."updatedAt" AS "VideoChannels.Account.Actor.Server.updatedAt", "VideoChannels->Account->Actor->Avatars"."id" AS "VideoChannels.Account.Actor.Avatars.id", "VideoChannels->Account->Actor->Avatars"."filename" AS "VideoChannels.Account.Actor.Avatars.filename", "VideoChannels->Account->Actor->Avatars"."height" AS "VideoChannels.Account.Actor.Avatars.height", "VideoChannels->Account->Actor->Avatars"."width" AS "VideoChannels.Account.Actor.Avatars.width", "VideoChannels->Account->Actor->Avatars"."fileUrl" AS "VideoChannels.Account.Actor.Avatars.fileUrl", "VideoChannels->Account->Actor->Avatars"."onDisk" AS "VideoChannels.Account.Actor.Avatars.onDisk", "VideoChannels->Account->Actor->Avatars"."type" AS "VideoChannels.Account.Actor.Avatars.type", "VideoChannels->Account->Actor->Avatars"."actorId" AS "VideoChannels.Account.Actor.Avatars.actorId", "VideoChannels->Account->Actor->Avatars"."createdAt" AS "VideoChannels.Account.Actor.Avatars.createdAt", "VideoChannels->Account->Actor->Avatars"."updatedAt" AS "VideoChannels.Account.Actor.Avatars.updatedAt" FROM "account" AS "AccountModel" INNER JOIN "actor" AS "Actor" ON "AccountModel"."actorId" = "Actor"."id" AND "Actor"."serverId" IS NULL LEFT OUTER JOIN "server" AS "Actor->Server" ON "Actor"."serverId" = "Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "Actor->Avatars" ON "Actor"."id" = "Actor->Avatars"."actorId" AND "Actor->Avatars"."type" = 1 LEFT OUTER JOIN ( "videoChannel" AS "VideoChannels" INNER JOIN "actor" AS "VideoChannels->Actor" ON "VideoChannels"."actorId" = "VideoChannels->Actor"."id" LEFT OUTER JOIN "server" AS "VideoChannels->Actor->Server" ON "VideoChannels->Actor"."serverId" = "VideoChannels->Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "VideoChannels->Actor->Avatars" ON "VideoChannels->Actor"."id" = "VideoChannels->Actor->Avatars"."actorId" AND "VideoChannels->Actor->Avatars"."type" = 1 LEFT OUTER JOIN ( "account" AS "VideoChannels->Account" INNER JOIN "actor" AS "VideoChannels->Account->Actor" ON "VideoChannels->Account"."actorId" = "VideoChannels->Account->Actor"."id" LEFT OUTER JOIN "server" AS "VideoChannels->Account->Actor->Server" ON "VideoChannels->Account->Actor"."serverId" = "VideoChannels->Account->Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "VideoChannels->Account->Actor->Avatars" ON "VideoChannels->Account->Actor"."id" = "VideoChannels->Account->Actor->Avatars"."actorId" AND "VideoChannels->Account->Actor->Avatars"."type" = 1 ) ON "VideoChannels"."accountId" = "VideoChannels->Account"."id" ) ON "AccountModel"."id" = "VideoChannels"."accountId";',
2022-07-25 04:24:28,713: DEBUG -     parameters: undefined
2022-07-25 04:24:28,713: DEBUG -   },
2022-07-25 04:24:28,713: DEBUG -   original: error: column Actor->Avatars.actorId does not exist
2022-07-25 04:24:28,713: DEBUG -       at Parser.parseErrorMessage (/var/www/peertube/node_modules/pg-protocol/dist/parser.js:287:98)
2022-07-25 04:24:28,713: DEBUG -       at Parser.handlePacket (/var/www/peertube/node_modules/pg-protocol/dist/parser.js:126:29)
2022-07-25 04:24:28,713: DEBUG -       at Parser.parse (/var/www/peertube/node_modules/pg-protocol/dist/parser.js:39:38)
2022-07-25 04:24:28,713: DEBUG -       at Socket.<anonymous> (/var/www/peertube/node_modules/pg-protocol/dist/index.js:11:42)
2022-07-25 04:24:28,713: DEBUG -       at Socket.emit (node:events:527:28)
2022-07-25 04:24:28,713: DEBUG -       at Socket.emit (node:domain:475:12)
2022-07-25 04:24:28,713: DEBUG -       at addChunk (node:internal/streams/readable:315:12)
2022-07-25 04:24:28,714: DEBUG -       at readableAddChunk (node:internal/streams/readable:289:9)
2022-07-25 04:24:28,714: DEBUG -       at Socket.Readable.push (node:internal/streams/readable:228:10)
2022-07-25 04:24:28,714: DEBUG -       at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
2022-07-25 04:24:28,714: DEBUG -     length: 122,
2022-07-25 04:24:28,714: DEBUG -     severity: 'ERROR',
2022-07-25 04:24:28,714: DEBUG -     code: '42703',
2022-07-25 04:24:28,714: DEBUG -     detail: undefined,
2022-07-25 04:24:28,714: DEBUG -     hint: undefined,
2022-07-25 04:24:28,714: DEBUG -     position: '8604',
2022-07-25 04:24:28,714: DEBUG -     internalPosition: undefined,
2022-07-25 04:24:28,714: DEBUG -     internalQuery: undefined,
2022-07-25 04:24:28,715: DEBUG -     where: undefined,
2022-07-25 04:24:28,715: DEBUG -     schema: undefined,
2022-07-25 04:24:28,715: DEBUG -     table: undefined,
2022-07-25 04:24:28,715: DEBUG -     column: undefined,
2022-07-25 04:24:28,715: DEBUG -     dataType: undefined,
2022-07-25 04:24:28,715: DEBUG -     constraint: undefined,
2022-07-25 04:24:28,715: DEBUG -     file: 'parse_relation.c',
2022-07-25 04:24:28,715: DEBUG -     line: '3504',
2022-07-25 04:24:28,715: DEBUG -     routine: 'errorMissingColumn',
2022-07-25 04:24:28,715: DEBUG -     sql: 'SELECT "AccountModel"."id", "AccountModel"."name", "AccountModel"."description", "AccountModel"."actorId", "AccountModel"."userId", "AccountModel"."applicationId", "AccountModel"."createdAt", "AccountModel"."updatedAt", "Actor"."id" AS "Actor.id", "Actor"."type" AS "Actor.type", "Actor"."preferredUsername" AS "Actor.preferredUsername", "Actor"."url" AS "Actor.url", "Actor"."publicKey" AS "Actor.publicKey", "Actor"."privateKey" AS "Actor.privateKey", "Actor"."followersCount" AS "Actor.followersCount", "Actor"."followingCount" AS "Actor.followingCount", "Actor"."inboxUrl" AS "Actor.inboxUrl", "Actor"."outboxUrl" AS "Actor.outboxUrl", "Actor"."sharedInboxUrl" AS "Actor.sharedInboxUrl", "Actor"."followersUrl" AS "Actor.followersUrl", "Actor"."followingUrl" AS "Actor.followingUrl", "Actor"."remoteCreatedAt" AS "Actor.remoteCreatedAt", "Actor"."serverId" AS "Actor.serverId", "Actor"."createdAt" AS "Actor.createdAt", "Actor"."updatedAt" AS "Actor.updatedAt", "Actor->Server"."id" AS "Actor.Server.id", "Actor->Server"."host" AS "Actor.Server.host", "Actor->Server"."redundancyAllowed" AS "Actor.Server.redundancyAllowed", "Actor->Server"."createdAt" AS "Actor.Server.createdAt", "Actor->Server"."updatedAt" AS "Actor.Server.updatedAt", "Actor->Avatars"."id" AS "Actor.Avatars.id", "Actor->Avatars"."filename" AS "Actor.Avatars.filename", "Actor->Avatars"."height" AS "Actor.Avatars.height", "Actor->Avatars"."width" AS "Actor.Avatars.width", "Actor->Avatars"."fileUrl" AS "Actor.Avatars.fileUrl", "Actor->Avatars"."onDisk" AS "Actor.Avatars.onDisk", "Actor->Avatars"."type" AS "Actor.Avatars.type", "Actor->Avatars"."actorId" AS "Actor.Avatars.actorId", "Actor->Avatars"."createdAt" AS "Actor.Avatars.createdAt", "Actor->Avatars"."updatedAt" AS "Actor.Avatars.updatedAt", "VideoChannels"."id" AS "VideoChannels.id", "VideoChannels"."name" AS "VideoChannels.name", "VideoChannels"."description" AS "VideoChannels.description", "VideoChannels"."support" AS "VideoChannels.support", "VideoChannels"."actorId" AS "VideoChannels.actorId", "VideoChannels"."accountId" AS "VideoChannels.accountId", "VideoChannels"."createdAt" AS "VideoChannels.createdAt", "VideoChannels"."updatedAt" AS "VideoChannels.updatedAt", "VideoChannels->Actor"."id" AS "VideoChannels.Actor.id", "VideoChannels->Actor"."type" AS "VideoChannels.Actor.type", "VideoChannels->Actor"."preferredUsername" AS "VideoChannels.Actor.preferredUsername", "VideoChannels->Actor"."url" AS "VideoChannels.Actor.url", "VideoChannels->Actor"."publicKey" AS "VideoChannels.Actor.publicKey", "VideoChannels->Actor"."privateKey" AS "VideoChannels.Actor.privateKey", "VideoChannels->Actor"."followersCount" AS "VideoChannels.Actor.followersCount", "VideoChannels->Actor"."followingCount" AS "VideoChannels.Actor.followingCount", "VideoChannels->Actor"."inboxUrl" AS "VideoChannels.Actor.inboxUrl", "VideoChannels->Actor"."outboxUrl" AS "VideoChannels.Actor.outboxUrl", "VideoChannels->Actor"."sharedInboxUrl" AS "VideoChannels.Actor.sharedInboxUrl", "VideoChannels->Actor"."followersUrl" AS "VideoChannels.Actor.followersUrl", "VideoChannels->Actor"."followingUrl" AS "VideoChannels.Actor.followingUrl", "VideoChannels->Actor"."remoteCreatedAt" AS "VideoChannels.Actor.remoteCreatedAt", "VideoChannels->Actor"."serverId" AS "VideoChannels.Actor.serverId", "VideoChannels->Actor"."createdAt" AS "VideoChannels.Actor.createdAt", "VideoChannels->Actor"."updatedAt" AS "VideoChannels.Actor.updatedAt", "VideoChannels->Actor->Server"."id" AS "VideoChannels.Actor.Server.id", "VideoChannels->Actor->Server"."host" AS "VideoChannels.Actor.Server.host", "VideoChannels->Actor->Server"."redundancyAllowed" AS "VideoChannels.Actor.Server.redundancyAllowed", "VideoChannels->Actor->Server"."createdAt" AS "VideoChannels.Actor.Server.createdAt", "VideoChannels->Actor->Server"."updatedAt" AS "VideoChannels.Actor.Server.updatedAt", "VideoChannels->Actor->Avatars"."id" AS "VideoChannels.Actor.Avatars.id", "VideoChannels->Actor->Avatars"."filename" AS "VideoChannels.Actor.Avatars.filename", "VideoChannels->Actor->Avatars"."height" AS "VideoChannels.Actor.Avatars.height", "VideoChannels->Actor->Avatars"."width" AS "VideoChannels.Actor.Avatars.width", "VideoChannels->Actor->Avatars"."fileUrl" AS "VideoChannels.Actor.Avatars.fileUrl", "VideoChannels->Actor->Avatars"."onDisk" AS "VideoChannels.Actor.Avatars.onDisk", "VideoChannels->Actor->Avatars"."type" AS "VideoChannels.Actor.Avatars.type", "VideoChannels->Actor->Avatars"."actorId" AS "VideoChannels.Actor.Avatars.actorId", "VideoChannels->Actor->Avatars"."createdAt" AS "VideoChannels.Actor.Avatars.createdAt", "VideoChannels->Actor->Avatars"."updatedAt" AS "VideoChannels.Actor.Avatars.updatedAt", "VideoChannels->Account"."id" AS "VideoChannels.Account.id", "VideoChannels->Account"."name" AS "VideoChannels.Account.name", "VideoChannels->Account"."description" AS "VideoChannels.Account.description", "VideoChannels->Account"."actorId" AS "VideoChannels.Account.actorId", "VideoChannels->Account"."userId" AS "VideoChannels.Account.userId", "VideoChannels->Account"."applicationId" AS "VideoChannels.Account.applicationId", "VideoChannels->Account"."createdAt" AS "VideoChannels.Account.createdAt", "VideoChannels->Account"."updatedAt" AS "VideoChannels.Account.updatedAt", "VideoChannels->Account->Actor"."id" AS "VideoChannels.Account.Actor.id", "VideoChannels->Account->Actor"."type" AS "VideoChannels.Account.Actor.type", "VideoChannels->Account->Actor"."preferredUsername" AS "VideoChannels.Account.Actor.preferredUsername", "VideoChannels->Account->Actor"."url" AS "VideoChannels.Account.Actor.url", "VideoChannels->Account->Actor"."publicKey" AS "VideoChannels.Account.Actor.publicKey", "VideoChannels->Account->Actor"."privateKey" AS "VideoChannels.Account.Actor.privateKey", "VideoChannels->Account->Actor"."followersCount" AS "VideoChannels.Account.Actor.followersCount", "VideoChannels->Account->Actor"."followingCount" AS "VideoChannels.Account.Actor.followingCount", "VideoChannels->Account->Actor"."inboxUrl" AS "VideoChannels.Account.Actor.inboxUrl", "VideoChannels->Account->Actor"."outboxUrl" AS "VideoChannels.Account.Actor.outboxUrl", "VideoChannels->Account->Actor"."sharedInboxUrl" AS "VideoChannels.Account.Actor.sharedInboxUrl", "VideoChannels->Account->Actor"."followersUrl" AS "VideoChannels.Account.Actor.followersUrl", "VideoChannels->Account->Actor"."followingUrl" AS "VideoChannels.Account.Actor.followingUrl", "VideoChannels->Account->Actor"."remoteCreatedAt" AS "VideoChannels.Account.Actor.remoteCreatedAt", "VideoChannels->Account->Actor"."serverId" AS "VideoChannels.Account.Actor.serverId", "VideoChannels->Account->Actor"."createdAt" AS "VideoChannels.Account.Actor.createdAt", "VideoChannels->Account->Actor"."updatedAt" AS "VideoChannels.Account.Actor.updatedAt", "VideoChannels->Account->Actor->Server"."id" AS "VideoChannels.Account.Actor.Server.id", "VideoChannels->Account->Actor->Server"."host" AS "VideoChannels.Account.Actor.Server.host", "VideoChannels->Account->Actor->Server"."redundancyAllowed" AS "VideoChannels.Account.Actor.Server.redundancyAllowed", "VideoChannels->Account->Actor->Server"."createdAt" AS "VideoChannels.Account.Actor.Server.createdAt", "VideoChannels->Account->Actor->Server"."updatedAt" AS "VideoChannels.Account.Actor.Server.updatedAt", "VideoChannels->Account->Actor->Avatars"."id" AS "VideoChannels.Account.Actor.Avatars.id", "VideoChannels->Account->Actor->Avatars"."filename" AS "VideoChannels.Account.Actor.Avatars.filename", "VideoChannels->Account->Actor->Avatars"."height" AS "VideoChannels.Account.Actor.Avatars.height", "VideoChannels->Account->Actor->Avatars"."width" AS "VideoChannels.Account.Actor.Avatars.width", "VideoChannels->Account->Actor->Avatars"."fileUrl" AS "VideoChannels.Account.Actor.Avatars.fileUrl", "VideoChannels->Account->Actor->Avatars"."onDisk" AS "VideoChannels.Account.Actor.Avatars.onDisk", "VideoChannels->Account->Actor->Avatars"."type" AS "VideoChannels.Account.Actor.Avatars.type", "VideoChannels->Account->Actor->Avatars"."actorId" AS "VideoChannels.Account.Actor.Avatars.actorId", "VideoChannels->Account->Actor->Avatars"."createdAt" AS "VideoChannels.Account.Actor.Avatars.createdAt", "VideoChannels->Account->Actor->Avatars"."updatedAt" AS "VideoChannels.Account.Actor.Avatars.updatedAt" FROM "account" AS "AccountModel" INNER JOIN "actor" AS "Actor" ON "AccountModel"."actorId" = "Actor"."id" AND "Actor"."serverId" IS NULL LEFT OUTER JOIN "server" AS "Actor->Server" ON "Actor"."serverId" = "Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "Actor->Avatars" ON "Actor"."id" = "Actor->Avatars"."actorId" AND "Actor->Avatars"."type" = 1 LEFT OUTER JOIN ( "videoChannel" AS "VideoChannels" INNER JOIN "actor" AS "VideoChannels->Actor" ON "VideoChannels"."actorId" = "VideoChannels->Actor"."id" LEFT OUTER JOIN "server" AS "VideoChannels->Actor->Server" ON "VideoChannels->Actor"."serverId" = "VideoChannels->Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "VideoChannels->Actor->Avatars" ON "VideoChannels->Actor"."id" = "VideoChannels->Actor->Avatars"."actorId" AND "VideoChannels->Actor->Avatars"."type" = 1 LEFT OUTER JOIN ( "account" AS "VideoChannels->Account" INNER JOIN "actor" AS "VideoChannels->Account->Actor" ON "VideoChannels->Account"."actorId" = "VideoChannels->Account->Actor"."id" LEFT OUTER JOIN "server" AS "VideoChannels->Account->Actor->Server" ON "VideoChannels->Account->Actor"."serverId" = "VideoChannels->Account->Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "VideoChannels->Account->Actor->Avatars" ON "VideoChannels->Account->Actor"."id" = "VideoChannels->Account->Actor->Avatars"."actorId" AND "VideoChannels->Account->Actor->Avatars"."type" = 1 ) ON "VideoChannels"."accountId" = "VideoChannels->Account"."id" ) ON "AccountModel"."id" = "VideoChannels"."accountId";',
2022-07-25 04:24:28,716: DEBUG -     parameters: undefined
2022-07-25 04:24:28,716: DEBUG -   },
2022-07-25 04:24:28,716: DEBUG -   sql: 'SELECT "AccountModel"."id", "AccountModel"."name", "AccountModel"."description", "AccountModel"."actorId", "AccountModel"."userId", "AccountModel"."applicationId", "AccountModel"."createdAt", "AccountModel"."updatedAt", "Actor"."id" AS "Actor.id", "Actor"."type" AS "Actor.type", "Actor"."preferredUsername" AS "Actor.preferredUsername", "Actor"."url" AS "Actor.url", "Actor"."publicKey" AS "Actor.publicKey", "Actor"."privateKey" AS "Actor.privateKey", "Actor"."followersCount" AS "Actor.followersCount", "Actor"."followingCount" AS "Actor.followingCount", "Actor"."inboxUrl" AS "Actor.inboxUrl", "Actor"."outboxUrl" AS "Actor.outboxUrl", "Actor"."sharedInboxUrl" AS "Actor.sharedInboxUrl", "Actor"."followersUrl" AS "Actor.followersUrl", "Actor"."followingUrl" AS "Actor.followingUrl", "Actor"."remoteCreatedAt" AS "Actor.remoteCreatedAt", "Actor"."serverId" AS "Actor.serverId", "Actor"."createdAt" AS "Actor.createdAt", "Actor"."updatedAt" AS "Actor.updatedAt", "Actor->Server"."id" AS "Actor.Server.id", "Actor->Server"."host" AS "Actor.Server.host", "Actor->Server"."redundancyAllowed" AS "Actor.Server.redundancyAllowed", "Actor->Server"."createdAt" AS "Actor.Server.createdAt", "Actor->Server"."updatedAt" AS "Actor.Server.updatedAt", "Actor->Avatars"."id" AS "Actor.Avatars.id", "Actor->Avatars"."filename" AS "Actor.Avatars.filename", "Actor->Avatars"."height" AS "Actor.Avatars.height", "Actor->Avatars"."width" AS "Actor.Avatars.width", "Actor->Avatars"."fileUrl" AS "Actor.Avatars.fileUrl", "Actor->Avatars"."onDisk" AS "Actor.Avatars.onDisk", "Actor->Avatars"."type" AS "Actor.Avatars.type", "Actor->Avatars"."actorId" AS "Actor.Avatars.actorId", "Actor->Avatars"."createdAt" AS "Actor.Avatars.createdAt", "Actor->Avatars"."updatedAt" AS "Actor.Avatars.updatedAt", "VideoChannels"."id" AS "VideoChannels.id", "VideoChannels"."name" AS "VideoChannels.name", "VideoChannels"."description" AS "VideoChannels.description", "VideoChannels"."support" AS "VideoChannels.support", "VideoChannels"."actorId" AS "VideoChannels.actorId", "VideoChannels"."accountId" AS "VideoChannels.accountId", "VideoChannels"."createdAt" AS "VideoChannels.createdAt", "VideoChannels"."updatedAt" AS "VideoChannels.updatedAt", "VideoChannels->Actor"."id" AS "VideoChannels.Actor.id", "VideoChannels->Actor"."type" AS "VideoChannels.Actor.type", "VideoChannels->Actor"."preferredUsername" AS "VideoChannels.Actor.preferredUsername", "VideoChannels->Actor"."url" AS "VideoChannels.Actor.url", "VideoChannels->Actor"."publicKey" AS "VideoChannels.Actor.publicKey", "VideoChannels->Actor"."privateKey" AS "VideoChannels.Actor.privateKey", "VideoChannels->Actor"."followersCount" AS "VideoChannels.Actor.followersCount", "VideoChannels->Actor"."followingCount" AS "VideoChannels.Actor.followingCount", "VideoChannels->Actor"."inboxUrl" AS "VideoChannels.Actor.inboxUrl", "VideoChannels->Actor"."outboxUrl" AS "VideoChannels.Actor.outboxUrl", "VideoChannels->Actor"."sharedInboxUrl" AS "VideoChannels.Actor.sharedInboxUrl", "VideoChannels->Actor"."followersUrl" AS "VideoChannels.Actor.followersUrl", "VideoChannels->Actor"."followingUrl" AS "VideoChannels.Actor.followingUrl", "VideoChannels->Actor"."remoteCreatedAt" AS "VideoChannels.Actor.remoteCreatedAt", "VideoChannels->Actor"."serverId" AS "VideoChannels.Actor.serverId", "VideoChannels->Actor"."createdAt" AS "VideoChannels.Actor.createdAt", "VideoChannels->Actor"."updatedAt" AS "VideoChannels.Actor.updatedAt", "VideoChannels->Actor->Server"."id" AS "VideoChannels.Actor.Server.id", "VideoChannels->Actor->Server"."host" AS "VideoChannels.Actor.Server.host", "VideoChannels->Actor->Server"."redundancyAllowed" AS "VideoChannels.Actor.Server.redundancyAllowed", "VideoChannels->Actor->Server"."createdAt" AS "VideoChannels.Actor.Server.createdAt", "VideoChannels->Actor->Server"."updatedAt" AS "VideoChannels.Actor.Server.updatedAt", "VideoChannels->Actor->Avatars"."id" AS "VideoChannels.Actor.Avatars.id", "VideoChannels->Actor->Avatars"."filename" AS "VideoChannels.Actor.Avatars.filename", "VideoChannels->Actor->Avatars"."height" AS "VideoChannels.Actor.Avatars.height", "VideoChannels->Actor->Avatars"."width" AS "VideoChannels.Actor.Avatars.width", "VideoChannels->Actor->Avatars"."fileUrl" AS "VideoChannels.Actor.Avatars.fileUrl", "VideoChannels->Actor->Avatars"."onDisk" AS "VideoChannels.Actor.Avatars.onDisk", "VideoChannels->Actor->Avatars"."type" AS "VideoChannels.Actor.Avatars.type", "VideoChannels->Actor->Avatars"."actorId" AS "VideoChannels.Actor.Avatars.actorId", "VideoChannels->Actor->Avatars"."createdAt" AS "VideoChannels.Actor.Avatars.createdAt", "VideoChannels->Actor->Avatars"."updatedAt" AS "VideoChannels.Actor.Avatars.updatedAt", "VideoChannels->Account"."id" AS "VideoChannels.Account.id", "VideoChannels->Account"."name" AS "VideoChannels.Account.name", "VideoChannels->Account"."description" AS "VideoChannels.Account.description", "VideoChannels->Account"."actorId" AS "VideoChannels.Account.actorId", "VideoChannels->Account"."userId" AS "VideoChannels.Account.userId", "VideoChannels->Account"."applicationId" AS "VideoChannels.Account.applicationId", "VideoChannels->Account"."createdAt" AS "VideoChannels.Account.createdAt", "VideoChannels->Account"."updatedAt" AS "VideoChannels.Account.updatedAt", "VideoChannels->Account->Actor"."id" AS "VideoChannels.Account.Actor.id", "VideoChannels->Account->Actor"."type" AS "VideoChannels.Account.Actor.type", "VideoChannels->Account->Actor"."preferredUsername" AS "VideoChannels.Account.Actor.preferredUsername", "VideoChannels->Account->Actor"."url" AS "VideoChannels.Account.Actor.url", "VideoChannels->Account->Actor"."publicKey" AS "VideoChannels.Account.Actor.publicKey", "VideoChannels->Account->Actor"."privateKey" AS "VideoChannels.Account.Actor.privateKey", "VideoChannels->Account->Actor"."followersCount" AS "VideoChannels.Account.Actor.followersCount", "VideoChannels->Account->Actor"."followingCount" AS "VideoChannels.Account.Actor.followingCount", "VideoChannels->Account->Actor"."inboxUrl" AS "VideoChannels.Account.Actor.inboxUrl", "VideoChannels->Account->Actor"."outboxUrl" AS "VideoChannels.Account.Actor.outboxUrl", "VideoChannels->Account->Actor"."sharedInboxUrl" AS "VideoChannels.Account.Actor.sharedInboxUrl", "VideoChannels->Account->Actor"."followersUrl" AS "VideoChannels.Account.Actor.followersUrl", "VideoChannels->Account->Actor"."followingUrl" AS "VideoChannels.Account.Actor.followingUrl", "VideoChannels->Account->Actor"."remoteCreatedAt" AS "VideoChannels.Account.Actor.remoteCreatedAt", "VideoChannels->Account->Actor"."serverId" AS "VideoChannels.Account.Actor.serverId", "VideoChannels->Account->Actor"."createdAt" AS "VideoChannels.Account.Actor.createdAt", "VideoChannels->Account->Actor"."updatedAt" AS "VideoChannels.Account.Actor.updatedAt", "VideoChannels->Account->Actor->Server"."id" AS "VideoChannels.Account.Actor.Server.id", "VideoChannels->Account->Actor->Server"."host" AS "VideoChannels.Account.Actor.Server.host", "VideoChannels->Account->Actor->Server"."redundancyAllowed" AS "VideoChannels.Account.Actor.Server.redundancyAllowed", "VideoChannels->Account->Actor->Server"."createdAt" AS "VideoChannels.Account.Actor.Server.createdAt", "VideoChannels->Account->Actor->Server"."updatedAt" AS "VideoChannels.Account.Actor.Server.updatedAt", "VideoChannels->Account->Actor->Avatars"."id" AS "VideoChannels.Account.Actor.Avatars.id", "VideoChannels->Account->Actor->Avatars"."filename" AS "VideoChannels.Account.Actor.Avatars.filename", "VideoChannels->Account->Actor->Avatars"."height" AS "VideoChannels.Account.Actor.Avatars.height", "VideoChannels->Account->Actor->Avatars"."width" AS "VideoChannels.Account.Actor.Avatars.width", "VideoChannels->Account->Actor->Avatars"."fileUrl" AS "VideoChannels.Account.Actor.Avatars.fileUrl", "VideoChannels->Account->Actor->Avatars"."onDisk" AS "VideoChannels.Account.Actor.Avatars.onDisk", "VideoChannels->Account->Actor->Avatars"."type" AS "VideoChannels.Account.Actor.Avatars.type", "VideoChannels->Account->Actor->Avatars"."actorId" AS "VideoChannels.Account.Actor.Avatars.actorId", "VideoChannels->Account->Actor->Avatars"."createdAt" AS "VideoChannels.Account.Actor.Avatars.createdAt", "VideoChannels->Account->Actor->Avatars"."updatedAt" AS "VideoChannels.Account.Actor.Avatars.updatedAt" FROM "account" AS "AccountModel" INNER JOIN "actor" AS "Actor" ON "AccountModel"."actorId" = "Actor"."id" AND "Actor"."serverId" IS NULL LEFT OUTER JOIN "server" AS "Actor->Server" ON "Actor"."serverId" = "Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "Actor->Avatars" ON "Actor"."id" = "Actor->Avatars"."actorId" AND "Actor->Avatars"."type" = 1 LEFT OUTER JOIN ( "videoChannel" AS "VideoChannels" INNER JOIN "actor" AS "VideoChannels->Actor" ON "VideoChannels"."actorId" = "VideoChannels->Actor"."id" LEFT OUTER JOIN "server" AS "VideoChannels->Actor->Server" ON "VideoChannels->Actor"."serverId" = "VideoChannels->Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "VideoChannels->Actor->Avatars" ON "VideoChannels->Actor"."id" = "VideoChannels->Actor->Avatars"."actorId" AND "VideoChannels->Actor->Avatars"."type" = 1 LEFT OUTER JOIN ( "account" AS "VideoChannels->Account" INNER JOIN "actor" AS "VideoChannels->Account->Actor" ON "VideoChannels->Account"."actorId" = "VideoChannels->Account->Actor"."id" LEFT OUTER JOIN "server" AS "VideoChannels->Account->Actor->Server" ON "VideoChannels->Account->Actor"."serverId" = "VideoChannels->Account->Actor->Server"."id" LEFT OUTER JOIN "actorImage" AS "VideoChannels->Account->Actor->Avatars" ON "VideoChannels->Account->Actor"."id" = "VideoChannels->Account->Actor->Avatars"."actorId" AND "VideoChannels->Account->Actor->Avatars"."type" = 1 ) ON "VideoChannels"."accountId" = "VideoChannels->Account"."id" ) ON "AccountModel"."id" = "VideoChannels"."accountId";',
2022-07-25 04:24:28,717: DEBUG -   parameters: {}
2022-07-25 04:24:28,717: DEBUG - }

The similar full YunoHost logs from my 4 attempts:

  1. https://paste.yunohost.org/raw/norepurudi (2022-07-01, 4.1.1~ynh1 to 4.2.1~ynh1)
  2. https://paste.yunohost.org/raw/huhiqipobo (2022-07-20, 4.1.1~ynh1 to 4.2.2~ynh1)
  3. https://paste.yunohost.org/raw/oqumelosuf (2022-07-25, 4.1.1~ynh1 to 4.2.2~ynh1)
  4. https://paste.yunohost.org/raw/ruyekijola (2022-08-12, 4.1.1~ynh1 to 4.2.2~ynh2)

Backups have been restored, but I’m stuck on PeerTube 4.1.1

(I can speak french.)

Hello,

The migration script 0685-multiple-actor-images can be long https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md#v420
Yunohost doesn’t wait enough time before executing dist/scripts/migrations/peertube-4.2.js

I added a delay in the script before executing dist/scripts/migrations/peertube-4.2.js and it worked fine.

Thank you!

For my future self:
This error also appears when Peertube was not restarted after upgrade but before the migration script.