ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.65k stars 301 forks source link

bug(YouTube - Spoof app version): Opening the You / Library tab crashes the app #3969

Open Zakawer opened 1 week ago

Zakawer commented 1 week ago

Bug description

With ReVanced Patches 5.0.2 applied to a YouTube 19.43.41 APK (current recommended version of the YouTube app), there's a potentially nasty bug that if triggered, cannot be reversed without either reinstalling and re-patching YouTube ReVanced, or clearing the storage. Here's how to activate and replicate the bug

  1. Apply ReVanced Patches 5.0.2 to a YouTube 19.43.41 APK using ReVanced Manager, including the "Spoof app version" patch
  2. Go to the ReVanced settings, and select "General layout"
  3. Enable "Spoof app version" and restart the app
  4. Tap the "You" or "Library" button

You should see the app crash.

Error logs

Solution

Until it can be fixed by the ReVanced team directly, I do not recommend enabling "Spoof app version".

Additional context

No response

Acknowledgements

oSumAtrIX commented 1 week ago

Refer to the warning when toggling spoofing version.

LisoUseInAIKyrios commented 1 week ago

5.0.3 removed all the existing spoof targets because Shorts were broken. A single newer target was added. If you want the old spoof targets then patch 19.16.39.

LisoUseInAIKyrios commented 4 days ago

I can recreate this issue when using the latest updated spoof target.

The spoof version needs an adjustment to an even newer version or something else needs a change.

For now, if anyone wants to spoof the app version then patch 19.16.39 and you'll get spoof targets as old as 17.x (and you'll also get the much better old seekbar thumbnails).

LisoUseInAIKyrios commented 4 days ago

Appears to be fixed on dev release.

If you have this issue then re-patching will not fix it, and the app data must be manually cleared.

LisoUseInAIKyrios commented 4 days ago

The issue can still show up when spoofing to 19.16.39

The highest version that has the old Shorts icons is 19.35.36, and that so far seems ok.

If 19.35.35 still causes crashes, then only easy fix is to patch the method that looks up an enum to a resource image and add a default dummy icon for all unknown resources so at least something will load.