Getting 403 response by playing HLS using link
See original GitHub issue[REQUIRED] Issue description
I am using this great library for so long and it works properly not until I tried to play this HLS from this url : https://ul.cdn946.net:8443/hls/dftsbx86z8qhvbg.m3u8?s=PI81iBx6Vhd63S9hRs-9iw&e=1569323618 but it works with VLC player or using online HLS tester. On app at first I get SSL handshake error saying Trust anchor for certification path not found, according to other SO question this is due to self signed SSL that is not configured correctly so what I did is to allow all certificate just for a test “I nuked the SSL” expecting it to work now but then all I got is a 403 error response. Am I missing something? Do I need to change user agent in DefaultHttpDataSourceFactory?
[REQUIRED] Reproduction steps
Use the said link to any demo app.
[REQUIRED] Link to test content
https://ul.cdn946.net:8443/hls/dftsbx86z8qhvbg.m3u8?s=PI81iBx6Vhd63S9hRs-9iw&e=1569323618
[REQUIRED] A full bug report captured from the device
E/ExoPlayerImplInternal: Source error.
com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 403
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:300)
at com.google.android.exoplayer2.upstream.DefaultDataSource.open(DefaultDataSource.java:250)
at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:83)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:102)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:65)
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:156)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
[REQUIRED] Version of ExoPlayer being used
2.9.6
[REQUIRED] Device(s) and version(s) of Android being used
SONY XA1 Oreo
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I think you should fix the certificate problem with your stream rather than trying to disable SSL checking - if once that’s resolved you’re still seeing problems we can try and understand what’s going wrong.
Note that ‘unsafe’ implementations of TrustManager (that try and bypass SSL validation) are detected by the Play Store and will block your app from being published: https://support.google.com/faqs/answer/6346016?hl=en
I’m going to close this for now. Please re-open (or maybe file a new issue) if you continue to encounter problems after fixing the certificate config.