Skip to content

Media3 - Errors from MediaBrowserService when playback state transitions to PLAYING #2515

Open
@panzhiev

Description

@panzhiev

Problem:
I am integrating the Media3 library (1.7.1) into my app and currently experiencing the following errors when the playback state transitions to PLAYING:

MediaBrowserService       com.example.package         I  No root for client com.android.systemui from service android.service.media.MediaBrowserService$ServiceBinder$1
MediaBrowser              pid-17694                   E  onConnectFailed for ComponentInfo{com.example.package/com.example.package.data.playback.PlaybackService}
ResumeMediaBrowser        pid-17694                   D  Connection failed for ComponentInfo{com.example.package/com.example.package.data.playback.PlaybackService}
MediaResumeListener       pid-17694                   E  Cannot resume with ComponentInfo{com.example.package/com.example.package.data.playback.PlaybackService}
  • These errors usually appear on Pixel devices running Android 30+.
  • I also tested on a Samsung A52 API level 33 and did not encounter these errors there.
  • Despite the errors, playback works fine — media notifications and Android Auto behave as expected.
  • This only happens if I add the action android.media.browse.MediaBrowserService in the AndroidManifest:

    
        
        
    

What I tried so far:

  • Attempted to intercept onGetLibraryRoot() for the com.android.systemui package, but this callback was never invoked.
  • I could not reproduce this issue in the UAMP sample app — likely because UAMP uses a MediaBrowser, while in my case, I am using a plain MediaController to start the MediaLibraryService.

Question:

  • What is the cause of these errors?
  • Is it expected that MediaBrowser connections from com.android.systemui will fail in this case?
  • Is there something wrong in the way I am starting the service using MediaController directly (without a MediaBrowser)?
  • Is this a known limitation/behavior of the Media3 library, or is it likely a bug in my app's integration?

Any advice or clarification would be greatly appreciated! 🙏

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions