-
Notifications
You must be signed in to change notification settings - Fork 411
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
ExoPlayer is throwing 416 error #1032
Comments
additional info, we are downloading mp4 Widevine content |
I assume this means that the main class involved is Internally these classes redirect to Could you try caching/downloading data that was already downloaded and/or share a typical stream involved in these errors with us? You can send it to android-media-github@google.com and report back here once you've done that. |
thanks for replying, I mean DASH file and can confirm it is using SegmentDownloader. We were trying to read through |
When you provide a sample file that talks to the same CloudFront backend, we could try to reproduce that as well to test the hypothesis that something tries to download the same file again without knowing that it already has all bytes. Otherwise there is not much we can do without reproduction steps or further hints on the problem. |
I had a similar problem. In my case, the root cause was a corrupted react-native-video-cache cache file. Cloudfront does not strictly follow the spec :( I've "fixed" it by clearing the cache. |
hi tonihei, so to clarify, what sample file would you need so I can try to send to you? would that gonna be the manifest file that passed in here? |
Yes, the manifest file would be ideal if you can share it because it contains all the necessary information. |
hi tonihei, just attached the manifest file and sent to android-media-github@google.com |
@ddiachkov I was taking a look at your comment and have few questions:
|
TLDR; with Cloudfront you're not allowed to overfetch data — the player will always throw. As @tonihei suggested, the issue is probably somewhere in the manifest file (ie., invalid file size). |
Thanks, I'd need the live link to the mpd though to properly test the download. The manifest is not super helpful. Given the other comments from @ddiachkov, I assume there might also be something wrong with the Cloudfront backend in how it responds to HTTP requests? |
In fact, I think @ddiachkov pointed to the exact issue already that When you see a caching failure (like this one), then the right course of action is probably to retry the caching from scratch. I'll close this issue under the assumption that this is a misbehaving server and that the problem can be resolved by retrying the download if needed. |
Question Description:
hi team, currently we are seeing users are getting download errors on our app and it is due to exoPlayer throwing 416.
So far, we cannot reproduce this issue in house. But we noticed that in cloudFront, when the 416 issue happens, we are seeing
Request/Headers/Range=bytes=108421975-
which doesn't contain
length
, and theposition
here 108421975 is one byte extra than it's actual total length. We had multiple records with 416 and they all have this same pattern.We checked exoPlayer source code
SegmentDownloader.download(...)
and suspect the additional segment is being added duringList<SegmentDownloader.Segment> segments = getSegments(dataSource, manifest, /* removing= */ false);
, but that is just our guess. We also checked the manifest file, it also looks fine (otherwise more users would be impacted) (plz let us know if you need one of them, we can send you privately).Could you guys take a look and let us know in what kind of circumstances that one byte extra segment would be added?
Also, another question, so our current temp fix is that right after exoPlayer merge the segments, we check the last segment to see if that is out of the bound, if it does, then we will dump that one to avoid 416. Do you guys see any potential issues for doing so?
Thanks in advance!
The text was updated successfully, but these errors were encountered: