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

Uploading/importing emojis returns an error #508

Closed
1 task
KiTTYsh opened this issue Oct 3, 2024 · 1 comment
Closed
1 task

Uploading/importing emojis returns an error #508

KiTTYsh opened this issue Oct 3, 2024 · 1 comment

Comments

@KiTTYsh
Copy link

KiTTYsh commented Oct 3, 2024

💡 Summary

Attempting to upload emojis in the Emoji Manager return an error, though appears to be successful after refreshing the page. Also occurs when importing remote emoji.

May be related to #487.

🥰 Expected Behavior

Emoji uploads successfully, and appears in the emoji manager immediately afterwards.

🤬 Actual Behavior

Uploading emoji:

ERR  *  [api]   Internal error occurred in admin/emoji/add: Cannot read properties of undefined (reading 'set') {
  ep: 'admin/emoji/add',
  ps: {
    name: 'testpotato',
    category: null,
    aliases: [],
    license: null,
    isSensitive: false,
    localOnly: false,
    roleIdsThatCanBeUsedThisEmojiAsReaction: [],
    fileId: '9ywj8cspfr7l01av',
    i: '[REDACTED]'
  },
  e: {
    message: "Cannot read properties of undefined (reading 'set')",
    code: 'TypeError',
    stack: "TypeError: Cannot read properties of undefined (reading 'set')\n" +
      '    at CustomEmojiService.add (file:///cherrypick/packages/backend/built/core/CustomEmojiService.js:91:24)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
      '    at async file:///cherrypick/packages/backend/built/server/api/endpoints/admin/emoji/add.js:104:27\n' +
      '    at async ApiCallService.call (file:///cherrypick/packages/backend/built/server/api/ApiCallService.js:395:20)',
    id: '577bda74-543a-4d07-b767-dd285ab4d753'
  }
}

Importing emoji from remote server:

ERR  *  [api]   Internal error occurred in admin/emoji/copy: Cannot read properties of undefined (reading 'set') {
  ep: 'admin/emoji/copy',
  ps: { emojiId: '9ywgrqcmltaf01f3', i: '[REDACTED]' },
  e: {
    message: "Cannot read properties of undefined (reading 'set')",
    code: 'TypeError',
    stack: "TypeError: Cannot read properties of undefined (reading 'set')\n" +
      '    at CustomEmojiService.add (file:///cherrypick/packages/backend/built/core/CustomEmojiService.js:91:24)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
      '    at async file:///cherrypick/packages/backend/built/server/api/endpoints/admin/emoji/copy.js:98:32\n' +
      '    at async ApiCallService.call (file:///cherrypick/packages/backend/built/server/api/ApiCallService.js:395:20)',
    id: 'df11ba81-2a62-49a8-b701-ae2145412d19'
  }
}

📝 Steps to Reproduce

  1. Go to "Manage Custom Emojis" (/custom-emojis-manager)
  2. Click the plus (+) icon at the top right
  3. Click "Add just one"
  4. Click "Select a file" and select a file.
  5. Click "Create"

-- OR --

  1. Go to "Manage Custom Emojis" (/custom-emojis-manager)
  2. Click "Remote" tab at the top
  3. Click on one of the listed remote emojis
  4. Click "Import"

💻 Frontend Environment

* Model and OS of the device(s): Lenovo P15 Gen2, Windows 11 Enterprise 23H2 22631.4169
* Browser: Vivaldi 6.9.3447.44 (Stable channel) (64-bit)
* Server URL: https://kitty.social/
* CherryPick: 4.12.0-beta.7 (Misskey: v2024.9.0)

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service: Docker
* CherryPick: 4.12.0-beta.7 (Misskey: v2024.9.0)
* Node: v20.16.0
* PostgreSQL: 17.0 (Debian 17.0-1.pgdg120+1)
* Redis: 7.4.0
* OS and Architecture: Ubuntu 24.04.1 LTS amd64

Issue is also present in CherryPick release 4.11.1 using compose_example.yml.

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@noridev
Copy link
Collaborator

noridev commented Oct 3, 2024

The error has been fixed in 06faf6c. Thank you! 🙏

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

No branches or pull requests

2 participants