Kodi Community Forum

Full Version: IPTV simple client doesn't play stream due to: 401 Unauthorized
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear community,
I'm getting crazy with an issue on IPTV streaming. I just purchased, from my provider, an IPTV stream. KODI can read that an shown the channel list, but can't play them.
The relevant error coming from Kodi log is below, the rest of the log is here:   https://pastebin.com/SqbZ49ya

Obliviously with Windows VLC the link works perfect, and the only difference I can see is the User agent:
KODI: User-Agent: Kodi/17.5-RC1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/17.5-RC1-Git:20170918-5f98412
VLC (from tcpdump): User-Agent: VLC

I also tried with my android phone and IPTV extreme app works perfect.

Could someone help me to understand why IPTV Simple client on Kodi just refuse to play?
The crazy thing is that I had another stream (not properly legal) that works perfect with Kodi, but I don't want to be a pirate, so I would like to watch my legal stream on Kodi.
Quote:07:43:45.046 T:660   DEBUG: opening live stream on url 'http://xxxxx/live/username/password/1.ts'
07:43:45.056 T:660   DEBUG: CDVDInputStreamPVRManager - CDVDInputStreamPVRManager::Open - playback has started on filename pvr://channels/tv/Tutti i Canali/pvr.iptvsimple_827236391.pvr
07:43:45.056 T:660   DEBUG: CurlFile::Open(113AED2C) http://xxxxx/live/username/password/1.ts
07:43:45.056 T:660   DEBUG: Curl::Debug - TEXT: Found bundle for host url.com: 0xcef9ea0 [can pipeline]
07:43:45.056 T:660   DEBUG: Curl::Debug - TEXT: Re-using existing connection! (#0) with host url.com
07:43:45.056 T:660   DEBUG: Curl::Debug - TEXT: Connected to url.com (ipaddress) port 80 (#0)
07:43:45.056 T:660   DEBUG: Curl::Debug - HEADER_OUT: GET /live/username/password/1.ts HTTP/1.1
07:43:45.056 T:660   DEBUG: Curl::Debug - HEADER_OUT: Host: url.com
07:43:45.056 T:660   DEBUG: Curl::Debug - HEADER_OUT: Range: bytes=0-
07:43:45.056 T:660   DEBUG: Curl::Debug - HEADER_OUT: User-Agent: Kodi/17.5-RC1 (Windows NT 10.0; WOW64) App_Bitness/32 Version/17.5-RC1-Git:20170918-5f98412
07:43:45.056 T:660   DEBUG: Curl::Debug - HEADER_OUT: Accept: */*
07:43:45.056 T:660   DEBUG: Curl::Debug - HEADER_OUT: Accept-Charset: UTF-8,*;q=0.8
07:43:45.147 T:660   DEBUG: Curl::Debug - TEXT: The requested URL returned error: 401 Unauthorized
07:43:45.147 T:660   DEBUG: Curl::Debug - TEXT: Closing connection 0
(2017-11-26, 13:05)Lucas Rey Wrote: [ -> ]The relevant error coming from Kodi log is below, the rest of the log is here:   https://pastebin.com/SqbZ49ya
Two separate incomplete snippets do not make up the whole kodi.log file.
Please submit a FULL, unedited log file via Pastebin.com or similar text upload website. Keep our forum server clean from log files.
Thank you for reply,
Here the complete log: https://pastebin.com/tgpZ3jiG

The error is always the same:
ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 401
I finally solved the issue, and as I supposed, it was the User-Agent that for unknown reason was refuse by the server, so not Kodi issue.
To solve the issue, I have to download the m3u file and edit it. on each channel I added the following string at the end: |User-Agent=VLC

So, links look like now:
Quote:#EXTM3U
#EXTINF:-1,Channel 1
http://url.com/live/username/password/1.ts|User-Agent=VLC
#EXTINF:-1,Channel 2
http://url.com/live/username/password/2.ts|User-Agent=VLC
....
Then load the file into PVR Simple client and it works.

Actually I cannot use the stream link on Simple PVR client since I don't undesrtand how to pass the User-Agent string on the full link.
I have:
Quote:http://url.com/get.php?username=********...&output=ts
And I don't know how to add the User-Agent. Adding it to the end of the link doens't work. Any help here is appreciated Wink
I'll move this to the IPTV simple section where there may be more specific support available
Thank you for the workaround.
Het probleem is bij mij de VPN.
(2018-03-03, 17:55)FrankP Wrote: [ -> ]Het probleem is bij mij de VPN.
 English only please.
update your kodi repo or install latest Kodi
Hi!
I wanna help.
I have w95 BoxTV. 
When i log in in my Kodi/Qodi, It says "you have not PRV" or backend.
I had Iptv player, and cant'n see longer. it's finished.
How can i get my TVlive via iptvplayer. All my chennels. I meen EPG och M3u.


Thnks any one who can help me.
(2018-09-29, 11:17)Rashkasomaali Wrote: [ -> ]When i log in in my Kodi/Qodi, It says "you have not PRV" or backend.
If you do have Qodi, please take your support questions elsewhere as it is deemed an banned/illegal fork of Kodi.

Otherwise provide your debug log (wiki) via a pastebin website.
Thanks @Lucas Rey .

Don't know why it changed, but that's it.
(2017-11-26, 22:58)Lucas Rey Wrote: [ -> ]I finally solved the issue, and as I supposed, it was the User-Agent that for unknown reason was refuse by the server, so not Kodi issue.
To solve the issue, I have to download the m3u file and edit it. on each channel I added the following string at the end: |User-Agent=VLC

So, links look like now:
Quote:#EXTM3U
#EXTINF:-1,Channel 1
http://url.com/live/username/password/1.ts|User-Agent=VLC
#EXTINF:-1,Channel 2
http://url.com/live/username/password/2.ts|User-Agent=VLC
....
Then load the file into PVR Simple client and it works.

Actually I cannot use the stream link on Simple PVR client since I don't undesrtand how to pass the User-Agent string on the full link.
I have:
Quote:http://url.com/get.php?username=********...&output=ts
And I don't know how to add the User-Agent. Adding it to the end of the link doens't work. Any help here is appreciated Wink  

Thanks Lucas Rey, this work for me as well.

In my case, the error in the log was: CCurlFile::FillBuffer - Failed: HTTP returned error 403
I just added curl as the user agent to the end of the url stream and bang! stream plays.
http://streaming_url:8081/playlist.m3u8|...url/7.62.0
someone fixed the Problem?
No, as it's not a Kodi issue. See the posts above yours for details of where the error lies and what to do about it.