mattermost-mobile-upstream/app/client
yasserfaraazkhan 7f75e5c88a fix(network): retry a lost pooled connection once, and use the options helper in mentions
Two independent fixes.

app/client/rest/base.ts — cloud load balancers close idle keep-alive sockets (~40s), so the
next request down a pooled connection dies with NSURLError -1005 "network connection was
lost" before reaching the server (response_status=-1, 0 response bytes). Reproduced against
the PR cloud servers: the custom-status PUT failed 2/2, and retrying once — which opens a
fresh connection — made it pass 4/4.

Deliberately scoped:
- ONE extra attempt, not four. The native client already attaches a RuntimeRetrier that
  delegates to `request.request?.retryPolicy ?? session.retryPolicy`, and the session policy
  from NetworkManager (EXPONENTIAL_RETRY, retryLimit 3) inherits Alamofire's
  defaultRetryableURLErrorCodes, which includes .networkConnectionLost. Why that does not
  fire is unresolved, so this is a mitigation, not the root-cause fix — and it must not stack
  multiple JS attempts on top of a native retryLimit of 3.
- Match the message text only, never the raw codes. "-1005" and "-1001" occur as substrings
  in our own hostnames (mobile-pr-10050…, mobile-pr-10010…), so a code match retried
  permanent 4xx/5xx errors. There is a regression test for exactly that.
- Idempotent methods only; callers that must not retry already pass `noRetry`.

detox recent_mentions MM-T4909_3 — the reply and delete steps hand-rolled a longPress on
post_header.date_time with no scroll, no retry and no wait for the sheet, and post_options
never opened, so replyPostOption was not there. Every other site in this file uses
openPostOptionsFor, which scrolls the row in and longPressWithRetry's until
post_options.screen appears — and it already opens options for this same post earlier in the
same test, so it clears the @mention handler the date_time target was chosen to avoid.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 15:49:56 +05:30
..
rest fix(network): retry a lost pooled connection once, and use the options helper in mentions 2026-08-18 15:49:56 +05:30
websocket [MM-69457] Stop logging PII in exportable app logs (#9884) 2026-07-02 12:19:04 +02:00