Skip to content

fix: prevent autofill crash before text field layout - #5197

Open
Garzas wants to merge 1 commit into
mainfrom
fix/autofill-before-child-positioned
Open

fix: prevent autofill crash before text field layout#5197
Garzas wants to merge 1 commit into
mainfrom
fix/autofill-before-child-positioned

Conversation

@Garzas

@Garzas Garzas commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

The application could crash while navigating to an authentication screen containing an autofill-enabled text field.

The observed exception was:

IllegalStateException: requestAutofill called before onChildPositioned()

Causes

The legacy Compose autofill implementation manually created and registered AutofillNode instances. Autofill could be requested when a field received focus before its position had been calculated.

Several authentication screens also manually cleared the global autofill tree during composition, making the autofill lifecycle more fragile.

Solutions

  • Replaced legacy AutofillNode management with Compose ContentType modifiers.
  • Applied autofill metadata directly to BasicTextField and BasicSecureTextField.
  • Removed manual autofill requests, bounds tracking and autofill tree clearing.
  • Added instrumentation tests covering login and password content types.

@Garzas
Garzas requested review from saleniuk and sbakhtiarov August 21, 2026 09:01
@Garzas Garzas self-assigned this Aug 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

2 265 tests   2 265 ✅  2m 58s ⏱️
  250 suites      0 💤
  250 files        0 ❌

Results for commit 4e83b53.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant