Repository navigation
Troubleshooting
The errors you're most likely to hit, with the fix in each case.
Your JAVA_HOME is pointing at an Android Studio JBR install that doesn't exist (typical on a fresh dev machine that's never had Studio installed).
# PowerShell — install OpenJDK 17 and point JAVA_HOME at it
winget install Microsoft.OpenJDK.17
$env:JAVA_HOME = "C:\Program Files\Microsoft\jdk-17.0.19.10-hotspot"Or set it permanently via System Properties → Environment Variables.
Either you've never run ./retrieve_secrets.sh, or it failed silently. Run:
./retrieve_secrets.sh…and confirm app/google-services.json now exists. If the script ran but the file is empty, jq is probably broken (see next).
You have the npm package jq installed, which is a broken JS port. Replace it with the real binary:
npm uninstall -g jq # remove the broken one
winget install jqlang.jq # install the real binary
# new shell, or temporarily prepend to PATH:
export PATH="/c/Users/$USER/AppData/Local/Microsoft/WinGet/Links:$PATH"
jq --version # should show jq-1.8.xNetwork issue or proxy. Try:
./gradlew --refresh-dependencies buildIf you're behind a corporate proxy, configure it in ~/.gradle/gradle.properties.
You added a repositories { … } block inside a module's build.gradle.kts. settings.gradle.kts enforces FAIL_ON_PROJECT_REPOS — add the repo in settings.gradle.kts instead.
Lint vital is part of the release pipeline. If it's slow, it's analyzing your code (normal on cold cache). If it actually hangs, check the Gradle daemon: ./gradlew --stop then retry.
app/proguard-rules.pro should already preserve Subscription and PaymentRecord with -keep class … { *; }. If you add a new Firestore-mapped data class, add the same -keep rule. Symptom in production builds only — debug builds don't minify.
SHA-1 of your build's keystore isn't registered in Firebase for this app.
./gradlew :app:signingReportCopy the SHA1 under Variant: debug (or your release variant). Firebase Console → Project settings → Your apps → (Android) com.hora.varisankya → Add fingerprint → paste → re-download google-services.json.
The registered fingerprints as of v3.8-beta.8 are listed in Firebase Setup.
The device has no Google account, or the system picker timed out. Add a Google account on the device → retry. On certain emulator images (AOSP without Google APIs) Credential Manager will never succeed — use a Google APIs emulator image.
You're passing the wrong setServerClientId(...) — it must be the project's Web OAuth client ID (663138385072-bke7f5oflsl2cg0e5maks0ef3n6o113u.apps.googleusercontent.com), not an Android client.
MainActivity.performLogout does both auth.signOut() and credentialManager.clearCredentialState(...). If you copy the logout code to a new path, do both — Credential Manager caches the account separately from Firebase Auth.
Rules aren't allowing the path. Check Logcat for the full PERMISSION_DENIED message — it'll quote the path. Then check firestore.rules and re-deploy with firebase deploy --only firestore:rules.
Lazy backfill is running (first-time-after-upgrade behaviour). Second visit and beyond reads from the flat collection in one round-trip. See Data Model & Migrations.
The flat-collection dual-write is being rejected — usually because rules haven't been re-deployed since the migration shipped. App still works correctly (legacy nested write is authoritative); All Payments just stays slow. Re-deploy rules.
Network connectivity issue. The Firestore SDK queues writes locally and flushes when the device reconnects. App state remains consistent; the UI may briefly show stale data.
First diagnostic step (since v3.8-beta.12): open Settings → Notifications → Send Test Notification. The button bypasses the worker entirely and posts a sample notification immediately. This narrows the problem decisively:
-
Test notification appears: the channel + permission + visibility chain on the device is healthy. The issue is on the scheduling side — WorkManager probably hasn't fired the worker yet, or battery optimisation is throttling it. Check the Firebase Analytics dashboard for
notification_worker_runevent counts to confirm. Whitelist the app from battery optimisation in OS settings. -
Test notification doesn't appear: the device isn't delivering at all. Causes in priority order:
-
POST_NOTIFICATIONSpermission isn't granted (Android 13+). Settings → Apps → Varisankya → Notifications. - The "Subscription Reminders" channel is disabled at the OS level. Settings → Apps → Varisankya → Notifications → Subscription Reminders.
- Aggressive battery saver / Do Not Disturb is active.
-
Historical note: earlier betas used IMPORTANCE_LOW for the channel, which posted notifications silently with no sound or peek. Users could miss them entirely. Bumped to IMPORTANCE_DEFAULT in v3.8-beta.12 via a new channel id (subscription_reminders_v3 — Android caches per-channel importance, so the bump required a new id).
This was the issue #7 bug — fixed in v3.8-beta.5. If you're on an older version, upgrade. If you're on beta.5+ and still seeing it, file a fresh issue with versionCode and steps.
You're tapping the body of the notification instead of the action. The action button is on the right side of the expanded notification.
The SubscriptionAdapter's singleShape/firstShape/middleShape/lastShape lookup needs the cached ShapeAppearanceModels to be built once. If you've touched that adapter, confirm the lookup-and-cache logic still runs on the first bind.
Auto-size text scales between autoSizeMinTextSize and autoSizeMaxTextSize. For large amounts (multi-currency totals like ₹ 12,345,678), the auto-size will pick a smaller font to fit. Increase autoSizeMaxTextSize only if you're confident the layout has room.
AppCompatDelegate.setDefaultNightMode(...) should recreate activities automatically. If the change requires a restart (font toggle does), SettingsActivity already does this via finish() + startActivity(intent).
Gradle sync failed earlier. Open Build → Sync Project with Gradle Files; look at the Build Output panel for the underlying error.
Studio caches tools:* preview attributes. Invalidate caches: File → Invalidate Caches….
You changed android.namespace or moved files between packages, then didn't sync. Build → Clean Project, then sync, then re-open.
app/play_console_key.json is missing or stale. Re-run ./retrieve_secrets.sh. Confirm the file exists and parses as JSON.
versionCode must monotonically increase. Bump it in app/build.gradle.kts, re-build, retry.
Read the Play Console message. Common ones: missing privacy policy URL, undeclared sensitive permission, broken target API requirement. Address in PRIVACY.md or AndroidManifest.xml as appropriate.
- Check Known Issues — your problem may be a known rough edge.
- File a GitHub issue with
versionCode, device + Android version, and reproduction steps.
Source: aarshps/varisankya-android · This wiki is human-facing; the repo itself targets AI coding agents (AGENTS.md).