Skip to content

fix: disable pending message retry on app open - #5211

Open
MohamadJaara wants to merge 1 commit into
developfrom
mo/disable-pending-retry-develop
Open

fix: disable pending message retry on app open#5211
MohamadJaara wants to merge 1 commit into
developfrom
mo/disable-pending-retry-develop

Conversation

@MohamadJaara

Copy link
Copy Markdown
Member

Goal

Prevent the foreground pending-message replay introduced in 4.32 from crashing the app when a persisted pending row contains content that cannot be encoded.

Reproduction

  1. Have a pending message whose persisted content is not valid for outbound protobuf encoding.
  2. Bring the app to the foreground.
  3. The global observer retries pending messages after sync and the mapper exception escapes the coroutine.

Change

  • Stop registering the app-open pending-message retry observer.
  • Update observer tests to assert foreground transitions do not trigger pending-message replay.
  • Keep existing explicit and manual resend paths unchanged.

A follow-up will harden pending-message encoding and re-enable the foreground trigger safely.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.39%. Comparing base (f1cbc6f) to head (97c1a4a).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5211      +/-   ##
===========================================
+ Coverage    52.29%   52.39%   +0.09%     
===========================================
  Files          668      739      +71     
  Lines        24036    25701    +1665     
  Branches      3962     4215     +253     
===========================================
+ Hits         12570    13465     +895     
- Misses       10302    10948     +646     
- Partials      1164     1288     +124     
Files with missing lines Coverage Δ
.../kotlin/com/wire/android/GlobalObserversManager.kt 72.00% <ø> (-20.11%) ⬇️

... and 201 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1cbc6f...97c1a4a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

2 620 tests  ±0   2 620 ✅ ±0   1m 49s ⏱️ +24s
  333 suites ±0       0 💤 ±0 
  333 files   ±0       0 ❌ ±0 

Results for commit 97c1a4a. ± Comparison against base commit 18b1028.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
com.wire.android.GlobalObserversManagerTest ‑ given app visible and valid session, when app opens, then retry sending pending messages()
com.wire.android.GlobalObserversManagerTest ‑ given valid session when app becomes visible then retry sending pending messages()
com.wire.android.GlobalObserversManagerTest ‑ given app visible and valid session, when app opens, then do not retry sending pending messages()
com.wire.android.GlobalObserversManagerTest ‑ given valid session when app becomes visible then do not retry sending pending messages()

@github-actions

Copy link
Copy Markdown
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

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