question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
icbakercommented, Sep 24, 2019

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

0reactions
icbakercommented, Sep 26, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HLS Stream URL with Token not playing. 403 Forbidden
I have a code to scrape m3u8 links of a site called "streamlive.to". The site has free links with tokens that expire every...
Read more >
Issue in stream HLS signed url video. Error 403 forbidden
We are facing issue with the signed url specifically with HLS video. On the other had the mp4 signed url file perfectly works...
Read more >
HLS + Transcoder plugin failing with 403 error - Wowza
Hello! We are trying to set up Wowza to make our way to AppStore and we have encountered some problems with it. The...
Read more >
Troubleshoot HTTP 403 errors from API Gateway - Amazon AWS
An HTTP 403 response code means that a client is forbidden from accessing a valid URL. The server understands the request, but it...
Read more >
HLS stream capture with ffmpeg not working. HTTP 403 ...
This works, but how do you get the renditions.m3u8 link? Is it received right before the parts start downloading or when the video...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found