-
Notifications
You must be signed in to change notification settings - Fork 242
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
Missing Cookie On Some Requests #184
Comments
Try passing headers via |
I cannot do it I don’t have them in advance, the cookies are set by the server when retrieving the manifest which is done by the inputstream.adaptive. |
This may be related to the same issue I opened here: |
You might be able to solve this using the header refresh option |
I have another example that you may be able to reproduce. EDIT: This is the m3u8 content: #EXTM3U and this is the url inputstream.adaptive is requesting: |
@peak3d I have a index.m3u8 that returns set-cookie but inputstream fails to send that cookie with further requests thus resulting in 403 on the substreams. |
Will look at it |
hi @peak3d Anyway we could have a peak at this? Log attached. Ok. If I play the url directly, it works. In summary: First URL 302 redirect > Master Playlist Only happens with redirects. |
Is there a way we can bypass this issue? |
Just figured out this is the issue with the CBC Video plugin. Similar issue to what @olavopeixoto has. The stream dies with a 403 after a few minutes, but never has an issue when using ffmpeg. The top level m3u8 contains
Which results in: Inputstream.adaptive FFMPEG |
Reading through the code, I think I know why the above is happening. In routine HLSTree::open routine AdaptiveTree::PreparePaths is called which extracts the manifest parameter (i.e. from '?' to the end of the URL string) from the Master Playlist. Thus manifest_parameter is not empty. Then when routine HLSTree::processManifest processes the playlist it appends the manifest parameter to the end of URLs for the Media Playlists. @peak3d is that the expected behavior? If it is expected, do I have some special case that needs adding? |
The process of adding the manifest parameter to the media playlists was added in Subsequently revised with an exception to not apply if the URL changes in Reverting this, the CBC streams do not die with a 403. Things I note, this is currently being done for both |
i thought query parameters shouldn't be added at all? eg. if I go to Choose HLS, and enter You can see that it grabs Confirmed IA does add the ?test=1234 to subplaylist / audio playlists Also confirmed ffmpeg kodi does NOT add the query param |
Well, I've done a pull-request removing it for #EXT-X-STREAM-INF. I can update it if #EXT-X-MEDIA should also be changed. |
should not be in X-MEDIA either (ffmpeg doesn't and bitmovin doesnt) You should maybe update your PR removing it from both :) shouldn't need 'manifest_parameter_' at all, unless maybe for redirects... headers should be re-used, but not query params. Best to keep IA as close behaviour as main players as that should give best compatibility. |
Updated. I didn't see any mention of the initial commit. There was an issue report that resulted in the commits adding exceptions, but nothing for the original commit. |
Great! I also have a issue open #473 about how redirects break some mpds / hls: eg. |
This issue is still happening. Here is a current log with the same exact problem, missing cookies: here is the full pertinent log ia_issue_184.log the relevant parts are, before the 400 response code, on previous requests we have:
and then for the failing request the cookies are missing:
The device I am using and version number: 2020-10-22 12:18:53.055 T:4673588672 NOTICE: Starting Kodi (18.8 (18.8.0) Git:20200727-45686bddb1). Platform: OS X x86 64-bit |
@olavopeixoto your pastebin link results in a 404, not found error. Could you check the URL for your log? |
thank you. I fixed the link |
Thanks. That error is different then the fix I did above for the 403 error. In this case it is a 400 Error, which is a rather vague error. Initial guess would be consistent with yours about the cookie, if the website is expecting a cookie and you don't provide it, I guess that could be a "Bad Request". I gather this is a paid streaming service. |
Hi, log
The playlist: The playlist:
|
i am try investigating on the cookies problem reported
and by looking at log file on comment #184 (comment) from the log mentioned, on line 60 there is a curl session created in fact on subsequent http requests is always printed after some http requests, there is again if so, there is need to find a way to kept cookies |
i have implemented a workaround for the session cookies problem, the cookies now are stored managed by ISAdaptive, test builds (Kodi 21 only): otherwise you can build PR #1412 |
inputstream.adaptive is not sending cookies for some requests resulting in error response.
See attached log the request to https://live01.video.globo.com/d/s/dash-univ24ha/dash-univ24ha_audio-377579.mp4 is not sending the required cookies resulting in 400 response.
kodi.log
Here is the mpd manifest:
manifest.txt
The text was updated successfully, but these errors were encountered: