-
Notifications
You must be signed in to change notification settings - Fork 442
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
IndexOutOfBoundsException
is occasionally raised in MediaControllerImplLegacy.initializeLegacyPlaylist()
#241
Comments
NOTE: I am using a slightly modified version of 1.0.0-beta03. I have added some debug logging code to the library, so the line numbers in the stack traces are not identical to the original 1.0.0-beta03. |
I tried to repro this when connecting against the session of YouTube Music but this wasn't successful (meaning it worked without problems :)). However, I was able to create my own legacy session and set it up to produce the exception and got the same stack trace as above. I can for instance repro with a session without a queue and in state
Calling
I think there are several points we should look at. First we apparently need to be more careful in assuming the state of a session of another app is valid. Further we should respect the settings and advertised actions of a session as this can make the controller more robust as it would probably not attempt to call some logic that assumes a certain state of the session. When I for instance look at the sessions of YouTube or YT Music, I see that they don't support |
I have confirmed this issue has been fixed in media3 v1.0.0. Thanks 🎉 |
Media3 Version
1.0.0-beta03
Devices that reproduce the issue
from Crashlytics error reports:
Devices that do not reproduce the issue
I think this issue is not device-specific.
Reproducible in the demo app?
No
Reproduction steps
Sorry, I have not been able to reproduce it myself. I can see crash reports on the Crashlytics dashboard for this issue.
MediaController
that is connected to the other app like YouTube, Spotify, etc...MediaController#prepare()
IndexOutOfBoundsException
Expected result
The
MediaController#prepare()
should not raise anIndexOutOfBoundsException
.Actual result
Gets
IndexOutOfBoundsException
onMediaController#prepare()
sometimes.Example 1
Target MediaSession app package:
com.google.android.youtube
.Example 2
Target MediaSession app package:
in.krosbits.musicolet
I can see the same issue for other apps like:
com.spotify.music
deezer.android.app
com.musixmatch.android.lyrify
com.audiomack
Media
n/a
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: