Skip to content

fix: stabilize Keychain service name for iOS to prevent orphaned entries [WPB-25123]#4138

Open
MohamadJaara wants to merge 2 commits into
developfrom
mo/fix/use-stable-keychain-path
Open

fix: stabilize Keychain service name for iOS to prevent orphaned entries [WPB-25123]#4138
MohamadJaara wants to merge 2 commits into
developfrom
mo/fix/use-stable-keychain-path

Conversation

@MohamadJaara
Copy link
Copy Markdown
Member

@MohamadJaara MohamadJaara commented May 13, 2026

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

What's new in this PR?

Issues

On iOS, every new app deployment assigns a fresh Application UUID, changing NSHomeDirectory() and thus the absolute container path. iOS migrates filesystem data to the new path, but the Keychain is independent of the filesystem — entries written under the old path are orphaned. Result: stored auth tokens become unreadable → SESSION_EXPIRED → forced logout.

Solutions

ask consumer apps to deal with it and they can provide a stable identifier

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Test Results

0 tests   - 4 911   0 ✅  - 4 796   0s ⏱️ - 2m 58s
0 suites  -   806   0 💤  -   115 
0 files    -   806   0 ❌ ±    0 

Results for commit a9ef97a. ± Comparison against base commit 541dc48.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.56%. Comparing base (9eca021) to head (a9ef97a).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4138   +/-   ##
==========================================
  Coverage      61.55%   61.56%           
- Complexity      4021     4022    +1     
==========================================
  Files           2067     2068    +1     
  Lines          67423    67436   +13     
  Branches        6650     6651    +1     
==========================================
+ Hits           41500    41514   +14     
- Misses         23276    23277    +1     
+ Partials        2647     2645    -2     

see 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

🚀 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.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchmo/fix/use-stable-keychain-path
Testbedubuntu-latest

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymicroseconds (µs)
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInFiles📈 view plot
⚠️ NO THRESHOLD
919.34 µs
com.wire.kalium.benchmarks.logic.CoreLogicBenchmark.createObjectInMemory📈 view plot
⚠️ NO THRESHOLD
510,316.25 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
131,508.24 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.inboxPagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
127,826.03 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.localMarkAsReadBenchmark📈 view plot
⚠️ NO THRESHOLD
3,581.09 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingDeepPageBenchmark📈 view plot
⚠️ NO THRESHOLD
26,316.03 µs
com.wire.kalium.benchmarks.persistence.MessageReadBenchmark.messagePagingFirstPageBenchmark📈 view plot
⚠️ NO THRESHOLD
11,296.78 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.messageInsertionBenchmark📈 view plot
⚠️ NO THRESHOLD
1,346,729.78 µs
com.wire.kalium.benchmarks.persistence.MessagesNoPragmaTuneBenchmark.queryMessagesBenchmark📈 view plot
⚠️ NO THRESHOLD
21,312.42 µs
🐰 View full continuous benchmarking report in Bencher

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants