MediaSession IllegalArgumentException on PlayerInfoChangedHandler.handleMessage
Version
Media3 1.1.1 / ExoPlayer 2.19.1
More version details
No response
Devices that reproduce the issue
Across all devices 65% Samsung all models 26% Amazon all models
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
Happening on Live streams only, VOD is fine The crash happens after 15-30mins, possibly when there's Server side ad replacement
Expected result
No Crash should happen
Actual result
Fatal Exception: java.lang.IllegalArgumentException: Multiple entries with same key: a5.r0@49ed724c=g-3:emsg and a5.r0@49ed724c=f-3:emsg
at com.google.common.collect.ImmutableMap$Builder$DuplicateKey.exception(ImmutableMap.java:661)
at com.google.common.collect.RegularImmutableMap.createHashTableOrThrow(RegularImmutableMap.java:290)
at com.google.common.collect.RegularImmutableBiMap.
Media
Can provide further details if needed
Bug Report
- [x] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
Hello @tiagoalmeida92,
In digging into this issue, the duplicate key exception is a result of that the DASH mpd file for your content containing Adaptation Sets with duplicate ids within the same period. Are you in control of the content you are streaming? Any way that you can address this issue?
Hi @microkatz thanks for your response!
It could be that we're getting some rogue data from the stream. We should be able to address it. It's a bit odd that exoplayer can handle the duplicated ids, but MediaSession isn't though
@tiagoalmeida92
Sorry for the delay. Are you still hitting this issue with your content?
It may help us if you can provide example media, an example dash manifest of your content. If you're unable to share test content publicly, please send them to [email protected] with the subject Issue #1447. Please also update this issue to indicate you've done this.
I looked through the dumpstate that you sent but it does not appear to contain any logs with the presented issue? Would you be able to send a bug report specifically or reproduce the issue with the demo application? Reproducing with the demo applications in the project would be the most helpful.
@microkatz I'm not able to provide more logs right now as the issue only happens in certain conditions. We could see stack traces on firebase crashlytics, and we decided to disable the media session to avoid the crash. We will try to add more logging on crashlytics, including the manifest. Like you said, it's probably a manifest that contains adaptation sets with duplicate IDs.