Skip to content

fix: Clean up analytics errors logs for calls - WPB-25740#4737

Open
KaterinaWire wants to merge 4 commits into
developfrom
fix/handleCallTerminating-error-logs
Open

fix: Clean up analytics errors logs for calls - WPB-25740#4737
KaterinaWire wants to merge 4 commits into
developfrom
fix/handleCallTerminating-error-logs

Conversation

@KaterinaWire
Copy link
Copy Markdown
Contributor

@KaterinaWire KaterinaWire commented May 19, 2026

TaskWPB-25740 [iOS] Clean up analytics errors logs: handleCallTerminating: expected eventInfo to be non-nil

Issue

We have ~200 error analytics logs per day:

  • handleCallTerminating: expected eventInfo to be non-nil
  • handleIncomingCall: expected eventInfo to be nil, but is: EventInfo(callDirection: (extension in WireAnalytics):WireFoundation.AnalyticsEvent.Calling.CallDirection.incoming, callStart: nil, screenSharingStart: nil, conversationID: Optional(WireRequestStrategy.AVSIdentifier(identifier: B32194D6-D2FA-5F78-A8C9-0C5E79ACB66B, domain: Optional("wire.com"))), conversationType: (extension in WireAnalytics):WireFoundation.AnalyticsEvent.Segmentation.Conversation.ConversationType.oneOnOne, totalScreenSharingDuration: 0.0, uniqueScreenSharingUsers: Set([]), participants: Set([]), isVideoCall: false, hasAVSwitchToggled: false)

This is not an error, but an expected state of the app.

  1. handleCallTerminating: expected eventInfo to be non-nil:

eventInfos[remoteIdentifier] is only populated in handleIncomingCall, handleOutgoingCall, and handleCallEstablished. So nil at termination means this client never entered any of those states for this call.
The cases:

  • .answeredElsewhere - user picked up on another device; this device may have received .incoming(_, shouldRing: false, _) (which doesn't populate) or just .terminating directly.
  • .rejectedElsewhere - same path, rejected from another device.
  • .stillOngoing - fires on .incoming(_, shouldRing: false, _) and .mediaStopped.
  • .canceled if the caller hung up before this device started ringing.

None of these are bugs. The log is firing on normal protocol behavior.

  1. handleIncomingCall: expected eventInfo to be nil, but is: ...
case let .incoming(isVideoCall, true, _):
    handleIncomingCall(conversation, isVideoCall)   // ← populates eventInfo
case .answered:
    handleIncomingCall(conversation, false)         // ← runs AGAIN, finds eventInfo, logs error

This is also not a bug.

Testing

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

Test Results

1 879 tests   1 852 ✅  2m 6s ⏱️
  301 suites     27 💤
    1 files        0 ❌

Results for commit 929cf49.

Summary: workflow run #26110425832
Allure report (download zip): html-report-30129-fix_handleCallTerminating-error-logs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants