Description
Push notifications do not work on the Android preview APK (dev.happier.app.preview) downloaded from GitHub releases. The app cannot obtain an Expo push token due to a Firebase Installation Service authentication error.
Environment
- App: Android APK from GitHub releases (preview build)
- Package:
dev.happier.app.preview
- Server: Self-hosted relay server
- Daemon: Running correctly, connected to self-hosted server
Error Log
From Dev Logs in the app:
Failed to get Expo push token: Error: Fetching the token failed: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR
at construct (native)
at apply (native)
at _construct (address at /data/user/0/dev.happier.app.preview/files/.expo-internal/008cb7b86de85b0915603e721afa26ba:1:1491734)
at Wrapper (address at /data/user/0/dev.happier.app.preview/files/.expo-internal/008cb7b86de85b0915603e721afa26ba:1:1491379)
at construct (native)
at _callSuper (address at /data/user/0/dev.happier.app.preview/files/.expo-internal/008cb7b86de85b0915603e721afa26ba:1:1489738)
at CodedError (address at /data/user/0/dev.happier.app.preview/files/.expo-internal/008cb7b86de85b0915603e721afa26ba:1:1488492)
Root Cause Analysis
The FIS_AUTH_ERROR occurs because Firebase Installation Service cannot authenticate the app. This is likely due to a SHA signing fingerprint mismatch: the APK's signing key fingerprint is not registered in the Firebase console for the dev.happier.app.preview package.
The google-services.json in the repo includes entries for dev.happier.app, dev.happier.app.dev, and dev.happier.app.preview, so the package name itself is configured. However, Firebase also validates the APK signing certificate fingerprint, and the key used to sign the GitHub release APK may not be registered in the Firebase project (happier-4a4fd, project number 427065718939).
Impact
registerPushTokenIfAvailable() in syncAccount.ts calls Notifications.getExpoPushTokenAsync() which throws this error
- No push token is ever obtained, so no token is registered with any server
- The CLI daemon fetches an empty token list from the server and silently sends no notifications
- Push notifications are completely non-functional on the preview APK
Suggested Fix
Add the SHA-1 and SHA-256 fingerprints of the signing key used for GitHub release APKs to the Firebase console under the dev.happier.app.preview app entry. Alternatively, clarify which build variant (preview-apk vs production-apk) is intended to support push notifications for sideloaded installs.
🤖 Generated with Claude Code
Description
Push notifications do not work on the Android preview APK (
dev.happier.app.preview) downloaded from GitHub releases. The app cannot obtain an Expo push token due to a Firebase Installation Service authentication error.Environment
dev.happier.app.previewError Log
From Dev Logs in the app:
Root Cause Analysis
The
FIS_AUTH_ERRORoccurs because Firebase Installation Service cannot authenticate the app. This is likely due to a SHA signing fingerprint mismatch: the APK's signing key fingerprint is not registered in the Firebase console for thedev.happier.app.previewpackage.The
google-services.jsonin the repo includes entries fordev.happier.app,dev.happier.app.dev, anddev.happier.app.preview, so the package name itself is configured. However, Firebase also validates the APK signing certificate fingerprint, and the key used to sign the GitHub release APK may not be registered in the Firebase project (happier-4a4fd, project number427065718939).Impact
registerPushTokenIfAvailable()insyncAccount.tscallsNotifications.getExpoPushTokenAsync()which throws this errorSuggested Fix
Add the SHA-1 and SHA-256 fingerprints of the signing key used for GitHub release APKs to the Firebase console under the
dev.happier.app.previewapp entry. Alternatively, clarify which build variant (preview-apk vs production-apk) is intended to support push notifications for sideloaded installs.🤖 Generated with Claude Code