androidx / androidx/media

demo-session crashing when connected from "Media Controller Tester"

Open
#78 10 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since May 20, 2022.

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

Description

Demo session sample app is crashing when conneced from https://github.com/googlesamples/android-media-controller

Tested against both release and main branches

Crash with Android API 24
On API 26 & 28 it doesn’t crash, but returns no results when browsing
Works with Android API 29 & 30

Step to reproduce
deploy both apps on device
launch media controller test app
click "control" on Media3 Session Demo in the list

2022-05-20 11:50:09.972 9872-9872/androidx.media3.demo.session E/AndroidRuntime: FATAL EXCEPTION: main
    Process: androidx.media3.demo.session, PID: 9872
    java.lang.UnsupportedOperationException: It is not supported to send an error for [rootID]
        at androidx.media.MediaBrowserServiceCompat$Result.onErrorSent(MediaBrowserServiceCompat.java:944)
        at androidx.media.MediaBrowserServiceCompat$Result.sendError(MediaBrowserServiceCompat.java:889)
        at androidx.media3.session.MediaLibraryServiceLegacyStub.onLoadChildren(MediaLibraryServiceLegacyStub.java:178)
        at androidx.media3.session.MediaLibraryServiceLegacyStub.onLoadChildren(MediaLibraryServiceLegacyStub.java:168)
        at androidx.media.MediaBrowserServiceCompat$MediaBrowserServiceImplApi21.onLoadChildren(MediaBrowserServiceCompat.java:427)
        at androidx.media.MediaBrowserServiceCompat$MediaBrowserServiceImplApi21$MediaBrowserServiceApi21.onLoadChildren(MediaBrowserServiceCompat.java:518)
        at android.service.media.MediaBrowserService.performLoadChildren(MediaBrowserService.java:662)
        at android.service.media.MediaBrowserService.addSubscription(MediaBrowserService.java:600)
        at android.service.media.MediaBrowserService.-wrap3(MediaBrowserService.java)
        at android.service.media.MediaBrowserService$ServiceBinder$3.run(MediaBrowserService.java:272)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6077)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)

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.