reisxd / revanced-builder

A NodeJS ReVanced builder
GNU General Public License v3.0
1.93k stars 172 forks source link

Failed to patch any app #679

Closed Zerogoki00 closed 1 year ago

Zerogoki00 commented 1 year ago

Describe the bug Failed to patch any app

To Reproduce Try to patch any app with any patches

[builder]
An error occured:
Error: EBUSY: resource busy or locked, unlink '\\?\D:\Progs\apk\revanced-cache\1.apk'
at unlinkSync (node:fs:1780:3)
at _unlinkSync (node:internal/fs/rimraf:214:14)
at rimrafSync (node:internal/fs/rimraf:195:7)<br>
at node:internal/fs/rimraf:253:9
at Array.forEach (<anonymous>)
at _rmdirSync (node:internal/fs/rimraf:250:7)
at rimrafSync (node:internal/fs/rimraf:193:7)
at rmSync (node:fs:1274:10)
at afterBuild (C:\snapshot\revanced-builder\wsEvents\patchApp.js:28:3)
at Socket.<anonymous> (C:\snapshot\revanced-builder\wsEvents\patchApp.js:186:53)
Please report this bug here: https://github.com/reisxd/revanced-builder/issues.
Zerogoki00 commented 1 year ago

I deleted revanced and revanced-cache folders and rebooted to start from clean install But I still get the same error

Egglestron commented 1 year ago

I installed the revanced-signed.apk from the revanced-cache folder and it seems to work! Not ideal buy hey, better than nothing.

schumi2004 commented 1 year ago

@Egglestron can you elaborate on that? What do yoy mean with installed revanced-signed.apk, on your phone? Like @Zerogoki00 it's unable to patch any app and don't see yet what installing revanced-signed.apk would help on that.

Egglestron commented 1 year ago

It looks like the patcher is able to build a valid and patched version of the app (at least YouTube in my case), and that the error is happening at a final stage (maybe basic file renaming/moving operations). Indeed, installing the aforementioned APK on my phone worked.

Taking a quick look at the code, the error happens here ("Finished" state): https://github.com/reisxd/revanced-builder/blob/898bb48d590ef50cf265e10a27d62f7501cb583e/wsEvents/patchApp.js#L186 Also, the afterBuild function doesn't seem to do anything critical in my case. https://github.com/reisxd/revanced-builder/blob/898bb48d590ef50cf265e10a27d62f7501cb583e/wsEvents/patchApp.js#L27

GieltjE commented 1 year ago

@Egglestron

This doesn't work for me, always get a conflict.

shrihankp commented 1 year ago

Closed via c2707da6996a7b7f3a172a31e6888660a8f839f4