Skip to content

fix(auth): Preserve HostedUiException names under R8 in release builds - #7264

Draft
VarshithaPamisetty wants to merge 4 commits into
mainfrom
fix/auth-hosted-ui-cancel-release
Draft

fix(auth): Preserve HostedUiException names under R8 in release builds#7264
VarshithaPamisetty wants to merge 4 commits into
mainfrom
fix/auth-hosted-ui-cancel-release

Conversation

@VarshithaPamisetty

Copy link
Copy Markdown
Contributor

Description:
On Android (release only), cancelling signInWithWebUI throws UrlLauncherException instead of UserCancelledException. R8 obfuscates HostedUiException$CANCELLED, so its simpleName no longer matches the "CANCELLED" code Dart checks. Fixed by shipping a consumer ProGuard rule (consumerProguardFiles) that keeps HostedUiException under R8.

Tests:
Verified e2e on a real Cognito Hosted UI (release): cancel → UrlLauncherException without the fix, UserCancelledException with it.

Before (no fix) After (fix)
before after

Fixes #6395

@codecov-commenter

codecov-commenter commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.98%. Comparing base (473d812) to head (fc93d54).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7264   +/-   ##
=======================================
  Coverage   40.98%   40.98%           
=======================================
  Files         121      121           
  Lines        8273     8273           
  Branches     3598     3598           
=======================================
  Hits         3391     3391           
  Misses       4882     4882           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@VarshithaPamisetty VarshithaPamisetty self-assigned this Aug 12, 2026
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.

signInWithWebUI throws UrlLauncherException instead of UserCancelledException when running on release mode

2 participants