Skip to content

Add extra logs the 'send call notification' flow #4819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 5, 2025

Conversation

jmartinesp
Copy link
Member

Content

Add some extra logs for the 'send call notification' flow when starting a call.

Motivation and context

It's been observed the notify call event is not always sent. This should help debug why.

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@jmartinesp jmartinesp requested a review from a team as a code owner June 4, 2025 10:50
@jmartinesp jmartinesp added the PR-Misc For other changes label Jun 4, 2025
@jmartinesp jmartinesp requested review from bmarty and removed request for a team June 4, 2025 10:50
Copy link
Contributor

github-actions bot commented Jun 4, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/HPypb8

Copy link

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 52.08333% with 23 lines in your changes missing coverage. Please review.

Project coverage is 80.38%. Comparing base (07af7cc) to head (6c20a10).
Report is 11 commits behind head on develop.

Files with missing lines Patch % Lines
...droid/features/call/impl/ui/CallScreenPresenter.kt 42.10% 6 Missing and 5 partials ⚠️
...nt/android/features/call/impl/ui/CallScreenView.kt 18.18% 9 Missing ⚠️
...n/io/element/android/features/call/api/CallType.kt 60.00% 2 Missing ⚠️
...droid/features/call/impl/ui/ElementCallActivity.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4819      +/-   ##
===========================================
- Coverage    80.40%   80.38%   -0.02%     
===========================================
  Files         2149     2149              
  Lines        56843    56874      +31     
  Branches      7125     7127       +2     
===========================================
+ Hits         45703    45718      +15     
- Misses        8689     8706      +17     
+ Partials      2451     2450       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I am wondering if the send may be blocked because there is a unverified device in the room. Could it be possible?

@@ -181,6 +181,9 @@ class DefaultActiveCallManager @Inject constructor(
Timber.tag(tag).w("Call type $callType does not match the active call type, ignoring")
return
}

Timber.tag(tag).d("Hung up call: $callType")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some sensitive information in callType? Maybe safer to shrink some data first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's anything there that won't be logged at some other point (URL in webview or session id + room id for room calls).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some changes to prevent the URL from being logged.

@jmartinesp
Copy link
Member Author

Thanks. I am wondering if the send may be blocked because there is a unverified device in the room. Could it be possible?

This can happen, but according to @manuroe in his case it's intermittent, so I don't think it's related. Either that or some user in that room was adding and verifying/signing out sessions non-stop 😅 .

@bmarty
Copy link
Member

bmarty commented Jun 4, 2025

Also we have #4756, so 🤷‍♂️

@jmartinesp
Copy link
Member Author

Also we have #4756, so 🤷‍♂️

I think that may be a bit stale. Most of the logs in this PR would still be valuable even if we remove the code to send the call notification (knowing when the call has started, when we receive an incoming call, when we hang up, the type of call, etc.).

This change reduced if from 12 per call to 4 while testing it. Since we suspect race conditions may be related to sending the notify event not working, this should help.
Copy link

sonarqubecloud bot commented Jun 5, 2025

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jmartinesp jmartinesp merged commit 3ba11db into develop Jun 5, 2025
28 of 31 checks passed
@jmartinesp jmartinesp deleted the misc/improve-logs-for-sending-m-call-notify branch June 5, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants