note url <> uri host mismatch for fed.brid.gy
What happened?
Some posts from brid.gy get rejected with an Error: note url <> uri host mismatch
.
Example:
❯ http -j GET "https://fed.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j" "Accept:application/activity+json" | jq '{id,url}'
{
"id": "https://bsky.brid.gy/convert/ap/at://did:plc:liffvilvtugx3w7xycnbjweg/app.bsky.feed.post/3lbz5rkcgek2j",
"url": "https://fed.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j"
}
If you do a follow-up request towards the ID you get a response with a matching host:
❯ http -j GET "https://bsky.brid.gy/convert/ap/at://did:plc:liffvilvtugx3w7xycnbjweg/app.bsky.feed.post/3lbz5rkcgek2j" "Accept:application/activity+json" | jq '{id,url}'
{
"id": "https://bsky.brid.gy/convert/ap/at://did:plc:liffvilvtugx3w7xycnbjweg/app.bsky.feed.post/3lbz5rkcgek2j",
"url": "https://bsky.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j"
}
Steps to reproduce
Try a lookup of https://fed.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j
What did you expect to happen?
Mastodon seem to handle this somehow gracefully.
But I'm currently not sure whether brid.gy needs to change the id/url mismatch in the response or Sharkey needs to change the handling if such mismatch occurs.
I'm reporting this here, though because this error was introduced with ebea1a29
Version
2024.9.4
Instance
What type of issue is this?
Backend
Relevant log output
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ERR 1 [queue inbox] failed(Error: note url <> uri host mismatch: https://fed.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j <> https://bsky.brid.gy/convert/ap/at://did:pl
Nov 28 14:19:42 clear-skies hooves-web[2001218]: job: {
Nov 28 14:19:42 clear-skies hooves-web[2001218]: name: undefined,
Nov 28 14:19:42 clear-skies hooves-web[2001218]: info: 'id=617375 attempts=1/8 age=11ms',
Nov 28 14:19:42 clear-skies hooves-web[2001218]: failedReason: 'note url <> uri host mismatch: https://fed.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j <> https://bsky.brid.gy/convert/ap/at://did:plc:liffvilvtugx3w7xycnbjweg/app
Nov 28 14:19:42 clear-skies hooves-web[2001218]: data: { activity: [Object], signature: [Object] }
Nov 28 14:19:42 clear-skies hooves-web[2001218]: },
Nov 28 14:19:42 clear-skies hooves-web[2001218]: e: {
Nov 28 14:19:42 clear-skies hooves-web[2001218]: stack: 'Error: note url <> uri host mismatch: https://fed.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j <> https://bsky.brid.gy/convert/ap/at://did:plc:liffvilvtugx3w7xycnbjweg/app
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at ApNoteService.createNote (file:///sharkey/packages/backend/built/core/activitypub/models/ApNoteService.js:163:23)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at async ApInboxService.createNote (file:///sharkey/packages/backend/built/core/activitypub/ApInboxService.js:406:13)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at async ApInboxService.create (file:///sharkey/packages/backend/built/core/activitypub/ApInboxService.js:383:13)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at async ApInboxService.performOneActivity (file:///sharkey/packages/backend/built/core/activitypub/ApInboxService.js:162:20)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at async ApInboxService.performActivity (file:///sharkey/packages/backend/built/core/activitypub/ApInboxService.js:147:22)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at async InboxProcessorService.process (file:///sharkey/packages/backend/built/queue/processors/InboxProcessorService.js:195:28)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at async Worker.processJob (/sharkey/node_modules/.pnpm/bullmq@5.13.2/node_modules/bullmq/dist/cjs/classes/worker.js:455:28)\n' +
Nov 28 14:19:42 clear-skies hooves-web[2001218]: ' at async Worker.retryIfFailed (/sharkey/node_modules/.pnpm/bullmq@5.13.2/node_modules/bullmq/dist/cjs/classes/worker.js:640:24)',
Nov 28 14:19:42 clear-skies hooves-web[2001218]: message: 'note url <> uri host mismatch: https://fed.brid.gy/r/https://bsky.app/profile/did:plc:liffvilvtugx3w7xycnbjweg/post/3lbz5rkcgek2j <> https://bsky.brid.gy/convert/ap/at://did:plc:liffvilvtugx3w7xycnbjweg/app.bsky
Nov 28 14:19:42 clear-skies hooves-web[2001218]: name: 'Error'
Nov 28 14:19:42 clear-skies hooves-web[2001218]: }
Nov 28 14:19:42 clear-skies hooves-web[2001218]: }
Contribution Guidelines
By submitting this issue, you agree to follow our Contribution Guidelines
- I agree to follow this project's Contribution Guidelines
- I have searched the issue tracker for similar issues, and this is not a duplicate.