Skip to content

Playback stops after ~10s: GVS returns 403 for ranges past the first ~60s with ANDROID_VR client (likely missing GVS PO token) #1481

Description

@willheisenberg

Context

  • Add-on Version: 7.4.4 (from repository.xbmc.org)
  • Kodi Version: 21.3 (21.3.0) Git:21.3-Omega, Linux ARM 64-bit
  • Kodi GUI Language: German (de_DE)
  • Operating System: LibreELEC 12.2.1 on Raspberry Pi 5, kernel 6.12.56
  • Operating System Language: German
  • inputstream.adaptive: 21.5.22.1
  • Not signed in to the add-on (own API key/OAuth credentials configured, but no account authorised)

Expected Behavior

Video plays through to the end.


Current Behavior

Playback starts, runs for roughly 10-15 seconds, then stops and returns to the listing.

The add-on's stream proxy receives 403 Forbidden from the googlevideo servers. The pattern is consistent: the initial range requests succeed, but every request for a byte range beyond roughly the first 60 seconds of the audio stream fails. inputstream.adaptive retries six times and gives up, which tears down the player well before playback actually reaches the 60 second mark.

All failing requests are made with Client: 28 (ANDROID_VR).

Over one affected session, 250 responses were 403 Forbidden and 26 were 400 Bad Request; the 400s appear when the add-on follows a Target: redirect to a different googlevideo host.

Affected itags were 140 (audio, mp4a) and 397 (video, AV1). Three different videos were affected in the same session, so it is not content specific.


Steps to Reproduce

  1. Start any video from a channel listing or search result.
  2. Playback begins normally.
  3. After ~10-15 seconds playback stops and Kodi returns to the previous screen.

Log

I am aware the template asks for a complete debug log, and I am sorry that I cannot supply one: debug logging was not enabled while the problem was occurring, and the problem has since stopped on its own without any change on my side. I would rather file this now than sit on it, because the relevant lines seem unambiguous and the timing lines up with a known upstream change (see below). I will turn on debug logging and verbose add-on logging and attach a full log immediately if it recurs.

Excerpt from kodi.log (public IP redacted, 127.0.0.1 is the add-on's own proxy):

2026-08-14 14:52:59.550 T:8676  warning <general>: [plugin.video.youtube] http_server:537(do_GET)
                                                   Stream proxy response not OK
                                                   Stream: ('<video-id>', '140') - ('audio', 'mp4')
                                                   Method: 'POST'
                                                   Server: 'rr2---sn-u1i5h5-5q.googlevideo.com'
                                                   Target: 'rr5---sn-5hne6nz6.googlevideo.com'
                                                   Status: 403 Forbidden
                                                   Client: 28 (ANDROID_VR)
                                                   Range:  'bytes=980184-1141774' (~60.57s)

2026-08-14 14:52:59.661 T:8676  warning <general>: [plugin.video.youtube] http_server:537(do_GET)
                                                   Stream proxy response not OK
                                                   Stream: ('<video-id>', '140') - ('audio', 'mp4')
                                                   Method: 'POST'
                                                   Server: 'rr5---sn-5hne6nz6.googlevideo.com'
                                                   Target: None
                                                   Status: 400 Bad Request
                                                   Client: 28 (ANDROID_VR)
                                                   Range:  'bytes=980184-1141774' (~60.57s)

Corresponding traceback:

Traceback (most recent call last):
  File ".../youtube_plugin/kodion/network/requests.py", line 442, in request
    response.raise_for_status()
  File ".../script.module.requests/lib/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url:
https://rr5---sn-5hne6nz6.googlevideo.com/videoplayback?...&itag=140&...&c=ANDROID_VR&...

And the resulting inputstream.adaptive failure:

error <general>: AddOnLog: inputstream.adaptive: [AS-17] Download failed, HTTP error 403:
  http://127.0.0.1:50152/youtube/stream?...&itag=140&...
warning <general>: AddOnLog: inputstream.adaptive: [AS-17] Segment download failed, attempt 2...
[... attempts 3 through 6 ...]
info <general>: CVideoPlayer::OnExit()

There are no LOGIN_REQUIRED or "Sign in to confirm you're not a bot" entries anywhere in the log, and no VPN, proxy or custom DNS is in use.


Additional Information

This looks like it may be the same change yt-dlp documented on 2026-08-02 in yt-dlp/yt-dlp#17348: the android_vr client now requires a GVS PO token for everything except format 18, and without it the video servers return 403. The symptom described there — initial data is served, then 403 — matches what I see.

As far as I can tell from reading the source, the add-on has no PO token handling (only visitorData), so I assume there is no configuration on my side that would work around this.

One secondary observation while trying to work around it locally, in case it is useful: in _process_adaptive_streams, streams are written with

mime_group[itag] = quality_group[itag] = details

without checking whether the itag is already present, so a later client group overwrites the URLs of earlier ones. Since android_vr is the last entry in _client_groups, its URLs win for every itag it provides — including audio itag 140. That is why restricting the stream features (for example disabling AV1 so that itag 397 is not selected) does not help: the audio URL still comes from android_vr and still fails. The HLS path at lines ~1226 and ~1264 does guard with if itag in stream_list: continue, so the behaviour differs between the two paths.

Happy to test any patch or test build, and to provide a full debug log if it comes back.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions