inotia00 / ReVanced_Extended

ReVanced Extended Issues/Request repo
706 stars 21 forks source link

bug: (YouTube Music) feat:`Replace Cast button` failed to patch properly #2101

Closed Rairof closed 3 months ago

Rairof commented 4 months ago

Type

Error while patching

Tools used

RVX Manager

Application

YouTube Music v7.03.51

Bug description

Replace Cast button failed to patch in revanced manager.

Error logs

- Device Info
ReVanced Manager: 1.20.3
Model: 2107113SG
Android version: 14
Supported architectures: arm64-v8a, armeabi-v7a, armeabi
Root permissions: No

- Patch Info
App: com.google.android.apps.youtube.music v7.03.51 (Suggested: 7.03.51)
Patches version: v4.8.6
Patches added: Hide double tap overlay filter, Hide overlay filter, Hide player overlay filter, Replace Cast button
Patches removed: Custom branding icon YouTube Music
Default patch options changed: Hide layout components [Force hide voice search button: true], Custom branding name YouTube Music [App name in notification panel: YouTube Music, App name in launcher: YouTube Music]

- Settings
Allow changing patch selection: true
Version compatibility check: false
Show universal patches: true
Remove unused library: true
Use pre-release: true
Patches source: inotia00/revanced-patches
Integration source: inotia00/revanced-integrations

- Logs
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Deleting existing temporary files directory
Decoding resources
Executing patches
Applied 32 patches
Replace Cast button failed: app.revanced.patcher.patch.PatchException: 'Replace Cast button' depends on 'PlayerResponsePatch' that raised an exception:
app.revanced.patcher.patch.PatchException: Failed to resolve PlaybackStartDescriptorFingerprint
    at app.revanced.util.BytecodeUtilsKt.getException(BytecodeUtils.kt:43)
    at app.revanced.util.BytecodeUtilsKt.resultOrThrow(BytecodeUtils.kt:35)
    at app.revanced.patches.music.utils.playerresponse.PlayerResponsePatch.execute(PlayerResponsePatch.kt:40)
    at app.revanced.patches.music.utils.playerresponse.PlayerResponsePatch.execute(PlayerResponsePatch.kt:10)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Unknown Source:190)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Unknown Source:91)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Unknown Source:292)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:71)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$2.invokeSuspend(Unknown Source:76)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:11)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:93)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(Unknown Source:46)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Unknown Source:23)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Unknown Source:73)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:0)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Unknown Source:6)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(Unknown Source:462)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$hsuHvwTCdC5Nf5dk5fKUQSHxuuY(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda5.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:1012)

    at app.revanced.patcher.Patcher$apply$1.invokeSuspend$executePatch(Unknown Source:148)
    at app.revanced.patcher.Patcher$apply$1.invokeSuspend(Unknown Source:292)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at app.revanced.patcher.Patcher$apply$1.invoke(SourceFile:0)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:71)
    at app.revanced.manager.flutter.MainActivity$runPatcher$1$patcherResult$1$2.invokeSuspend(Unknown Source:76)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:11)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:93)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(Unknown Source:46)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Unknown Source:23)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Unknown Source:73)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:0)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Unknown Source:6)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:0)
    at app.revanced.manager.flutter.MainActivity.runPatcher$lambda$34(Unknown Source:462)
    at app.revanced.manager.flutter.MainActivity.$r8$lambda$hsuHvwTCdC5Nf5dk5fKUQSHxuuY(SourceFile:0)
    at app.revanced.manager.flutter.MainActivity$$ExternalSyntheticLambda5.run(SourceFile:0)
    at java.lang.Thread.run(Thread.java:1012)
Compiling patched dex files
Compiled 8 dex files
Compiling modified resources
Ripping selected native libs
Aligning APK
Signing APK
Patched APK

Solution

Fix relevant patch issue

Additional context

Let me know if I missed anything

Device Environment

Android 14, Lineage OS 21

Acknowledgements

nightznero commented 4 months ago

Same for me, A13 OneUI 5.1

inotia00 commented 4 months ago

Replace cast button patch has been no longer maintained since around December last year

I already planned to remove this patch around January of this year, but I still haven't removed it..

I will definitely remove this patch in the next release

Rairof commented 4 months ago

https://github.com/inotia00/ReVanced_Extended/issues/2101#issuecomment-2140459572 I would like to have it fixed rather than being removed if it's not too much trouble, quite a handy feature to have. If it's not possible then it's fine removing it for newer versions but keep it for previous versions that worked as it works fine in v7.02.51

Aryan-Chauhan commented 4 months ago

BTW, this patch is working fine on v7.02.52.

Giving error only on v7.03.51.

So, it's recommended to retain it for v7.02.52 and lower.

inotia00 commented 4 months ago

Replace cast button patch was added on September 30, 2023 https://github.com/inotia00/ReVanced_Extended/issues/1431

And Replace cast button patch had the following issues:

  1. Piped instance was unavailable in some regions
  2. Patch does not work if there is at least one unplayable video in the playlist

No one has reported this bug even though it's been 8 months since the Replace cast button patch was added

This is proof that no one uses this feature and no one even wonders what it does

I still haven't found a valid reason to keep this patch

Aryan-Chauhan commented 4 months ago

My personal opinion:

I won't be affected if Replace Cast Button is removed, just don't remove the ability to hide the Cast button.

inotia00 commented 4 months ago

Don't worry, even if the Replace Cast button patch is removed, the Hide Cast button setting will still be available

ichwill061192 commented 4 months ago

Personally, I really like the Replace Cast button option, since on some occasions, when you play a song directly from an album, the video version is played, and not the studio version, and that button me It helps to switch directly to the studio version.

inotia00 commented 3 months ago

reflected in revanced-patches-4.9.1-dev.1

inotia00 commented 3 months ago

reflected in revanced-patches-4.9.1