Skip to content

[com.google.android.youtube] Video playback fails with HTTP error code 403 #1870

@oSumAtrIX

Description

@oSumAtrIX

Affected app

Name: YouTube
Package id: com.google.android.youtube

Update

The issue is worked around by modifying YouTube to spoof the client according to TeamNewPipe/NewPipe#9038 (comment).

Update 2

To Reproduce

  1. Make sure you are using the latest version of MicroG on the master branch
  2. Install YouTube and login
  3. Video fails to buffer after a minute

Expected behavior

The video is expected to load.

System

Android 14, MicroG GmsCore (spoofed correctly)

Outdated/ Unrelated context

Additional context

  • Videos fail to play the requested video when POSTing to /videoplayback. This endpoint returns 403. The request itself did not yield anything useful when skimmed over. The payload is protobuf encoded and some data is likely hashed. No helpful information was inferred from the URL queries or request headers. I also imagine this issue's origin can come from a completely unrelated request (for example, for token exchange and use in /videoplayback).

  • This issue is ONLY reproducible on certain accounts in certain regions due to A/B testing, but expected to roll out globally. I have been able to reproduce this issue with multiple people's devices and ROMs (by using the same affected account), but many people reported this issue on their own accounts as well. On r/revancedapp some references can be found here: #1, #2.

    Note: The YouTube app including MicroG was altered so they can work on stock ROMs, but the issue does not originate from the changes. because we were able reproduce this on the regular YouTube app and on the regular version of MicroG on different custom ROMs.

    An additional confirmation this issue is unrelated to the modifications on YouTube or MicroG is that when the modified app is altered back to use Google Services instead of MicroG, this issue does not occur. This was achieved by mounting the app with mount and root permissions on top of the regular unmodified app, allowing it to bypass the measurements from GMS to prevent unauthorized apps from using GMS such as the modified YouTube app. To sum up, this issue occurs on unmodified YouTube and upstream MicroG.

    To solve this issue, I am willing to contribute with accounts from my side on which this issue can be fully reproduced.

  • This issue can be reproduced as well on older versions of YouTube. It is unlikely the issue originates from the app and in combination with the other additional context it is assumed, the issue is related to MicroG.

  • Related exception stack traces from YouTube v17.49.37 when the issue occurs:

    •  OException when handling a request
       cn: Response code: 403
           at bdf.b(PG:37)
           at yte.b(PG:20)
           at zlr.b(PG:1)
           at yso.b(PG:2)
           at mfg.b(PG:16)
           at zlr.b(PG:1)
           at yss.b(PG:22)
           at zlr.b(PG:1)
           at yrg.b(PG:54)
           at bcv.b(PG:48)
           at bcr.b(PG:2)
           at abxf.b(PG:2)
           at bcx.b(PG:1)
           at mda.i(PG:19)
           at mda.b(PG:17)
           at bbw.a(PG:1)
           at bbw.read(PG:5)
           at bbw.read(PG:3)
           at afyw.a(PG:3)
           at abwx.writeTo(PG:3)
           at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:102)
           at org.apache.http.impl.AbstractHttpServerConnection.sendResponseEntity(AbstractHttpServerConnection.java:187)
           at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:214)
           at abxa.run(PG:5)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
           at syj.run(PG:22)
           at java.lang.Thread.run(Thread.java:1012)
      
    •  Given up trying to get FCM Registration Id:
       java.io.IOException: SERVICE_NOT_AVAILABLE
            at ndo.a(PG:11)
            at nne.run(PG:54)
            at rt.execute(PG:6)
            at nso.a(PG:8)
            at abmg.i(PG:5)
            at nsz.s(PG:3)
            at nne.run(PG:59)
            at rt.execute(PG:12)
            at nso.a(PG:8)
            at abmg.i(PG:5)
            at nsz.s(PG:3)
            at ntm.b(PG:1)
            at mut.d(PG:1)
            at muv.a(PG:2)
            at bnp.handleMessage(PG:43)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loopOnce(Looper.java:201)
            at android.os.Looper.loop(Looper.java:288)
            at android.app.ActivityThread.main(ActivityThread.java:7872)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
      

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions