Getting 403 response on downloaded media
See original GitHub issue- ExoPlayer version number: 1.14.2
- Android version: Mostly Android 8, 9, 10 and 11
- Android device: 54% of samsung, 10% LGE and more
Hello, im my application user can download the media, I’m using DownloadService from your example to download the media (there are hls file) and then I read it though DownloadHelper.createMediaSource(downloadRequest, dataSourceFactory)
from time to time I get a non-fatal exception that user can’t watch the download and I have the following stacktrace:
Non-fatal Exception: com.google.android.exoplayer2.ExoPlaybackException: Source error
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
aused by com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403
at com.google.android.exoplayer2.ext.okhttp.OkHttpDataSource.open(OkHttpDataSource.java:324)
at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:201)
at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:774)
at com.google.android.exoplayer2.upstream.cache.CacheDataSource.open(CacheDataSource.java:587)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:101)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:64)
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:177)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:417)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Unfortunately I couldn’t reproduce this issue. Perhaps you have an idea of what is wrong and how I could fix this
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
HTTP Error 403 Forbidden Messages: What They Are & How ...
It means the page you were trying to reach is forbidden for one of two reasons: Either there is a removal or restriction...
Read more >What Does a 403 Forbidden Error Mean? How Do You Fix It?
The 403 Forbidden error is an HTTP status code that means that access to the page or resource you were trying to reach...
Read more >User sees the "403 Forbidden" message when attempting to ...
This error occurs when the async virus scan is enabled and a user attempts to download un-scanned or malicious files. If you just...
Read more >Why am I seeing a 403 Forbidden error message?
The 403 Forbidden error is an HTTP status code which means that accessing the page or resource you were trying to reach is...
Read more >How to Fix a 403 Forbidden Error on Your WordPress Site
The 403 Forbidden error indicates that the server understood the request but refuses to authorize it. Find out more about the causes and ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing due to inactivity. Please reopen if you think it is required.
Yes I’ve been using everything from the DevGuide and from the example of Exoplayer, it is exactly this. I’m fetching my
DownloadRequest
then I’m creating themediaSource
usingDownloadHelper.createMediasource
.Some of my users are still getting this error but it’s a really small portions, so I don’t really know, I’ve been testing it intensively recently and everything works, I don’t really get it.