Skip to content

fix(pubky): new bindings that end the Android "You're offline" failures - #125

Merged
jvsena42 merged 1 commit into
mainfrom
fix/pubky-0.10-tls-revoked
Aug 24, 2026
Merged

fix(pubky): new bindings that end the Android "You're offline" failures#125
jvsena42 merged 1 commit into
mainfrom
fix/pubky-0.10-tls-revoked

Conversation

@jvsena42

Copy link
Copy Markdown
Owner

Third and final fix to the same user-visible symptom. #122 shipped the verifier's missing Kotlin half — without it nothing verified at all. This makes what it verifies actually pass.

Picks up pubky-core-ffi-fork#2, which is two fixes: the upstream sync to pubky 0.10, and a relay-client TLS config the fork adds on top. Both are needed — measured on-device, neither alone stopped the errors.

Why

rustls-platform-verifier hard-fails revocation checking on Android: Let's Encrypt no longer publishes an OCSP responder, Android's PKIXRevocationChecker only tries OCSP, and the crate's Kotlin half turns the resulting exception into StatusCode.Revoked:

certificate was revoked: java.security.cert.CertPathValidatorException:
    Certificate does not specify OCSP responder

That reaches Kotlin as HTTP transport error, which isNetworkFailure() matches — so users were told they were offline on a working connection. There is no version to upgrade to: the crate's own escape hatch is BuildConfig.TEST-gated and 0.7.0 is the latest release.

pubky 0.10 fixes this for the SDK's ICANN client. It does not cover pkarr's relay client — after the bump alone the device still logged 8 Revoked failures, every one straight after Resolving homeserver … via PKARR, and Home failed to load. The fork now hands that client the same webpki-roots-without-revocation config.

API change to absorb

0.10's signin takes a ClientId, so signUp, signIn, startAuthFlow, put, putBytes and deleteFile each gained a clientId argument.

Added as LOOPKY_CLIENT_ID / loopkyClientId = "loopky.app" — a domain string, as the type wants (its own example is franky.pubky.app), and deliberately not the application id or bundle identifier. Byte-for-byte identical on both platforms and across build types: it travels to the homeserver, so it names Loopky, not this build of it.

Verified on-device

Redmi Note 11, Android 13, release build, same account and navigation each time:

ClassNotFound "Revoked" transport errors Loopky errors
after #122 alone 0 8 3 13 — Home failed to load
+ pubky 0.10 only 0 8 3 still failing (relay client)
+ this PR 0 0 0 0

Session resolves in 1.8 s instead of failing for 12.

Size

Regenerated libs are llvm-stripped to match upstream, taking the release APK from 121 MB to 108 MB. Still over Play's 100 MB APK ceiling — that is the separate packaging work, not this.

🤖 Generated with Claude Code

Picks up pubky-core-ffi-fork@93e3245, which is two fixes: the upstream sync to
pubky 0.10, and a relay-client TLS config the fork adds on top. Both are needed
— measured on-device, neither alone stopped the errors.

Background. rustls-platform-verifier hard-fails revocation checking on Android:
Let's Encrypt no longer publishes an OCSP responder, Android's
PKIXRevocationChecker only tries OCSP, and the crate's Kotlin half turns the
resulting CertPathValidatorException into `StatusCode.Revoked`:

    certificate was revoked: java.security.cert.CertPathValidatorException:
        Certificate does not specify OCSP responder

That reaches Kotlin as `HTTP transport error`, which `isNetworkFailure()`
matches, so users were told they were offline on a working connection.

pubky 0.10 fixes this for the SDK's ICANN client. It does not cover pkarr's
relay client, which is built from reqwest's defaults — after the bump alone the
device still logged 8 `Revoked` failures, every one straight after "Resolving
homeserver … via PKARR", and Home failed to load. The fork now hands pkarr's
relay client the same webpki-roots-without-revocation config through
`ClientBuilder::reqwest_client`.

This is the third fix to the same user-visible symptom and the last of them.
#122 shipped the verifier's missing Kotlin half; without it nothing verified at
all. This makes what it verifies actually pass.

API change to absorb: 0.10's `signin` takes a `ClientId`, so `signUp`, `signIn`,
`startAuthFlow`, `put`, `putBytes` and `deleteFile` each gained a `clientId`
argument. Added as `LOOPKY_CLIENT_ID` / `loopkyClientId` — a domain string, as
the type wants, and deliberately not the application id or bundle identifier.
Byte-for-byte the same on both platforms and across build types: it travels to
the homeserver, so it names Loopky, not this build of it.

Verified on-device (Redmi Note 11, Android 13, release build), same account and
navigation each time:

    after #122 alone     0 ClassNotFound, 8 "Revoked", Home failed to load
    after 0.10 alone     still 8 "Revoked" — the relay client
    with these bindings  0 ClassNotFound, 0 TLS failures, 0 transport errors,
                         0 Loopky errors; session resolves in 1.8s, not 12

Regenerated libs are `llvm-strip`ped to match upstream, taking the release APK
from 121 MB to 108 MB. Still over Play's 100 MB ceiling — separate packaging
work, not this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jvsena42
jvsena42 merged commit aa46b11 into main Aug 24, 2026
2 checks passed
@jvsena42
jvsena42 deleted the fix/pubky-0.10-tls-revoked branch August 24, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant