Pvr.iptvsimple: CCurlFile::CReadState::FillBuffer Failed: HTTP returned code 401

After a recent update on my Vero 4K, I am no longer able to use my IPTV subscription.

The first error in the log file is CCurlFile::CReadState::FillBuffer Failed: HTTP returned code 401 and afterwards all connection towards the provider return a 401.

After trying all kind off options I am at a dead end.

Here is what I already tried:

  • Full reinstall of osmc on my Vero 4k
  • Tried the osm devel repository deb https://apt.osmc.tv bullseye-devel main
  • Added a userAgent config within the pvr.iptv add-on.

Nothing solved the problem.

The weirdest thing is, when I run curl -v <link to the IPTV provider on the Vero 4K from the cli there is no 401 and I get the expected data.

Again, at a dead end, any help would be greatly appreciated.

Some extra information:

PRETTY_NAME="Open Source Media Center"
NAME="OSMC"
VERSION="August 2023"
VERSION_ID="2023.08-1"
ID=osmc
ID_LIKE=debian

ANSI_COLOR="1;31"
HOME_URL="https://osmc.tv"
SUPPORT_URL="https://osmc.tv"
BUG_REPORT_URL="https://osmc.tv"

ii  mediacenter-addon-osmc               3.0.771                        all          OSMC addon for mediacenter
ii  mediacenter-eventclients-common-osmc 1.0.5                          all          Eventclient common resources for mediacenter
ii  mediacenter-send-osmc                1.0.0-7                        all          Eventclient send for mediacenter
ii  mediacenter-skin-osmc                20.1.1-1                       all          OSMC skin for mediacenter
ii  vero3-mediacenter-osmc               20.2.0-12                      armhf        Media Center package for OSMC

Check if they are blocking OSMC or Kodi. Some providers do.

Thanks for the reply,

Wouldn’t then the curl -v ... also fail, and as mentioned I also configured the userAgent cur/7.74.0 option the same version as curl on the cli.

It will send Kodi as the user agent if I recall. We used to send OSMC but some providers blocked it.

One can alter the userAgent in instance-settings-1.xml

<setting id="defaultUserAgent" default="true" />curl/7.74.0</setting>

A small update from my side, this has taken already to long, multiple hours over multiple days.

To test the hypothesis that 'kodi and or osmc` is blocked I used curl from the command line.

curl --user-agent curl <link> is working, when trying curl --user-agent kodi <link> we receive a 401.

So one would expect that the instance-settings-1.xml change with <setting id="defaultUserAgent">curl</setting> should fix this. Well it isn’t.
I guess maybe a bug in pvr.iptvsimple or a config setting that is still missing.

I can’t find an example on what is expected in instance-settings-1.xml if anybody has one that is working, please let me know.

I would ask the provider to unblock Kodi, it’s probably the simplest way.

In a world where being a customer still counts, this would indeed be easy …

There are plenty of examples where the supplier keeps insisting that nothing has changed on their end … Even the curl output isn’t convincing.

Thanks @sam_nazarko

It’s possible your provider is a reseller and doesn’t have such control.
My understanding is it is now possible to change the user agent. See add option for change "user_agent" · Issue #225 · kodi-pvr/pvr.iptvsimple · GitHub.

I know and tried multiple versions, but nothing solves the problem.

Therefor the question, what is the exact xml syntax to use.
In the real world userAgent variable isn’t just a single word, but a complete string.

Something like:

"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36"

Even the pvr.iptvsimple source on github has no example.

And the search continues and during that search I ran into this: Opening stream fails with error 401 · Issue #720 · kodi-pvr/pvr.iptvsimple · GitHub

This could also be related to a new curl lib or similar used by osmc.