[Bug]: Cannot receive a call on Emui 14.2.0, stuck on "starting" after java.lang.IllegalStateException

Open
#6,432 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
android, kotlin

Research direction

Start with SoundPlayer.kt at line 26 and IncomingCallAlertView.kt at line 31, where the stack trace shows the failure during an incoming call. Reproduce accepting a call on a Huawei phone with EMUI 14.2.0 and trace the starting state. Done means the call connects without the IllegalStateException.

Written by the indexing model from the issue text.

Description

bug triage
Is there an existing issue for this?
  • I have searched the existing issues
Platform

Android

OS version

EMUI 14.2.0

App version

6.5.0-beta.1 (same error on 6.4.6)

Current Behavior

I'm experiencing this issue on a Huawei phone - thus the OS version is EMUI 14.2.0.

When someone tries to call me, sometimes one / sometimes three successive windows of java.lang.IllegalStateException pop up:

java.lang.IllegalStateException
at android.media.MediaPlayer._prepare(Native Method)
at android.media.MediaPlayer.prepare(MediaPlayer.java:1424)
at chat.simplex.common.helpers.SoundPlayer.start(SoundPlayer.kt:26)
at chat.simplex.common.views.call.IncomingCallAlertViewKt$IncomingCallAlertView$1$1.invokeSuspend(IncomingCallAlertView.kt:31)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:79)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:966)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:293)
at chat.simplex.app.SimplexApp.onCreate$lambda$0(SimplexApp.kt:57)
at chat.simplex.app.SimplexApp.$r8$lambda$eoLc-YR8Y_Vqo24L3vub_SdCX9o(Unknown Source:0)
at chat.simplex.app.SimplexApp$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at android.os.Handler.handleCallback(Handler.java:966)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:293)
at android.app.ActivityThread.processInnerLoop(ActivityThread.java:10173)
at android.app.ActivityThread.loopProcess(ActivityThread.java:10165)
at android.app.ActivityThread.main(ActivityThread.java:10156)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1247)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@bdd2bd0, androidx.compose.runtime.BroadcastFrameClock@36537c9, StandaloneCoroutine{Cancelled}@78e2ece, AndroidUiDispatcher@564e782]

These can be closed - but then the call never connects once I press answer:

  • it gets stuck on "starting..." on my side - the counterparty just sees "waiting for answer..."

I can call from my side fine - and the call will connect...

Expected Behavior

The call would connect.

Steps To Reproduce

Try to accept a call on a Huawei phone with EMUI (Android knock-off...)

Relevant log output

Dominant language
Haskell
Stars
19.5k
Forks
1.4k
Avg merge
1d 20h
Merged PRs (30d)
71

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from simplex-chat/simplex-chat

All issues in simplex-chat/simplex-chat

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.