Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when starting new playback service when there's still an old, alive media session #6738

Closed
3 tasks done
Figim opened this issue Nov 17, 2024 · 1 comment · Fixed by #6753
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@Figim
Copy link

Figim commented Nov 17, 2024

Steps to reproduce

  1. While the video is playing, switch to the audio player.
  2. Error

Expected behavior

Correct transition

Actual behavior

XRecorder_17112024_220256.mp4

LibreTube version

0.26.0 Debug

Android version

All

Other details

FATAL EXCEPTION: main
Process: com.github.libretube.debug, PID: 4911
java.lang.RuntimeException: Unable to create service com.github.libretube.services.OnlinePlayerService: java.lang.IllegalStateException: Session ID must be unique. ID=
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4953)
at android.app.ActivityThread.access$1800(ActivityThread.java:310)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2300)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.lang.IllegalStateException: Session ID must be unique. ID=
at androidx.media3.session.MediaSession.(MediaSession.java:686)
at androidx.media3.session.MediaLibraryService$MediaLibrarySession.(MediaLibraryService.java:679)
at androidx.media3.session.MediaLibraryService$MediaLibrarySession$Builder.build(MediaLibraryService.java:659)
at com.github.libretube.services.AbstractPlayerService.createPlayerAndMediaSession(AbstractPlayerService.kt:249)
at com.github.libretube.services.AbstractPlayerService.onCreate(AbstractPlayerService.kt:184)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4940)
... 9 more

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@Figim Figim added the bug Something isn't working label Nov 17, 2024
@Figim
Copy link
Author

Figim commented Nov 17, 2024

There is an error when switching from audio to video

FATAL EXCEPTION: main
Process: com.github.libretube.debug, PID: 15244
java.lang.RuntimeException: Unable to create service com.github.libretube.services.VideoOnlinePlayerService: java.lang.IllegalStateException: Session ID must be unique. ID=
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4953)
at android.app.ActivityThread.access$1800(ActivityThread.java:310)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2300)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.lang.IllegalStateException: Session ID must be unique. ID=
at androidx.media3.session.MediaSession.(MediaSession.java:686)
at androidx.media3.session.MediaLibraryService$MediaLibrarySession.(MediaLibraryService.java:679)
at androidx.media3.session.MediaLibraryService$MediaLibrarySession$Builder.build(MediaLibraryService.java:659)
at com.github.libretube.services.AbstractPlayerService.createPlayerAndMediaSession(AbstractPlayerService.kt:249)
at com.github.libretube.services.AbstractPlayerService.onCreate(AbstractPlayerService.kt:184)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4940)
... 9 more

@Figim Figim changed the title Error when opening audio player while playing video Error when opening audio player while playing video (or opposite) Nov 17, 2024
@Bnyro Bnyro changed the title Error when opening audio player while playing video (or opposite) Crash when starting new playback service when there's still an old, alive media session Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant