Repository navigation
Description
Problem
After a single refused push registration, the Android app never tries to register that server for push again. Nothing in the app says push is off; signing out and back in, and turning notifications off and on, don't recover it. Only clearing the app's storage does.
Seen once on an Android phone, Silo Android 1.0.0 (28) · 3cecc7a66, against a server at build 1804 · cc851494, during Notifications validation on 2026-11-02. The maintainer had removed the server in the app without signing out (#784) and added it back. The re-registration got 403 permission_denied ("The installation credential is invalid."): the server still held the phone's earlier installation key for the same device ID, and the app had made a new key. From then on the app called getPushRegistrationCapabilities and stopped; it never called registerPushDevice again, even after the server's stale installation record was deleted and the maintainer signed out, signed in and toggled notifications. Clearing the app's storage fixed it. A second remove-and-re-add did not reproduce the 403, so the exact trigger for the refusal is not pinned down.
Source evidence
origin/main at 51d4f9013, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/push/AndroidPushRegistrar.kt:
- Line 559-561: a 401, 403, 409 or 422 answer to a registration stores
refusal = "push_registration_refused"on the installation record ("No generation rebase or replacement secret after a definite refusal"). - Line 520: every later registration for that record returns
failure(it.refusal)before sending anything. - Nothing sets
refusalback to null. The record lives innoBackupFilesDir/push-installations-v2(PushInstallationStore.kt:61), keyed by server URL and device ID, so it survives sign-out, notification toggles and app updates.
Expected behavior
A refused registration does not disable push for that server forever. A new sign-in, or turning notifications back on, starts a fresh registration (new installation key or a new generation), and if push stays unavailable the notification settings say so instead of showing it as on.
Validation
- Make the server refuse one registration from a phone (for example: the server holds an installation record for the phone's device ID with a different key).
- Sign out and back in, or turn notifications off and on.
- The app should register again (
registerPushDevicereaches the server) and push should work, without clearing app storage.
Non-blocking; found during Notifications validation (Android task #346 C2).
AI-assisted: drafted with Claude Code (claude-opus-5-5) and GitHub CLI at the maintainer's direction. Behavior observed by the maintainer on a phone; registration calls and server state read by the agent from the server's logs and database; source traced on origin/main.
Activity
Quick104 commentedon Nov 5, 2026
Fixed on
mainby #795, first shipped inv1.0.0-beta.29. The build in this report (1.0.0 (28)) predates it.#795 changed the stored-refusal check in
AndroidPushRegistrarso a refusal blocks only the login that received it. Every sign-in writes a new login ID, and a re-added server keeps its server ID (it is derived from the URL). Signing out and back in, or removing the server, adding it back and signing in, now registers again at the next generation with the same installation key. The key stays the same because Android has no installation reset route and the push contract forbids sending a replacement key.Checked with a unit test on
main(e57fbf3f6): after a403, the same login stays refused and sends nothing; a new sign-in sends generation 2 with the same key and is acknowledged. Not re-tested on a device.Not covered, and not part of #795:
AI-assisted: investigated with Claude Code (claude-opus-5-5) and GitHub CLI.