revanced-patches icon indicating copy to clipboard operation
revanced-patches copied to clipboard

bug (YouTube): Cannot open channel pages on tablet

Open j1elo opened this issue 2 years ago • 9 comments

Bug description

It's impossible to open any channel's main page on the YouTube app. When trying to do so, an error shows up that says:

There was a problem with the server [400]

However, doing exactly the same in parallel with a phone, it works fine and the channel's page is opened. This has been tested in multiple videos, and the same error always happens.

Steps to reproduce:

  • Open patched YouTube.
  • Tap on any video.
  • Tap on the channel's name, below the video's title.

More details:

  • Tested with a clean install (no settings changed from defaults) on both tablet and phone.
  • The network and the devices don't have any kind of ad-blocker such as AdGuard.

Thanks a lot for this app and for all the effort it takes to make it... I only hope to help make it a tiny bit better.

Merry Christmas!

Error logs

$ logcat | grep -E 'AndroidRuntime|YouTube|Gms'

On initial attempt to open a channel page:

12-24 17:05:27.512  2765  2765 W YouTube : Failed to set parent screen

Then, on every tap to RETRY:

12-24 17:08:31.484  1501  1549 D GmsAuthManagerSvc: getToken: account:<REDACTED EMAIL> scope:oauth2:https://www.googleapis.com/auth/peopleapi.readonly https://www.googleapis.com/auth/accounts.reauth https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/photos.image.readonly https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/identity.lateimpersonation https://www.googleapis.com/auth/assistant-sdk-prototype extras:Bundle[{androidPackageName=app.revanced.android.youtube, clientPackageName=app.revanced.android.youtube, service_connection_start_time_millis=3337644, handle_notification=true}], notify: true
12-24 17:08:31.486  1501  1549 D GmsAuthManager: peekAuthToken: com.google.android.youtube:<REDACTED TOKEN>:oauth2:https://www.googleapis.com/auth/peopleapi.readonly https://www.googleapis.com/auth/accounts.reauth https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/photos.image.readonly https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/identity.lateimpersonation https://www.googleapis.com/auth/assistant-sdk-prototype
12-24 17:08:31.486  1501  1549 D GmsAuthManagerSvc: getToken: AuthResponse{auth='<REDACTED DATA>', issueAdvice='stored'}
12-24 17:08:31.516  1501  1553 D GmsAuthManagerSvc: getToken: account:<REDACTED EMAIL> scope:oauth2:https://www.googleapis.com/auth/peopleapi.readonly https://www.googleapis.com/auth/accounts.reauth https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/photos.image.readonly https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/identity.lateimpersonation https://www.googleapis.com/auth/assistant-sdk-prototype extras:Bundle[{androidPackageName=app.revanced.android.youtube, clientPackageName=app.revanced.android.youtube, service_connection_start_time_millis=3337696, handle_notification=true}], notify: true
12-24 17:08:31.518  1501  1553 D GmsAuthManager: peekAuthToken: com.google.android.youtube:<REDACTED TOKEN>:oauth2:https://www.googleapis.com/auth/peopleapi.readonly https://www.googleapis.com/auth/accounts.reauth https://www.googleapis.com/auth/youtube.force-ssl https://www.googleapis.com/auth/photos.image.readonly https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/identity.lateimpersonation https://www.googleapis.com/auth/assistant-sdk-prototype
12-24 17:08:31.518  1501  1553 D GmsAuthManagerSvc: getToken: AuthResponse{auth='<REDACTED DATA>', issueAdvice='stored'}

Solution

No response

Additional context

Version info:

  • YouTube v18.45.43, patched on a PC with revanced-cli.
  • Vanced MicroG v0.2.24.220220
  • revanced-cli v4.3.0
  • revanced-integrations v1.0.0
  • revanced-patches v3.1.0

Command used for patching:

java -jar revanced-cli-*.jar patch \
    --patch-bundle revanced-patches-*.jar \
    --merge revanced-integrations-*.apk \
    --purge \
    com.google.android.youtube_*.apk

Acknowledgements

  • [X] This issue is not a duplicate of an existing bug report.
  • [X] I have chosen an appropriate title.
  • [X] All requested information has been provided properly.

j1elo avatar Dec 24 '23 16:12 j1elo

Try repatching and exclude wide search bar patch.

LisoUseInAIKyrios avatar Dec 24 '23 16:12 LisoUseInAIKyrios

Try repatching and exclude wide search bar patch.

Thanks, will do.

j1elo avatar Dec 24 '23 16:12 j1elo

The error is caused by "Tablet layout" patch. I am unsure why, because the code flow should not differ from stock when the setting is untouched.

oSumAtrIX avatar Dec 24 '23 16:12 oSumAtrIX

Confirmed. Had to go to Settings > ReVanced > Layout, and turn "Enable tablet layout" ON.

This setting is off by default, which causes the issue here. Upon enabling tablet layout and restarting the app, the Channel page shows up successfully

(just for completeness: this also solved https://github.com/ReVanced/revanced-patches/issues/2536 and https://github.com/ReVanced/revanced-patches/issues/2538 for me).

Not sure if the tablet layout patch could be improved somehow, e.g. to be enabled by default when a tablet-sized screen is detected. But, technically speaking I'd consider this a non-bug, just a default configuration issue. Maybe it merits some doc for users to know about it.

j1elo avatar Dec 24 '23 16:12 j1elo

Wait I mixed up issues here.

j1elo avatar Dec 24 '23 16:12 j1elo

It is a bug as the toggle should force tablet layout when enabled, but not disable it when not enabled.

oSumAtrIX avatar Dec 24 '23 16:12 oSumAtrIX

So here's the summary of all findings so far:

  • The 3 tablet issues were: Watch History doesn't show up, Cannot open channel page, Cannot expand video description.
  • Turns out all 3 issues are solved by including the "Enable tablet layout" patch and enabling it on the ReVanced settings. So it makes sense only a single issue is left open.
  • All 3 issues still happen if "Enable tablet layout" patch is excluded when patching the app. So this patch is needed for the tablet, and the option must be enabled.

j1elo avatar Dec 24 '23 17:12 j1elo

Please figure out which patch causes it and report back:

image

oSumAtrIX avatar Dec 24 '23 17:12 oSumAtrIX

go to Settings > ReVanced > Layout, and turn "Enable tablet layout" ON.

This workaround also works for me

ttimasdf avatar Jan 06 '24 01:01 ttimasdf