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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

QueryFailedError: column Meta.mascotImageUrl does not exist on launch #8870

Closed
ThatOneCalculator opened this issue Jun 22, 2022 · 5 comments
Closed
Labels
鈿狅笍bug? This might be a bug

Comments

@ThatOneCalculator
Copy link
Contributor

ThatOneCalculator commented Jun 22, 2022

馃挕 Summary

Misskey fails to start up due to QueryFailedError: column Meta.mascotImageUrl does not exist

馃グ Expected Behavior

Migrations/setup properly handles

馃が Actual Behavior

Crash on start with the message
QueryFailedError: column Meta.mascotImageUrl does not exist

馃摑 Steps to Reproduce

  1. Upgrade to 12.112.0-beta.2
  2. Build, migrate, and run

馃搶 Environment

Misskey version: 12.112.0-beta.2
Your OS: Linux
PSQL version: 12.11

@ThatOneCalculator ThatOneCalculator added the 鈿狅笍bug? This might be a bug label Jun 22, 2022
@ThatOneCalculator ThatOneCalculator changed the title QueryFailedError: column Meta.mascotImageUrl does not exist QueryFailedError: column Meta.mascotImageUrl does not exist on launch Jun 22, 2022
@ThatOneCalculator
Copy link
Contributor Author

When downgrading to 12.111.1, I just get

