ReVanced / revanced-patches

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

bug: TikTok 36.5.4 fails to patch #3691

Closed ikerinagy closed 2 days ago

ikerinagy commented 2 days ago

Bug description

When trying to patch TikTok version 36.5.4 using the app, or WSA, it fails after compiling the 22nd or 23rd dex file

Error logs

- Device Info
ReVanced Manager: 1.22.0
Model: Subsystem for Android(TM)
Android version: 13
Supported architectures: x86_64, arm64-v8a, x86, armeabi-v7a, armeabi
Root permissions: No

- Patch Info
App: com.zhiliaoapp.musically v36.5.4 (Suggested: 36.5.4)
Patches version: v4.15.0
Patches added: Default
Patches removed: None
Default patch options changed: None

- Settings
Allow changing patch selection: false
Version compatibility check: true
Show universal patches: true
Patches source: revanced/revanced-patches
Integration source: revanced/revanced-integrations

- Logs
Reading APK
Decoding app manifest
Loading patches
Merging integrations
Executing patches
Applied 8 patches
Compiling patched dex files
Compiled 22 dex files
An error occurred:
java.lang.OutOfMemoryError: Failed to allocate a 48 byte allocation with 1455672 free bytes and 1421KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
    at java.lang.StringFactory.newStringFromChars(StringFactory.java:112)
    at com.android.tools.smali.util.Utf8Utils.utf8BytesWithUtf16LengthToString(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.DexReader.readString(Unknown Source:12)
    at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$5.get(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$5.get(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$6.get(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.DexBackedDexFile$6.get(SourceFile:0)
    at com.android.tools.smali.dexlib2.dexbacked.reference.DexBackedMethodReference.getDefiningClass(Unknown Source:28)
    at com.android.tools.smali.dexlib2.base.reference.BaseMethodReference.equals(Unknown Source:9)
    at java.util.HashMap.putVal(HashMap.java:634)
    at java.util.HashMap.put(HashMap.java:611)
    at com.android.tools.smali.dexlib2.writer.pool.MethodPool.intern(Unknown Source:7)
    at com.android.tools.smali.dexlib2.writer.pool.ClassPool.internReference(Unknown Source:63)
    at com.android.tools.smali.dexlib2.writer.pool.ClassPool.internCode(Unknown Source:42)
    at com.android.tools.smali.dexlib2.writer.pool.ClassPool.intern(Unknown Source:219)
    at com.android.tools.smali.dexlib2.writer.pool.DexPool.internClass(Unknown Source:4)
    at lanchon.multidexlib2.DexIO.writeMultiDexDirectoryCommon(Unknown Source:27)
    at lanchon.multidexlib2.DexIO.access$000(Unknown Source:0)
    at lanchon.multidexlib2.DexIO$1.call(SourceFile:0)
    at lanchon.multidexlib2.DexIO$1.call(SourceFile:0)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)
Something went wrong:
PathNotFoundException: Cannot copy file to '/data/user/0/app.revanced.manager.flutter/files/lastPatchedApp.apk', path = '/data/user/0/app.revanced.manager.flutter/files/patcher/tmp-NALVBH/out.apk' (OS Error: No such file or directory, errno = 2)

Solution

No response

Additional context

No response

Acknowledgements

LisoUseInAIKyrios commented 2 days ago

https://github.com/ReVanced/revanced-patches/issues/3690