remote AP assumes all actors have a corresponding following/followers collection
What happened? (Please give us a brief description of what happened.)
My instance is trying to update a remote instance actor, this actor exists on an akkoma instance. the path /internal/fetch/following and /internal/fetch/followers return an empty page. This causes an error when trying to parse as an activitypub following collection
What did you expect to happen? (Please give us a brief description of what you expected to happen.)
I expected the software to understand according to ActivityPub specifications and I quote
https://www.w3.org/TR/activitypub/#actor-objects
Implementations SHOULD, in addition, provide the following properties:
following
A link to an ActivityStreams collection of the actors that this actor is following; see 5.4 Following Collection
followers
A link to an ActivityStreams collection of the actors that follow this actor; see 5.3 Followers Collection.
This is an optional collection, it is not mandated and not every actor is going to have a corresponding actorid/following and actorid/followers. We should not throw an "error" in logs for this, as it is okay for those to be missing. (I'm not sure if anything breaks when this error is thrown though, does it continue updating the actor?)
Version (What version of Sharkey is your instance running? You can find this by clicking your instance's logo at the top left and then clicking instance information.)
2024.9.3
Instance (What instance of Sharkey are you using?)
What type of issue is this? (If this happens on your device and has to do with the user interface, it's client-side. If this happens on either with the API or the backend, or you got a server-side error in the client, it's server-side.)
backend
How do you deploy Sharkey on your server? (Server-side issues only)
docker (although N/A because this is a bug with the underlying AP logic)
What operating system are you using? (Server-side issues only)
debian (although N/A because this is a bug with the underlying AP logic)
Relevant log output (Please copy and paste any relevant log output. You can find your log by inspecting the page, and going to the "console" tab. This will be automatically formatted into code, so no need for backticks.)
INFO 3 [remote ap] Updating the Person: https://<>/internal/fetch
ERR 3 [remote ap] error occurred while fetching following/followers collection {
stack: Error: Validate content type of AP response: Content type is not application/activity+json or application/ld+json
at validateContentTypeSetAsActivityPub (file:///sharkey/packages/backend/built/core/activitypub/misc/validator.js:12:11)
at ApRequestService.signedGet (file:///sharkey/packages/backend/built/core/activitypub/ApRequestService.js:220:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Resolver.resolve (file:///sharkey/packages/backend/built/core/activitypub/ApResolverService.js:112:36)
at async Resolver.resolveCollection (file:///sharkey/packages/backend/built/core/activitypub/ApResolverService.js:76:56)
at async ApPersonService.isPublicCollection (file:///sharkey/packages/backend/built/core/activitypub/models/ApPersonService.js:682:30)
at async Promise.all (index 0)
at async ApPersonService.updatePerson (file:///sharkey/packages/backend/built/core/activitypub/models/ApPersonService.js:454:60)
at async ApDbResolverService.refetchPublicKeyForApId (file:///sharkey/packages/backend/built/core/activitypub/ApDbResolverService.js:138:9)
at async ActivityPubServerService.shouldRefuseGetRequest (file:///sharkey/packages/backend/built/server/ActivityPubServerService.js:188:28)
at async Object.<anonymous> (file:///sharkey/packages/backend/built/server/ActivityPubServerService.js:578:17)
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.