androidx / androidx/media

java.lang.SecurityException - Session rejected the connection request.

Open
#423 17 comments 7 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since May 30, 2023.

bug needs triage
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Media3 Version

Media3 1.0.1

Devices that reproduce the issue
grafik grafik
Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps
  1. Rollout Voice 7.0.12:
    https://github.com/PaulWoitaschek/Voice/blob/7.0.12/playback/src/main/kotlin/voice/playback/session/PlaybackService.kt
  2. See crashes in Crashlytics
Expected result

It doesn't crash

Actual result

I'm seeing a ton of crashes with a stack trace that doesn't relate to application code. I assume, this is related to broken device implementations which I can not catch as they are in the library internal space.

Additionally with media3 I see a lot of user reports where people state that the playback doesn't start. I assume that this might be related to this issue.

Fatal Exception: java.lang.SecurityException: Session rejected the connection request.
       at androidx.media3.session.MediaControllerHolder.maybeSetException(MediaControllerHolder.java:62)
       at androidx.media3.session.MediaControllerHolder.onRejected(MediaControllerHolder.java:62)
       at androidx.media3.session.MediaController.release(MediaController.java:62)
       at androidx.media3.common.util.Util.postOrRun(Util.java:25)
       at androidx.media3.session.MediaController.runOnApplicationLooper(MediaController.java:2)
       at androidx.media3.session.MediaControllerStub.lambda$onDisconnected$1(MediaControllerStub.java:3)
       at androidx.media3.session.MediaControllerStub.lambda$dispatchControllerTaskOnHandler$11(MediaControllerStub.java:521)
       at androidx.media3.common.util.Util.postOrRun(Util.java:25)
       at androidx.media3.session.MediaControllerStub.dispatchControllerTaskOnHandler(MediaControllerStub.java:29)
       at androidx.media3.session.MediaControllerStub.onDisconnected(MediaControllerStub.java:6)
       at androidx.media3.session.MediaSessionService$MediaSessionServiceStub.lambda$connect$0(MediaSessionService.java:82)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7682)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Media

no media

Bug Report
  • You will email the zip file produced by adb bugreport to dev.exoplayer@gmail.com after filing this issue.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.