1673beta / cherrypick

🌎 A interplanetary communication platform 🚀
https://engawa.esurio1673.net
GNU Affero General Public License v3.0
1 stars 0 forks source link

Cannot Detect Type #47

Closed 1673beta closed 1 month ago

1673beta commented 3 months ago

💡 Summary

どうもtype AnnouceをResolveできてないっぽい?

🥰 Expected Behavior

正常に配送できる

🤬 Actual Behavior

配送できない

📝 Steps to Reproduce

No response

💻 Frontend Environment

* Model and OS of the device(s):
* Browser:
* Server URL:
* CherryPick:

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service:
* CherryPick:
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:

Do you want to address this bug yourself?

1673beta commented 3 months ago

エラーログ Error: cannot detect type at getApType (file:///home/esurio/cherrypick/packages/backend/built/core/activitypub/type.js:31:11) at isPost (file:///home/esurio/cherrypick/packages/backend/built/core/activitypub/type.js:53:52) at ApInboxService.announce (file:///home/esurio/cherrypick/packages/backend/built/core/activitypub/ApInboxService.js:292:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ApInboxService.performOneActivity (file:///home/esurio/cherrypick/packages/backend/built/core/activitypub/ApInboxService.js:176:20) at async ApInboxService.performActivity (file:///home/esurio/cherrypick/packages/backend/built/core/activitypub/ApInboxService.js:143:22) at async InboxProcessorService.process (file:///home/esurio/cherrypick/packages/backend/built/queue/processors/InboxProcessorService.js:187:28) at async Worker.processJob (/home/esurio/cherrypick/node_modules/.pnpm/bullmq@5.7.8/node_modules/bullmq/dist/cjs/classes/worker.js:441:28) at async Worker.retryIfFailed (/home/esurio/cherrypick/node_modules/.pnpm/bullmq@5.7.8/node_modules/bullmq/dist/cjs/classes/worker.js:630:24)

1673beta commented 3 months ago

外から来たJSON

{
  "jobData": {
    "activity": {
      "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/security/v1",
        {
          "Key": "sec:Key",
          "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
          "sensitive": "as:sensitive",
          "Hashtag": "as:Hashtag",
          "quoteUrl": "as:quoteUrl",
          "toot": "http://joinmastodon.org/ns#",
          "Emoji": "toot:Emoji",
          "featured": "toot:featured",
          "discoverable": "toot:discoverable",
          "schema": "http://schema.org#",
          "PropertyValue": "schema:PropertyValue",
          "value": "schema:value",
          "misskey": "https://misskey-hub.net/ns#",
          "_misskey_content": "misskey:_misskey_content",
          "_misskey_quote": "misskey:_misskey_quote",
          "_misskey_reaction": "misskey:_misskey_reaction",
          "_misskey_votes": "misskey:_misskey_votes",
          "_misskey_summary": "misskey:_misskey_summary",
          "_misskey_talk": "misskey:_misskey_talk",
          "isCat": "misskey:isCat",
          "vcard": "http://www.w3.org/2006/vcard/ns#"
        }
      ],
      "id": "https://chpk.kur0den.net/notes/9v0sm6adsz951rvm/activity",
      "actor": "https://chpk.kur0den.net/users/9pohz0x5owfn0001",
      "type": "Announce",
      "published": "2024-06-27T12:16:33.109Z",
      "to": [
        "https://www.w3.org/ns/activitystreams#Public"
      ],
      "cc": [
        "https://chpk.kur0den.net/users/9pohz0x5owfn0001/followers"
      ],
      "object": "https://mastodon.motcha.tech/users/mot/statuses/112688480168204701"
    },
    "signature": {
      "scheme": "Signature",
      "params": {
        "keyId": "https://chpk.kur0den.net/users/9pohz0x5owfn0001#main-key",
        "algorithm": "rsa-sha256",
        "headers": [
          "(request-target)",
          "date",
          "host",
          "digest"
        ],
        "signature": "省略"
      },
      "signingString": "(request-target): post /inbox\ndate: Thu, 27 Jun 2024 12:16:33 GMT\nhost: engawa.esurio1673.net\ndigest: SHA-256=[省略]",
      "algorithm": "RSA-SHA256",
      "keyId": "https://chpk.kur0den.net/users/9pohz0x5owfn0001#main-key"
    }
  },
  "returnValue": null
}
1673beta commented 3 months ago

IAnnounceでtype: Announceを指定してるけど、何らかの理由でIPostのtypeと解釈されてそう

1673beta commented 1 month ago

Misskey側でこのPR出てるからうちで直す必要はなさそうかも https://github.com/misskey-dev/misskey/pull/14361