Troubleshoot pending Mastodon follow #6
Labels
No labels
activitypub
actor
admin
ai-safety
article
articles
atproto
bug
cli
configuration
content
dev-environment
docker
enhancement
feature
federation
fediverse
forgejo
garage
health
how-to
logging
markdown
mastodon
media
navigation
opengraph
passkeys
preview
priority:medium
production
release
rendering
s3
settings
setup
status:active
status:done
status:inprogress
technical
webauthn
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit.com#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Diagnose and fix why following
@slug@slugkit.comfrom Mastodon remains pending and does not appear in theslugkit.comfollowers collection.Requirements
https://slugkit.com/users/slug/inboxhttps://slugkit.com/inboxFollowactivity reaches the app.Accept, or Mastodon processing the response.Observed data
https://slugkit.com/users/slugreturnsHTTP 200withContent-Type: application/activity+json.https://slugkit.com/.well-known/webfinger?resource=acct:slug@slugkit.comacct:slug@slugkit.comhttps://slugkit.com/users/slughttps://slugkit.com/users/slug/inboxhttps://slugkit.com/users/slug/outboxhttps://slugkit.com/users/slug/followershttps://slugkit.com/users/slug/followinghttps://slugkit.com/users/slug/featuredhttps://slugkit.com/inboxhttps://slugkit.com/users/slug#main-keyhttps://slugkit.com/users/slug/followerstype: OrderedCollectiontotalItems: 0@slug@slugkit.comshowsCancel request, which indicates Mastodon considers the follow request pending rather than accepted.400 Missing actor, showing the routes are reachable but does not validate signed ActivityPub delivery.GET /users/slug/inboxreturns404; this may be acceptable for an inbox, but should be checked against expected Fedify/ActivityPub behavior.Acceptance criteria
@slug@slugkit.comfrom Mastodon results in an accepted follow instead of a pending request.https://slugkit.com/users/slug/followersreports the Mastodon follower after the follow is accepted.Acceptresponse for validFollowactivities.Dependencies
Synced from todu comment by @todu on 2026-06-26T19:01:22.866Z
Deployment update
Deployed a slugkit.com test fix via GitOps for Mastodon follow verification.
Changes in slugkit.com commit
4457983:Followis processed into a follower row and queues anAccept.Release/deploy details:
task-becaf72b-activitypub-follow.web-v0.1.2-rc.1.#6succeeded and pushed imageevcraddock/slugkit-com:0.1.2-rc.1.f0dc699to use that image and setACTIVITYPUB_ENABLED=true.main@sha1:f0dc699059e83e1f8c6fea16d9763ab87b501161.slugkit-com-58d7fb58d5-cszf7and rollout succeeded.Post-deploy checks:
slugkit ActivityPub queue worker started.https://slugkit.com/users/slug/inboxand shared inboxhttps://slugkit.com/inbox.totalItems: 0before the new verification follow.Verification needed from Mastodon: cancel the existing pending request if necessary, then follow
@slug@slugkit.comagain and check whether the app logs follower persistence/Accept queueing and whether the followers collection increments.Synced from todu comment by @todu on 2026-06-26T19:29:00.111Z
Verification success
After deploying
evcraddock/slugkit-com:0.1.2withACTIVITYPUB_ENABLED=true, Mastodon follow verification succeeded.Observed production logs after retrying the follow:
path: '/users/slug/inbox'.ActivityPub Follow accepted and follower savedlogged with followerhttps://mastodon.online/users/evcraddock.ActivityPub Follow Accept queuedlogged.Production DB state:
followerscontains one active follower:https://mastodon.online/users/evcraddock@evcraddock@mastodon.onlinehttps://mastodon.online/users/evcraddock/inboxhttps://mastodon.online/inboxunfollowed_at: nullPublic checks:
https://slugkit.com/users/slug/followersreturnstotalItems: 1and includeshttps://mastodon.online/users/evcraddock.https://slugkit.com/feednow rendersFollowers 1.Root cause confirmed: generated app was not starting Fedify's queue worker, so queued inbox activities were not processed. Enabling federation in deployment was also required (
ACTIVITYPUB_ENABLED=true).Synced from todu comment by @todu on 2026-06-26T23:21:40.055Z
Update
/main-keysigning experiment inslugkit.comwith commit833f450(Revert "Sign follow accepts with standalone key URL").evcraddock/slugkit-com:0.1.7from the reverted code.9faeb91(Roll slugkit-com back to 0.1.7) and reconciled Flux.0.1.7.GET https://slugkit.com/users/slugreturnscontent-type: application/activity+json.publicKey.idis back tohttps://slugkit.com/users/slug#main-key.GET https://slugkit.com/users/slug/main-keynow returns404.task-58e3d3cb(Align ActivityPub key IDs with actor document) with the Mastodon error details and slugkit.com code/commit context for a different clanker to implement correctly.Synced from todu comment by @todu on 2026-06-27T13:17:43.249Z
Update
d748155(Use default Fedify delivery for follow accepts) to production.evcraddock/slugkit-com:0.1.8.40df236(Roll slugkit-com forward to 0.1.8) and reconciled Flux.0.1.8.GET https://slugkit.com/users/slugreturnscontent-type: application/activity+json.publicKey.idremainshttps://slugkit.com/users/slug#main-key.GET https://slugkit.com/users/slug/followersreportstotalItems: 1.erikcraddock.mefollow-accept delivery path by using Fedify's defaultctx.sendActivity(...)behavior instead of forcing{ preferSharedInbox: true, immediate: true }.Synced from todu comment by @todu on 2026-06-27T13:21:48.162Z
Handoff update: ActivityPub follow still unresolved
Current status: not fixed. Mastodon still does not complete the follow for
@slug@slugkit.com; UI reportedly remains wrong/pending after the latest deployment.Production state
evcraddock/slugkit-com:0.1.840df236(Roll slugkit-com forward to 0.1.8)task-becaf72b-activitypub-followd748155(Use default Fedify delivery for follow accepts)GET https://slugkit.com/users/slugreturnsapplication/activity+jsonpublicKey.idishttps://slugkit.com/users/slug#main-keyGET https://slugkit.com/users/slug/followersreturnstotalItems: 1What has been fixed/verified
Queue worker issue was real and fixed
manuallyStartQueue: truebut did not start the queue worker.src/federation/routes.tssrc/index.tsFollowreached/users/slug/inbox.https://mastodon.online/users/evcraddock./users/slug/followersand/feedshowed follower count1.task-677d2a8f.Generic actor fetch was added
GET https://slugkit.com/users/slugnow returns ActivityPub JSON even without an ActivityPubAcceptheader.https://slugkit.com/users/slug#main-keyby fetching the actor URL.Standalone
/main-keyexperiment was tried and revertedCommit
b0fd7a6tried signing outbound followAcceptwithhttps://slugkit.com/users/slug/main-keyand added a standalone key endpoint.Mastodon rejected it with:
Root cause: actor document still advertised
publicKey.idashttps://slugkit.com/users/slug#main-key, so Mastodon correctly rejected the/main-keykey ID mismatch.Reverted in commit
833f450and deployed as0.1.7.Follow-up slugkit template task created:
task-58e3d3cb(Align ActivityPub key IDs with actor document).Follow Accept delivery was changed to match known-working site
Compared slugkit.com to known-working repo:
/home/erik/Private/code/github/evcraddock/erikcraddock.me.Core Follow handler shape was similar.
Differences found:
ctx.sendActivity({ identifier }, followerActor, accept).{ preferSharedInbox: true, immediate: true }.Commit
d748155changed slugkit.com to Fedify default delivery:Tests/build passed and this was deployed as
0.1.8.This still did not resolve the real Mastodon follow state.
Important observed Mastodon errors
Earlier outbound
Acceptfailures included:and during the
/main-keyexperiment:The second error is understood and reverted. The remaining issue is likely still around outbound signed
Acceptdelivery/signature verification, but that is not proven.Comparison with known-working erikcraddock.me
Known-working site:
Repo:
/home/erik/Private/code/github/evcraddock/erikcraddock.meMain federation file:
src/federation/setup.tsFollow handler:
new Accept({ actor: ctx.getActorUri("erik"), object: follow })await ctx.sendActivity({ identifier: "erik" }, followerActor, accept)Uses
@fedify/fedify1.10.2Uses persistent Fedify KV via
SqliteKvStoreExports a single long-lived federation instance:
slugkit.com differs:
@fedify/fedify2.3.0from lockfile.new MemoryKvStore().createActivityPubFederation(options).Do not downgrade Fedify unless explicitly approved. The next clanker should port working runtime shape forward where possible instead of reverting to old dependency versions.
Strong next leads
Capture exact outbound request to Mastodon
Acceptto compare against erikcraddock.me.Signature/Signature-InputDigest/Content-DigestDateHostContent-TypekeyIdMake slugkit.com runtime more like erikcraddock.me
MemoryKvStore.Check Fedify 2 HTTP signature behavior against Mastodon
Avoid more
/main-keychanges unless actor document is changed consistently/users/slug/main-key, actor document must advertisepublicKey.id = https://slugkit.com/users/slug/main-keytoo.#main-key.Private key rotation still needed after troubleshooting
Files changed in slugkit.com during this investigation
src/federation/routes.tssrc/federation/follow.tssrc/federation/__tests__/routes.test.tssrc/index.tsTest status before latest deploy
npm testpassed: 265 testsnpm run buildpassedBottom line
The site now accepts and persists the incoming Follow locally, but Mastodon still does not treat the follow as accepted. The remaining problem is almost certainly outbound
Acceptdelivery/signature compatibility or Fedify runtime setup, not local follower persistence.Synced from todu comment by @todu on 2026-06-27T13:52:57.047Z
Update
evcraddock/slugkit-com:0.1.9from slugkit.com commit9f5e309(Sign ActivityPub sends with multikey id).assertionMethodashttps://slugkit.com/users/slug#multikey-1, but outbound Accept delivery was signed with Fedify's default legacy#main-key, so Mastodon rejected it withPublic key not found for key https://slugkit.com/users/slug#main-key.#multikey-1while keeping the current Fedify version.80c5f48(Roll slugkit-com forward to 0.1.9) and reconciled Flux successfully.@slug@slugkit.comagain, refreshed the Mastodon profile, and it remainedUnfollowinstead of reverting toCancel request.https://slugkit.com/users/slug/followersreportstotalItems: 1withhttps://mastodon.online/users/evcraddock.Synced from todu comment by @todu on 2026-06-27T15:01:40.232Z
Completed
assertionMethodRSA key as#multikey-1, while outbound ActivityPub delivery was signed with the legacy#main-key, producingPublic key not found for key https://slugkit.com/users/slug#main-key.Acceptdelivery and follower fanout delivery so outbound requests sign with#multikey-1.@slug@slugkit.comremains accepted after refresh (Unfollowinstead ofCancel request).https://slugkit.com/users/slug/followersreports the Mastodon follower.https://mastodon.online/@slug@slugkit.com.Accept, direct delivery, shared inbox delivery, and follower fanout key ids.mainatd6007d0.