~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/grain-ios-likes-zds.md

Grain iOS likes not landing on zds.zzstoatzz.io (2026-11-22, ~02:54 UTC)

0
0
1 file · 0 comments
History
Code
grain-ios-likes-zds.md 49 lines · 3.3 KB Raw

Grain iOS: likes not reaching zds.zzstoatzz.io

Account: zzstoatzz.io, did:plc:xbtmt2zjwlrfegqvch7fboei, PDS https://zds.zzstoatzz.io (zds). All times UTC, 2026-11-22.

What grain.social saw

TimeClientWhat happened
02:52:36grain.social web, iPhone Safariold web session carried over from the previous server
02:53:05grain.social websigned in again: ok
02:54:32Grain iOS app, proxied by zds (User-Agent: zttp/0.4.1)POST /xrpc/social.grain.sync.indexRecords → 200, indexed: 0, not_found: 1
02:55:01Grain iOS app, proxied by zdsindexRecords → 200, indexed: 0, not_found: 1
02:59:44–52grain.social web2 unlikes, 3 likes (social.grain.repo.createRecord/deleteRecord → 200); each landed at zds and was indexed within 0.3 s

The three web likes are at your PDS:

at://did:plc:xbtmt2zjwlrfegqvch7fboei/social.grain.favorite/3n2umprnpwrzo  02:59:46.213Z
at://did:plc:xbtmt2zjwlrfegqvch7fboei/social.grain.favorite/3n2umpvh6r6zt  02:59:50.331Z
at://did:plc:xbtmt2zjwlrfegqvch7fboei/social.grain.favorite/3n2umpww4krzw  02:59:51.829Z

The next newest social.grain.favorite is from 2026-11-08, so neither like from the app (02:54, 02:55) exists in the repo.

How an iOS like works

  1. The app writes social.grain.favorite directly at the PDS (com.atproto.repo.createRecord, or applyWrites) with its own OAuth session. grain.social never sees this request.
  2. The app then calls social.grain.sync.indexRecords {uris: [<the new record>]} through the PDS's service proxy (atproto-proxy: did:web:grain.social#grain_appview), with a service token for that method.
  3. grain.social verifies the token, then reads each URI back from the account's PDS (com.atproto.repo.getRecord). not_found means that read found nothing.

So at 02:54 and 02:55, step 2 worked: zds proxied the call and the service token verified. But either step 1 failed, or the record wasn't readable when grain.social read it back.

The app's OAuth client

  • client_id: https://grain.social/oauth/app-client-metadata.json (native, DPoP-bound, redirect_uris: ["social.grain:/oauth/callback"])
  • Scope it asks for: see scope in that document (atproto blob:image/* repo:social.grain.favorite …). It hasn't changed in the last 36 hours. It doesn't use a permission set (include:).

Worth checking on zds

  1. zds logs around 02:54:30 and 02:55:00 UTC: a createRecord / applyWrites for social.grain.favorite from that client. Was it refused (scope, DPoP nonce, expired or rotated token), or accepted?
  2. If it was accepted: does getRecord for that rkey answer right after the commit? grain.social reads it back within about a second of the write.
  3. Check whether the app's OAuth session at zds still holds repo:social.grain.favorite after a refresh. zds validates the requested scope against the client metadata. A rotation that narrows or drops the scope would turn writes into refusals.
  4. Try it: sign out of the Grain app and sign in again, then like a gallery. If that works, the old session (its tokens or scope) is the cause.

Reading back what grain.social will see:

curl -s 'https://zds.zzstoatzz.io/xrpc/com.atproto.repo.listRecords?repo=did:plc:xbtmt2zjwlrfegqvch7fboei&collection=social.grain.favorite&limit=5' | jq '.records[] | {uri, createdAt: .value.createdAt}'