element-android: Incoming calls broken (when app in background)
Steps to reproduce
- Make sure the app is not open.
- Ask someone to call you.
Outcome
What did you expect?
To receive an incoming call notification.
What happened instead?
- Background sync: no notification. When you open app later, the incoming call header quickly appears and disappears. And the notification counter goes up to indicate the missed call.
- ntfy: app crashes completely, either by itself, or when you next open it.
Given that most calls will be received while the app isn’t open, this is a major breakdown in calling functionality.
The bug was added in 1.5.7, and updating to 1.5.8 didn’t fix it. Can’t be 1.5.4 for sure, the next older version on F-Droid.
Logs
FATAL EXCEPTION: pool-9-thread-1
Process: im.vector.app, PID: 23906
android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=im.vector.app.core.services.CallService.ACTION_CALL_TERMINATED cmp=im.vector.app/.core.services.CallAndroidService (has extras) }: app is in background uid UidRecord{8460461 u0a128 TRNB idle change:uncached procs:0 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1870)
at android.app.ContextImpl.startService(ContextImpl.java:1826)
at android.content.ContextWrapper.startService(ContextWrapper.java:776)
at im.vector.app.features.call.webrtc.WebRtcCallManager.onCallEnded(WebRtcCallManager.kt:100)
at im.vector.app.features.call.webrtc.WebRtcCallManager.access$onCallEnded(WebRtcCallManager.kt:1)
at im.vector.app.features.call.webrtc.WebRtcCallManager$createWebRtcCall$webRtcCall$4.invoke(WebRtcCallManager.kt:2)
at im.vector.app.features.call.webrtc.WebRtcCallManager$createWebRtcCall$webRtcCall$4.invoke(WebRtcCallManager.kt:1)
at im.vector.app.features.call.webrtc.WebRtcCall$terminate$2.invokeSuspend(WebRtcCall.kt:148)
at im.vector.app.features.call.webrtc.WebRtcCall$terminate$2.invoke(Unknown Source:8)
at im.vector.app.features.call.webrtc.WebRtcCall$terminate$2.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:5)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:72)
at im.vector.app.features.call.webrtc.WebRtcCall.terminate(WebRtcCall.kt:9)
at im.vector.app.features.call.webrtc.WebRtcCall.terminate$default(WebRtcCall.kt:11)
at im.vector.app.features.call.webrtc.WebRtcCall$onCallHangupReceived$1.invokeSuspend(WebRtcCall.kt:38)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:119)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@aa9080d, java.util.concurrent.Executors$FinalizableDelegatedExecutorService@17a93c2]
Your phone model
Xiaomi Mi 5 (3GB RAM)
Operating system version
Android 12 (LOS 19.1)
Application version and app store
1.5.7, 1.5.8, 1.5.10, 1.5.18, 1.5.20, 1.5.22, 1.5.25 - F-droid
Homeserver
No response
Will you send logs?
Yes
Are you willing to provide a PR?
No
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (18 by maintainers)
So far nothing weird or wrong has happened but we’ve tested only for 2 days for regular conversation. I’d be interested in your experience as well.
We downgraded to 1.5.4 with my girlfriend and calls, notifications and everything works perfectly as it should, even when the phone locked. The current version is just completely broken.
If it helps gauge impact, we’re experiencing the same issue on 1.5.11 from F-Droid. It’s occurring on Android 13 on a Pixel 6 Pro. It’s definitely intermittent. Oddly enough in our case, it rarely (if ever) seems to be a problem when the phone is locked; it mainly seems to be when it’s unlocked and any app other than Element is in the foreground. Hopeful #7712 resolves this. 😃
I can repro the issue, but it’s a bit random.
I have merged https://github.com/vector-im/element-android/pull/7712 and this may help to fix this issue.
I will do more tests.