Skip to content

Comments

fix: maintain worker class name stability for minification compatibility [WPB-20393]#4606

Merged
MohamadJaara merged 4 commits intodevelopfrom
mo/fix/work-manager-crash
Feb 19, 2026
Merged

fix: maintain worker class name stability for minification compatibility [WPB-20393]#4606
MohamadJaara merged 4 commits intodevelopfrom
mo/fix/work-manager-crash

Conversation

@MohamadJaara
Copy link
Member

@MohamadJaara MohamadJaara commented Feb 19, 2026

https://wearezeta.atlassian.net/browse/WPB-20393

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

  • App crashes in minified builds because some Kalium/worker classes are not stable after obfuscation.
  • Existing queued WorkManager jobs can fail with ClassNotFoundException after upgrade/minification.

Causes (Optional)

  • With AGP 9 / Gradle 9 + composite Kalium build, consumer ProGuard rules are not always propagated transitively like before.
  • Worker dispatch previously depended on class-name strings stored in WorkManager input data.

Solutions

  • Added app-level keep/keepnames rules for affected classes (media manager + worker class names).
  • Added compatibility layer in WrapperWorkerFactory:
    • stable worker_type key for new work
    • legacy class-name aliases for old enqueued work
    • safe fallback worker instead of crashing process

Dependencies (Optional)

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

  • Build a minified variant (internalRelease / betaDebug with minify).
  • Launch app and verify no startup/worker ClassNotFoundException crash.
  • Verify queued work still runs after upgrading from a previous install.

Notes (Optional)

  • Full workspace compile currently has an unrelated kalium/domain/userstorage compile issue in this branch; this PR focuses on runtime minification compatibility.

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

@MohamadJaara MohamadJaara force-pushed the mo/fix/work-manager-crash branch from 0422a8a to 49eb9c9 Compare February 19, 2026 15:41
@sonarqubecloud
Copy link

@MohamadJaara MohamadJaara added this pull request to the merge queue Feb 19, 2026
Merged via the queue into develop with commit 34f3fbe Feb 19, 2026
15 checks passed
@MohamadJaara MohamadJaara deleted the mo/fix/work-manager-crash branch February 19, 2026 22:39
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.

3 participants