Bump @pusher/pusher-websocket-react-native to 1.3.5 for the zombie-connection and stuck-reconnect fixes - #98052
Conversation
The two fixes we need are in NWWebSocket, which this bump pulls from
0.5.7 to 0.5.10 via PusherSwift 10.1.10:
- NWWebSocket 0.5.8 fixes websocket reconnection getting stuck after
network disruption
- NWWebSocket 0.5.10 treats any POSIX error as a disconnection, fixing
zombie connections caused by ENODATA (96) and other unrecognised codes
Production, matched 4h window: iOS runs 69,976 DISCONNECTED ->
RECONNECTING transitions across 7,833 users, of which 56,145 end in
DISCONNECTED and only 6,618 reach CONNECTED - a 9.5% retry success rate.
All three transition counts are 100% CFNetwork. Android's Java SDK
dependency is byte-identical across 1.3.1 and 1.3.5, so Android is
unaffected.
Note this may raise ReconnectApp volume rather than lower it: a socket
that currently never connects also never re-subscribes, so fixing the
retry loop converts failed attempts into successful ones.
Also fixes a dead branch in our own error plumbing. Native passed
{data: {message}} with no `type`, while PusherConnectionManager gates its
error handler on `'type' in error`, so every native Pusher error was
dropped before any log call - 0 of 63,271 error lines carried a native
user agent. Routing them through WEB_SOCKET_ERROR makes the reconnect
cause attributable, which is what lets this bump be measured rather than
assumed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@abzokhattab Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 638a34f715
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "@lottiefiles/dotlottie-react": "0.13.5", | ||
| "@onfido/react-native-sdk": "15.1.0", | ||
| "@pusher/pusher-websocket-react-native": "^1.3.1", | ||
| "@pusher/pusher-websocket-react-native": "^1.3.5", |
There was a problem hiding this comment.
Sync the Mobile-Expensify pod lock with this bump
For HybridApp iOS builds, npm run pod-install runs from Mobile-Expensify/ios, but this commit leaves the Mobile-Expensify gitlink unchanged while changing NewDot's installed @pusher/pusher-websocket-react-native to 1.3.5. When that pinned submodule still has the old lock snapshot, CocoaPods sees the local 1.3.5 podspec requiring PusherSwift ~> 10.1.10 against the submodule's older locked PusherSwift version, so hybrid pod install/build can fail after this lands unless the paired Mobile-Expensify lock/submodule update is included or synced first.
Useful? React with 👍 / 👎.
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
the HybridApp iOS fails to compile as shown in the adhoc build #98052 (comment) |
|
@MelvinBot review the PR |
PR ReviewThe App-side diff looks correct, but both HybridApp adhoc builds are red, and neither failure is fixable from this PR — both live in the paired Mobile-Expensify PR Expensify/Mobile-Expensify#14048 and need to be resolved there before this can merge. 🔴 iOS HybridApp —
|
|
@TMisiukiewicz conflicts here |
# Conflicts: # ios/Podfile.lock
Explanation of Change
We ship
NWWebSocket 0.5.7with two bugs in it, both fixed upstream. They match what our iOS clients do in production..ready— NWWebSocket#62, fixed in #64 (0.5.10).This Pusher bump pulls
NWWebSocket 0.5.7 -> 0.5.10viaPusherSwift 10.1.10, so both land.PusherSwiftWithEncryption 10.1.6shares the pod, so OldDot gets them too without a bump. Android is untouched.Where it hits us. 1d query on
start=2026-08-09T00:00:00Z end=2026-08-10T00:00:00Z, deduplicated on(email, client timestamp):DISCONNECTED -> RECONNECTINGRECONNECTING -> DISCONNECTEDCONNECTING -> DISCONNECTEDRECONNECTING -> CONNECTEDOnly 18.0% of retries reach
CONNECTED— 4.6 failures per success — and 60.6% of active iOS users entered the loop that day, with zero Android lines on the first three transitions.Expect
ReconnectAppto rise, not fall: a failed retry never re-subscribes, so fixing the loop converts 88,464 silent failures into successful connects.Fixed Issues
$ #98054
PROPOSAL:
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/14048
Tests
iOS only — nothing here changes Android or web.
Offline tests
Not applicable — no user-facing behaviour change.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as Tests. No UI change.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
No UI change.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari