anddea / revanced-patches

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

bug: Custom Settings Name Doesn't Work #642

Closed AbakNacchan closed 2 weeks ago

AbakNacchan commented 2 weeks ago

Type

Error while patching

Tools used

CLI

Application

Lastest supported YouTube and YouTube Music.

Bug description

Error while building.

Error logs

WARNING: /home/runner/work/RV-X/RV-X/temp/music-rv-x-7.06.53-arm64-v8a-apk-temporary-files/patcher/apk/res/values/strings.xml:1474: error: duplicate value for resource 'string/revanced_extended_settings_title' with config ''. 
WARNING: /home/runner/work/RV-X/RV-X/temp/music-rv-x-7.06.53-arm64-v8a-apk-temporary-files/patcher/apk/res/values/strings.xml:1474: error: resource previously defined here. 
WARNING: /home/runner/work/RV-X/RV-X/temp/music-rv-x-7.06.53-arm64-v8a-apk-temporary-files/patcher/apk/res/values/strings.xml: error: file failed to compile. 
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_77245092673905779776253650699890892035.tmp, compile, --dir, /home/runner/work/RV-X/RV-X/temp/music-rv-x-7.06.53-arm64-v8a-apk-temporary-files/patcher/apk/res, --legacy, -o, /home/runner/work/RV-X/RV-X/temp/music-rv-x-7.06.53-arm64-v8a-apk-temporary-files/patcher/apk/build/resources.zip]
    at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:123)
    at brut.androlib.AaptInvoker.invokeAapt(AaptInvoker.java:394)
    at app.revanced.patcher.data.ResourceContext.get(ResourceContext.kt:134)
    at app.revanced.patcher.Patcher.get(Patcher.kt:268)
    at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:324)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
    at picocli.CommandLine.execute(CommandLine.java:2170)
    at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_77245092673905779776253650699890892035.tmp, compile, --dir, /home/runner/work/RV-X/RV-X/temp/music-rv-x-7.06.53-arm64-v8a-apk-temporary-files/patcher/apk/res, --legacy, -o, /home/runner/work/RV-X/RV-X/temp/music-rv-x-7.06.53-arm64-v8a-apk-temporary-files/patcher/apk/build/resources.zip]
    at brut.util.OS.exec(OS.java:104)
    at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:119)
    ... 13 more

WARNING: /home/runner/work/RV-X/RV-X/temp/youtube-rv-x-19.23.40-arm64-v8a-apk-temporary-files/patcher/apk/res/values/strings.xml:4143: error: duplicate value for resource 'string/revanced_extended_settings_title' with config ''. 
WARNING: /home/runner/work/RV-X/RV-X/temp/youtube-rv-x-19.23.40-arm64-v8a-apk-temporary-files/patcher/apk/res/values/strings.xml:4143: error: resource previously defined here. 
WARNING: /home/runner/work/RV-X/RV-X/temp/youtube-rv-x-19.23.40-arm64-v8a-apk-temporary-files/patcher/apk/res/values/strings.xml: error: file failed to compile. 
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_83141651201266194307229969894416996435.tmp, compile, --dir, /home/runner/work/RV-X/RV-X/temp/youtube-rv-x-19.23.40-arm64-v8a-apk-temporary-files/patcher/apk/res, --legacy, -o, /home/runner/work/RV-X/RV-X/temp/youtube-rv-x-19.23.40-arm64-v8a-apk-temporary-files/patcher/apk/build/resources.zip]
    at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:123)
    at brut.androlib.AaptInvoker.invokeAapt(AaptInvoker.java:394)
    at app.revanced.patcher.data.ResourceContext.get(ResourceContext.kt:134)
    at app.revanced.patcher.Patcher.get(Patcher.kt:268)
    at app.revanced.cli.command.PatchCommand.run(PatchCommand.kt:324)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
    at picocli.CommandLine.execute(CommandLine.java:2170)
    at app.revanced.cli.command.MainCommandKt.main(MainCommand.kt:12)
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_83141651201266194307229969894416996435.tmp, compile, --dir, /home/runner/work/RV-X/RV-X/temp/youtube-rv-x-19.23.40-arm64-v8a-apk-temporary-files/patcher/apk/res, --legacy, -o, /home/runner/work/RV-X/RV-X/temp/youtube-rv-x-19.23.40-arm64-v8a-apk-temporary-files/patcher/apk/build/resources.zip]
    at brut.util.OS.exec(OS.java:104)
    at brut.androlib.AaptInvoker.invokeAapt2(AaptInvoker.java:119)
    ... 13 more

Solution

No response

Additional context

No response

Device Environment

No response

Acknowledgements

anddea commented 2 weeks ago

Not enough details, I cannot reproduce this issue. There's only one string for revanced_extended_settings_title. Clear your paching tool, try again and provide more details, how you're patching, share options.json, etc.

AbakNacchan commented 2 weeks ago

Not enough details, I cannot reproduce this issue. There's only one string for revanced_extended_settings_title. Clear your paching tool, try again and provide more details, how you're patching, share options.json, etc.

[ {
    "patchName": "Settings for YouTube",
    "options" : [ {
        "key": "RVXSettingsMenuName",
        "value": "ReVanced eXtended"
    } ]
  }, {
    "patchName": "Settings for YouTube Music",
    "options" : [ {
        "key": "RVXSettingsMenuName",
        "value": "ReVanced eXtended"
    } ]
  }, {
    "patchName" : "Custom double tap length",
    "options" : [ {
      "key" : "DoubleTapLengthArrays",
      "value" : "3, 5, 10, 15, 20, 30, 60, 120, 180"
    } ]
  }, {
    "patchName" : "Translations",
    "options" : [ {
      "key" : "SelectedAppLanguages",
      "value" : "ar, id-rID, ja-rJP, ko-rKR"
    } ]
  }, {
    "patchName" : "Theme",
    "options" : [ {
      "key" : "DarkThemeBackgroundColor",
      "value" : "@android:color/black"
    }, {
      "key" : "LightThemeBackgroundColor",
      "value" : "@android:color/white"
    } ]
  }, {
    "patchName" : "Overlay buttons",
    "options" : [ {
      "key" : "IconType",
      "value" : "rounded"
    } ]
  }, {
    "patchName": "Shorts overlay buttons",
    "options": [ {
        "key": "IconType",
        "value": "outlinecircle"
    } ]
  }, {
    "patchName": "Visual preferences icons",
    "options": [ {
        "key": "ExtendedIcon",
        "value": "revanced_colored"
    } ]
  }, {
    "patchName" : "Force snackbar theme",
    "options" : [ {
      "key" : "CornerRadius",
      "value" : "4.0dip"
    }, {
      "key" : "BackgroundColor",
      "value" : "?ytBaseBackground"
    }, {
      "key" : "StrokeColor",
      "value" : "None"
    } ]   
  }, {
    "patchName" : "Custom branding icon YouTube",
    "options" : [ {
      "key" : "AppIcon",
      "value" : "mmt_blue"
    } ]
  }, {
    "patchName": "Custom branding icon YouTube Music",
    "options" : [ {
        "key": "AppIcon",
        "value": "mmt"
    } ]
} ]

I've removed Settings for YouTube Music in above, the error is not present while building Music, buat still got error on YouTube, and I assume removing Settings for YouTube will solve the error too. So yeah, there might a problem on duplicate strings or whatsoever.

=== edited ===

I guess the problem is on the "key": "RVXSettingsMenuName" or something.

anddea commented 2 weeks ago

You're right. I'll take a look later. Thank you for your report.