ReVanced / revanced-patches

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

bug: video-ads patch fail when building #1875

Closed ibrunops closed 1 year ago

ibrunops commented 1 year ago

Type

Error while patching

Bug description

When I tried to build reVanced, video-ads patch failed.

Steps to reproduce

Building reVanced.

Relevant log output

$ java -jar cli.jar \
 --custom-aapt2-binary=/home/kali/Downloads/revanced/dist/arm64-v8a/aapt2 \
 -a youtube.apk \
 -c \
 -o revanced.apk \
 -b patches.jar \
 -m unsigned.apk      
INFO: Reading dex files 
INFO: Decoding AndroidManifest.xml only, because resources are not needed 
INFO: Merging unsigned.apk 
WARNING: Skipping tiktok-ads, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.ss.android.ugc.trill, com.zhiliaoapp.musically 
WARNING: Skipping tiktok-speed, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.ss.android.ugc.trill, com.zhiliaoapp.musically 
WARNING: Skipping tiktok-download, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.ss.android.ugc.trill, com.zhiliaoapp.musically 
WARNING: Skipping tiktok-seekbar, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.ss.android.ugc.trill, com.zhiliaoapp.musically 
WARNING: Skipping tiktok-settings, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.ss.android.ugc.trill, com.zhiliaoapp.musically 
WARNING: Skipping tiktok-force-login, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.ss.android.ugc.trill, com.zhiliaoapp.musically 
WARNING: Skipping tiktok-feed-filter, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.ss.android.ugc.trill, com.zhiliaoapp.musically 
WARNING: Skipping timeline-ads, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.twitter.android 
WARNING: Skipping dynamic-color, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.twitter.android 
WARNING: Skipping monochrome-icon, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.twitter.android 
WARNING: Skipping promo-code-unlock, reason: incompatible with com.google.android.youtube. This patch is only compatible with de.dwd.warnapp 
WARNING: Skipping spotify-theme, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.spotify.music 
WARNING: Skipping disable-capture-restriction, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.spotify.music 
WARNING: Skipping hide-premium-navbar, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.spotify.music 
INFO: Skipping enable-debugging, reason: excluded by default 
WARNING: Skipping pflotsh-ecmwf-subscription-unlock, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.garzotto.pflotsh.ecmwf_a 
WARNING: Skipping tasteBuilder-remover, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping hide-get-premium, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping minimized-playback-music, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
INFO: Skipping compact-header, reason: excluded by default 
WARNING: Skipping upgrade-button-remover, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping music-video-ads, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping background-play, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping exclusive-audio-playback, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping codecs-unlock, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping music-microg-support, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.google.android.apps.youtube.music 
WARNING: Skipping premium-icon-reddit, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.reddit.frontpage 
WARNING: Skipping general-reddit-ads, reason: incompatible with com.google.android.youtube. This patch is only compatible with com.reddit.frontpage 
INFO: Deleting existing resource cache directory 
INFO: Decoding resources 
INFO: hide-crowdfunding-box succeeded 
INFO: hide-time-and-seekbar succeeded 
INFO: hide-video-buttons succeeded 
INFO: enable-wide-searchbar succeeded 
INFO: hide-captions-button succeeded 
INFO: hide-shorts-button succeeded 
INFO: hide-create-button succeeded 
INFO: disable-startup-shorts-player succeeded 
INFO: hide-cast-button succeeded 
INFO: sponsorblock succeeded 
INFO: hide-autoplay-button succeeded 
INFO: hide-album-cards succeeded 
INFO: disable-auto-player-popup-panels succeeded 
INFO: disable-auto-captions succeeded 
INFO: disable-fullscreen-panels succeeded 
INFO: hide-artist-card succeeded 
INFO: return-youtube-dislike succeeded 
INFO: comments succeeded 
INFO: theme succeeded 
INFO: hide-email-address succeeded 
INFO: tablet-mini-player succeeded 
INFO: hide-watermark succeeded 
INFO: hide-my-mix succeeded 
INFO: custom-branding succeeded 
INFO: premium-heading succeeded 
INFO: old-quality-layout succeeded 
INFO: general-ads succeeded 
SEVERE: video-ads failed: 
app.revanced.patcher.patch.PatchResultError
        at app.revanced.patcher.Patcher.executePatches$executePatch(Patcher.kt:346)
        at app.revanced.patcher.Patcher.access$executePatches$executePatch(Patcher.kt:37)
        at app.revanced.patcher.Patcher$executePatches$1.invokeSuspend(Patcher.kt:362)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlin.sequences.SequenceBuilderIterator.hasNext(SequenceBuilder.kt:127)
        at app.revanced.utils.patcher.PatcherKt.applyPatchesVerbose(Patcher.kt:92)
        at app.revanced.cli.patcher.Patcher.start$revanced_cli(Patcher.kt:27)
        at app.revanced.cli.command.MainCommand.run(MainCommand.kt:157)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at app.revanced.cli.main.MainKt.main(Main.kt:7)
Caused by: java.lang.NullPointerException
        at app.revanced.patches.youtube.ad.video.patch.VideoAdsPatch.execute(VideoAdsPatch.kt:44)
        at app.revanced.patches.youtube.ad.video.patch.VideoAdsPatch.execute(VideoAdsPatch.kt:22)
        at app.revanced.patcher.Patcher.executePatches$executePatch(Patcher.kt:342)
        ... 16 more
INFO: hide-infocard-suggestions succeeded 
INFO: swipe-controls succeeded 
INFO: downloads succeeded 
INFO: seekbar-tapping succeeded 
INFO: settings succeeded 
INFO: microg-support succeeded 
INFO: custom-video-buffer succeeded 
INFO: client-spoof succeeded 
INFO: always-autorepeat succeeded 
INFO: remember-video-quality succeeded 
INFO: minimized-playback succeeded 
INFO: custom-playback-speed succeeded 
INFO: hdr-auto-brightness succeeded 
INFO: Compiling resources 
WARNING: aapt2 W 10-28 03:27:34  2540  2540] Unknown chunk type '200'. 
INFO: Writing modified dex files 
INFO: Writing dex file classes2.dex 
INFO: Writing dex file classes.dex 
INFO: Writing dex file classes4.dex 
INFO: Writing dex file classes3.dex 
INFO: Writing dex file classes6.dex 
INFO: Writing dex file classes8.dex 
INFO: Writing dex file classes5.dex 
INFO: Writing dex file classes7.dex 
INFO: Writing resources... 
INFO: Aligning revanced_raw.apk to revanced_aligned.apk 
INFO: Signing revanced_aligned.apk to revanced_signed.apk 
INFO: Copying revanced_signed.apk to revanced.apk 
INFO: Cleaned up cache directory 
INFO: Finished

Screenshots or videos

No response

Solution

No response

Additional context

I used latests versions of CLI (revanced-cli-2.14.0-all.jar), Patches (revanced-patches-2.93.0.jar) and Integrations (v0.59.0). Youtube version 17.41.37 (recommended). I use a custom binary because I'm using Linux arm64 (Raspberry Pi).

Acknowledgements

ibrunops commented 1 year ago

https://github.com/revanced/revanced-patches/pull/878