WARN 1  [queue inbox]   failed(QueryFailedError: column Meta.mascotImageUrl does not exist) id=3809370 attempts=1/8 age=4ms activity=https://fedi.absturztau.be/activities/d5ceda4d-5928-4298-b4f5-d078744f1e14
WARN 1  [queue inbox]   failed(QueryFailedError: column Meta.mascotImageUrl does not exist) id=3809371 attempts=1/8 age=8ms activity=https://fedi.absturztau.be/activities/6119d788-a803-480c-aa4b-aaa9adc97ddd
WARN 1  [queue inbox]   failed(QueryFailedError: column Meta.mascotImageUrl does not exist) id=3809372 attempts=1/8 age=7ms activity=https://botsin.space/users/godtributes/statuses/108523673014846029/activity
WARN 1  [queue inbox]   failed(QueryFailedError: column Meta.mascotImageUrl does not exist) id=3809373 attempts=1/8 age=6ms activity=https://dobbs.town/users/onan/statuses/104649075848062038#delete
QueryFailedError: column Meta.mascotImageUrl does not exist
    at PostgresQueryRunner.query (/home/misskey/misskey-new/packages/backend/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SelectQueryBuilder.loadRawResults (/home/misskey/misskey-new/packages/backend/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2028:25)
    at async SelectQueryBuilder.executeEntitiesAndRawResults (/home/misskey/misskey-new/packages/backend/node_modules/typeorm/query-builder/SelectQueryBuilder.js:1888:26)
    at async SelectQueryBuilder.getRawAndEntities (/home/misskey/misskey-new/packages/backend/node_modules/typeorm/query-builder/SelectQueryBuilder.js:638:29)
    at async SelectQueryBuilder.getMany (/home/misskey/misskey-new/packages/backend/node_modules/typeorm/query-builder/SelectQueryBuilder.js:704:25)
    at async file:///home/misskey/misskey-new/packages/backend/built/misc/fetch-meta.js:9:23
    at async EntityManager.transaction (/home/misskey/misskey-new/packages/backend/node_modules/typeorm/entity-manager/EntityManager.js:72:28)
    at async fetchMeta (file:///home/misskey/misskey-new/packages/backend/built/misc/fetch-meta.js:7:12) {
  query: 'SELECT "Meta"."id" AS "Meta_id", "Meta"."name" AS "Meta_name", "Meta"."description" AS "Meta_description", "Meta"."maintainerName" AS "Meta_maintainerName", "Meta"."maintainerEmail" AS "Meta_maintainerEmail", "Meta"."disableRegistration" AS "Meta_disableRegistration", "Meta"."disableLocalTimeline" AS "Meta_disableLocalTimeline", "Meta"."disableGlobalTimeline" AS "Meta_disableGlobalTimeline", "Meta"."useStarForReactionFallback" AS "Meta_useStarForReactionFallback", "Meta"."langs" AS "Meta_langs", "Meta"."pinnedUsers" AS "Meta_pinnedUsers", "Meta"."hiddenTags" AS "Meta_hiddenTags", "Meta"."blockedHosts" AS "Meta_blockedHosts", "Meta"."pinnedPages" AS "Meta_pinnedPages", "Meta"."pinnedClipId" AS "Meta_pinnedClipId", "Meta"."themeColor" AS "Meta_themeColor", "Meta"."mascotImageUrl" AS "Meta_mascotImageUrl", "Meta"."bannerUrl" AS "Meta_bannerUrl", "Meta"."backgroundImageUrl" AS "Meta_backgroundImageUrl", "Meta"."logoImageUrl" AS "Meta_logoImageUrl", "Meta"."errorImageUrl" AS "Meta_errorImageUrl", "Meta"."iconUrl" AS "Meta_iconUrl", "Meta"."cacheRemoteFiles" AS "Meta_cacheRemoteFiles", "Meta"."proxyAccountId" AS "Meta_proxyAccountId", "Meta"."emailRequiredForSignup" AS "Meta_emailRequiredForSignup", "Meta"."enableHcaptcha" AS "Meta_enableHcaptcha", "Meta"."hcaptchaSiteKey" AS "Meta_hcaptchaSiteKey", "Meta"."hcaptchaSecretKey" AS "Meta_hcaptchaSecretKey", "Meta"."enableRecaptcha" AS "Meta_enableRecaptcha", "Meta"."recaptchaSiteKey" AS "Meta_recaptchaSiteKey", "Meta"."recaptchaSecretKey" AS "Meta_recaptchaSecretKey", "Meta"."localDriveCapacityMb" AS "Meta_localDriveCapacityMb", "Meta"."remoteDriveCapacityMb" AS "Meta_remoteDriveCapacityMb", "Meta"."summalyProxy" AS "Meta_summalyProxy", "Meta"."enableEmail" AS "Meta_enableEmail", "Meta"."email" AS "Meta_email", "Meta"."smtpSecure" AS "Meta_smtpSecure", "Meta"."smtpHost" AS "Meta_smtpHost", "Meta"."smtpPort" AS "Meta_smtpPort", "Meta"."smtpUser" AS "Meta_smtpUser", "Meta"."smtpPass" AS "Meta_smtpPass", "Meta"."enableServiceWorker" AS "Meta_enableServiceWorker", "Meta"."swPublicKey" AS "Meta_swPublicKey", "Meta"."swPrivateKey" AS "Meta_swPrivateKey", "Meta"."enableTwitterIntegration" AS "Meta_enableTwitterIntegration", "Meta"."twitterConsumerKey" AS "Meta_twitterConsumerKey", "Meta"."twitterConsumerSecret" AS "Meta_twitterConsumerSecret", "Meta"."enableGithubIntegration" AS "Meta_enableGithubIntegration", "Meta"."githubClientId" AS "Meta_githubClientId", "Meta"."githubClientSecret" AS "Meta_githubClientSecret", "Meta"."enableDiscordIntegration" AS "Meta_enableDiscordIntegration", "Meta"."discordClientId" AS "Meta_discordClientId", "Meta"."discordClientSecret" AS "Meta_discordClientSecret", "Meta"."deeplAuthKey" AS "Meta_deeplAuthKey", "Meta"."deeplIsPro" AS "Meta_deeplIsPro", "Meta"."ToSUrl" AS "Meta_ToSUrl", "Meta"."repositoryUrl" AS "Meta_repositoryUrl", "Meta"."feedbackUrl" AS "Meta_feedbackUrl", "Meta"."defaultLightTheme" AS "Meta_defaultLightTheme", "Meta"."defaultDarkTheme" AS "Meta_defaultDarkTheme", "Meta"."useObjectStorage" AS "Meta_useObjectStorage", "Meta"."objectStorageBucket" AS "Meta_objectStorageBucket", "Meta"."objectStoragePrefix" AS "Meta_objectStoragePrefix", "Meta"."objectStorageBaseUrl" AS "Meta_objectStorageBaseUrl", "Meta"."objectStorageEndpoint" AS "Meta_objectStorageEndpoint", "Meta"."objectStorageRegion" AS "Meta_objectStorageRegion", "Meta"."objectStorageAccessKey" AS "Meta_objectStorageAccessKey", "Meta"."objectStorageSecretKey" AS "Meta_objectStorageSecretKey", "Meta"."objectStoragePort" AS "Meta_objectStoragePort", "Meta"."objectStorageUseSSL" AS "Meta_objectStorageUseSSL", "Meta"."objectStorageUseProxy" AS "Meta_objectStorageUseProxy", "Meta"."objectStorageSetPublicRead" AS "Meta_objectStorageSetPublicRead", "Meta"."objectStorageS3ForcePathStyle" AS "Meta_objectStorageS3ForcePathStyle" FROM "meta" "Meta" ORDER BY "Meta"."id" DESC',
  parameters: [],
  driverError: error: column Meta.mascotImageUrl does not exist
      at Parser.parseErrorMessage (/home/misskey/misskey-new/packages/backend/node_modules/pg-protocol/dist/parser.js:287:98)
      at Parser.handlePacket (/home/misskey/misskey-new/packages/backend/node_modules/pg-protocol/dist/parser.js:126:29)
      at Parser.parse (/home/misskey/misskey-new/packages/backend/node_modules/pg-protocol/dist/parser.js:39:38)
      at Socket.<anonymous> (/home/misskey/misskey-new/packages/backend/node_modules/pg-protocol/dist/index.js:11:42)
      at Socket.emit (node:events:527:28)
      at addChunk (node:internal/streams/readable:324:12)
      at readableAddChunk (node:internal/streams/readable:297:9)
      at Readable.push (node:internal/streams/readable:234:10)
      at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
    length: 118,
    severity: 'ERROR',
    code: '42703',
    detail: undefined,
    hint: undefined,
    position: '766',
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'parse_relation.c',
    line: '3349',
    routine: 'errorMissingColumn'
  },
  length: 118,
  severity: 'ERROR',
  code: '42703',
  detail: undefined,
  hint: undefined,
  position: '766',
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'parse_relation.c',
  line: '3349',
  routine: 'errorMissingColumn'
}
WARN 1  [queue deliver] failed(QueryFailedError: column Meta.mascotImageUrl does not exist) id=3633376 attempts=11/12 age=1561m to=https://fedi.plus.st/inbox

@Skehmatics
Copy link
Contributor

Skehmatics commented Jun 23, 2022

I was only able to reproduce this after manually dropping the mentioned column in the database. You can add this column back using alter table meta add column "mascotImageUrl" character varying(512) DEFAULT '/assets/ai.png';, but this may be indicative of other database integrity issues.

@ThatOneCalculator
Copy link
Contributor Author

That didn't work, but @nullobsi suggested alter table "meta" add column "errorImageUrl" character varying(512) DEFAULT 'https://xn--931a.moe/aiart/yubitun.png'; which works.

@Skehmatics
Copy link
Contributor

As in the issue is fixed or the query ran without error?

@ThatOneCalculator
Copy link
Contributor Author

The issue was fixed, but I realized it was my own error by testing out #8778 which removed that column

@ThatOneCalculator ThatOneCalculator closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
鈿狅笍bug? This might be a bug
Projects
None yet
Development

No branches or pull requests

2 participants