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

「ユーザーの新規投稿」の通知設定を切り替えるとサーバー内部エラーが出る #11892

Closed
gorou12 opened this issue Sep 24, 2023 · 1 comment
Labels
🐛Bug Unexpected behavior packages/backend Server side specific issue/PR

Comments

@gorou12
Copy link

gorou12 commented Sep 24, 2023

💡 Summary

設定>通知>通知設定 で、「ユーザーの新規投稿」のスイッチをOFFに切り替えて保存すると、サーバー内部エラーが発生します。

🥰 Expected Behavior

通知設定の「ユーザーの新規投稿」の有効/無効状態が保存される

🤬 Actual Behavior

保存ボタン押下時に、
「サーバー内部エラー
サーバー内部で予期しないエラーが発生しました。」が発生。
ふたたび同設定画面を開いても、有効/無効状態は保存されていない。

エラー情報は以下の通り。

Endpoint: i/update
Info: {"e":{"message":"invalid input value for enum user_profile_mutingnotificationtypes_enum: \"note\"","code":"QueryFailedError","id":"575b940b-323e-4e60-b9f2-feb17c25db28"}}
Date: 2023-09-24T12:25:42.882Z

この際に docker logs misskey-web-1にて確認できるログは以下のとおり。

ERR  *  [api]   Internal error occurred in i/update: invalid input value for enum user_profile_mutingnotificationtypes_enum: "note"
{
  ep: 'i/update',
  ps: {
    mutingNotificationTypes: [ 'note', 'follow' ],
    i: 'pH1ZNtzGUdIn3vjM'
  },
  e: {
    message: 'invalid input value for enum user_profile_mutingnotificationtypes_enum: "note"',
    code: 'QueryFailedError',
    stack: 'QueryFailedError: invalid input value for enum user_profile_mutingnotificationtypes_enum: "note"\n' +
      '    at PostgresQueryRunner.query (/misskey/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
      '    at async UpdateQueryBuilder.execute (/misskey/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/typeorm/query-builder/UpdateQueryBuilder.js:83:33)\n' +
      '    at async file:///misskey/packages/backend/built/server/api/endpoints/i/update.js:433:13\n' +
      '    at async ApiCallService.call (file:///misskey/packages/backend/built/server/api/ApiCallService.js:316:16)',
    id: '575b940b-323e-4e60-b9f2-feb17c25db28'
  }
}
QueryFailedError: invalid input value for enum user_profile_mutingnotificationtypes_enum: "note"
    at PostgresQueryRunner.query (/misskey/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async UpdateQueryBuilder.execute (/misskey/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/typeorm/query-builder/UpdateQueryBuilder.js:83:33)
    at async file:///misskey/packages/backend/built/server/api/endpoints/i/update.js:433:13
    at async ApiCallService.call (file:///misskey/packages/backend/built/server/api/ApiCallService.js:316:16) {
  query: 'UPDATE "user_profile" SET "mutingNotificationTypes" = $1, "verifiedLinks" = $2 WHERE (("userId" = $3))',
  parameters: [ [ 'note', 'follow' ], [], '9jwrfamlrm' ],
  driverError: error: invalid input value for enum user_profile_mutingnotificationtypes_enum: "note"
      at /misskey/node_modules/.pnpm/[email protected]/node_modules/pg/lib/client.js:526:17
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async PostgresQueryRunner.query (/misskey/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:178:25)
      at async UpdateQueryBuilder.execute (/misskey/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/typeorm/query-builder/UpdateQueryBuilder.js:83:33)
      at async file:///misskey/packages/backend/built/server/api/endpoints/i/update.js:433:13
      at async ApiCallService.call (file:///misskey/packages/backend/built/server/api/ApiCallService.js:316:16) {
    length: 165,
    severity: 'ERROR',
    code: '22P02',
    detail: undefined,
    hint: undefined,
    position: undefined,
    internalPosition: undefined,
    internalQuery: undefined,
    where: "unnamed portal parameter $1 = '...'",
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'enum.c',
    line: '128',
    routine: 'enum_in'
  },
  length: 165,
  severity: 'ERROR',
  code: '22P02',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: "unnamed portal parameter $1 = '...'",
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'enum.c',
  line: '128',
  routine: 'enum_in'
} 575b940b-323e-4e60-b9f2-feb17c25db28

📝 Steps to Reproduce

  1. 設定画面の「通知」タブ内「通知設定」画面を開く
  2. 「ユーザーの新規投稿」を変更する
  3. チェックマークをクリックする

📌 Environment

💻 Frontend

  • Model and OS of the device(s): Windows 11 Pro 22H2 22621.2283
  • Browser: Chrome 117.0.5938.89
  • Server URL: mistest.pokete.dev
  • Misskey: 2023.9.0

🛰 Backend (for server admin)

  • Installation Method or Hosting Service: docker compose
  • Misskey: 2023.9.0
  • Node: 20.5.1
  • PostgreSQL: 15.4
  • Redis: 7.2.1
  • OS and Architecture: Ubuntu 22.04.3 LTS
@gorou12 gorou12 added the ⚠️bug? This might be a bug label Sep 24, 2023
@syuilo syuilo added 🐛Bug Unexpected behavior packages/backend Server side specific issue/PR and removed ⚠️bug? This might be a bug labels Sep 25, 2023
@syuilo
Copy link
Member

syuilo commented Sep 25, 2023

🙏🏻

@syuilo syuilo closed this as completed in 576158e Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior packages/backend Server side specific issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants