Skip to content

Keep the web client ID in release builds (1.1.1) - #66

Merged
SamiPr0 merged 2 commits into
mainfrom
fix/keep-web-client-id
Oct 6, 2026
Merged

SamiPr0 merged 2 commits into
mainfrom
fix/keep-web-client-id

Conversation

@SamiPr0

@SamiPr0 SamiPr0 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Problem

In the v1.1.0 release, Google sign-in fails with "Google sign-in isn't set up yet - enable the Google provider in the Firebase console, then rebuild." The Firebase setup is fine: Google is enabled.

AuthRepositoryFirebase reads R.string.default_web_client_id by name (Resources.getIdentifier), so it compiles before Google sign-in is configured. The resource shrinker I enabled in #52 can't see that lookup, so it removed the string from release builds:

  • aapt2 dump resources on the published PoolTrack-1.1.0.apk shows google_app_id, google_api_key, … but no default_web_client_id.
  • The string is generated in build/generated/res/processReleaseGoogleServices, and then shrunk away.

My R8 check in #52 only inspected classes, not resources. Sorry.

Change

  • res/raw/keep.xml with tools:keep="@string/default_web_client_id". That file isn't packaged itself.
  • Release workflow guard: after assembleRelease, it refuses to publish if the APK has no default_web_client_id.
  • GoogleSignInConfigTest: fails if google-services.json, local or in the CI secret, lacks the web client, so a stale file is caught on a PR rather than on a phone.
  • Version 1.1.1, so phones on 1.1.0 are offered the fix by the in-app updater. The update prompt shows above the sign-in screen, so a phone that can't sign in can still update.

Verification

  • A local assembleRelease now contains string/default_web_client_id.
  • I ran the guard's check by hand: it blocks the published v1.1.0 APK and passes the new build.
  • The new unit test passes. ./gradlew ktfmtCheck check is running locally, and CI will run on this PR.

After merging

Tag v1.1.1 on the merge commit. Phones on 1.1.0 will get the update prompt on their next launch.

🤖 Generated with Claude Code

SamiPr0 and others added 2 commits October 6, 2026 20:08
AuthRepositoryFirebase reads default_web_client_id by name, which the
resource shrinker enabled in #52 cannot see. It removed the string, so
release builds showed "Google sign-in isn't set up yet" and could not
sign in. keep.xml now keeps it.

The release workflow refuses to publish an APK without the string, and
a unit test fails if google-services.json lacks the web client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ships the Google sign-in fix to phones on 1.1.0 through the in-app
updater.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SamiPr0
SamiPr0 merged commit fc87a6f into main Oct 6, 2026
3 checks passed
@SamiPr0
SamiPr0 deleted the fix/keep-web-client-id branch October 6, 2026 18:21
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