j-hc / revanced-magisk-module

Extensive ReVanced builder. Builds both modules and APKs. Updated daily.
https://t.me/rvc_magisk
GNU General Public License v3.0
4.18k stars 795 forks source link

Issue with most recent commit #510

Closed E85Addict closed 1 month ago

E85Addict commented 1 month ago

I think everything on the config_update function is perfectly fine, but it seems the the changes in get_rv_prebuilts have caused an issue which duplicates again, causing the "./build.sh config.toml --config-update" command in the CI to trigger a new build because of it.

I ran the main branch of the repo unchanged and this is what the build.md puts out.

Music (arm-v7a): 7.20.51  
Music (arm64-v8a): 7.20.51  
Music-Extended (arm64-v8a): 7.16.53  
Twitter: 10.60.0-release.0  
YouTube: 19.16.39  
YouTube-Extended: 19.16.39  
TikTok: 36.5.4  
Twitch: 16.9.1  

Install [Microg](https://github.com/ReVanced/GmsCore/releases) for non-root YouTube and YT Music APKs  
Use [zygisk-detach](https://github.com/j-hc/zygisk-detach) to detach root ReVanced YouTube and YT Music from Play Store  

[revanced-magisk-module](https://github.com/j-hc/revanced-magisk-module)

CLI: inotia00/revanced-cli-4.6.1-all.jar  
Integrations: inotia00/revanced-integrations-1.14.1.apk  
Patches: inotia00/revanced-patches-4.14.1.jar  
[Changelog](https://github.com/inotia00/revanced-patches/releases/tag/v4.14.1)

CLI: inotia00/revanced-cli-4.6.1-all.jar  
Integrations: inotia00/revanced-integrations-1.14.1.apk  
Patches: inotia00/revanced-patches-4.14.1.jar  
CLI: inotia00/revanced-cli-4.6.1-all.jar  
Integrations: inotia00/revanced-integrations-1.14.1.apk  
Patches: inotia00/revanced-patches-4.14.1.jar  
CLI: j-hc/revanced-cli-4.6.0-all.jar  
Integrations: ReVanced/revanced-integrations-1.14.2.apk  
Patches: ReVanced/revanced-patches-4.15.0.jar  
[Changelog](https://github.com/ReVanced/revanced-patches/releases/tag/v4.15.0)

CLI: j-hc/revanced-cli-4.6.0-all.jar  
Integrations: ReVanced/revanced-integrations-1.14.2.apk  
Patches: ReVanced/revanced-patches-4.15.0.jar  
CLI: j-hc/revanced-cli-4.6.0-all.jar  
Integrations: ReVanced/revanced-integrations-1.14.2.apk  
Patches: ReVanced/revanced-patches-4.15.0.jar  
CLI: j-hc/revanced-cli-4.6.0-all.jar  
Integrations: ReVanced/revanced-integrations-1.14.2.apk  
Patches: ReVanced/revanced-patches-4.15.0.jar  
CLI: j-hc/revanced-cli-4.6.0-all.jar  
Integrations: ReVanced/revanced-integrations-1.14.2.apk  
Patches: ReVanced/revanced-patches-4.15.0.jar    
j-hc commented 1 month ago

cant reproduce

E85Addict commented 1 month ago

cant reproduce

I recorded myself reproducing the issue. https://www.youtube.com/watch?v=uSzmXQ9m2kI

j-hc commented 1 month ago

need to see it on a public repo. still cant reproduce

E85Addict commented 1 month ago

need to see it on a public repo. still cant reproduce

I ran it on a personal public repo and the issue does not happen there. I guess it is only an issue when ran locally on my machine. I'd imagine the reason for this is because locally the nproc would use all my cores and threads vs the github actions being limited. I will try using the parallel-jobs variable local to see if that would technically fix the issue.

E85Addict commented 1 month ago

need to see it on a public repo. still cant reproduce

I ran it on a personal public repo and the issue does not happen there. I guess it is only an issue when ran locally on my machine. I'd imagine the reason for this is because locally the nproc would use all my cores and threads vs the github actions being limited. I will try using the parallel-jobs variable local to see if that would technically fix the issue.

Yeah, don't think that's it either, might just be a weird issue on my end. Locally it has the issue but not on the repo my mistake.

j-hc commented 1 month ago

nproc would use all my cores and threads

revanced prebuilts are not downloaded in parallel irregardless of the parallel-jobs option. if you can debug out the issue, lmk.

E85Addict commented 1 month ago

nproc would use all my cores and threads

revanced prebuilts are not downloaded in parallel irregardless of the parallel-jobs option. if you can debug out the issue, lmk.

With the latest "fixes" commit, building locally fails inotia00 builds but fixes the duplicating. I noticed if I move this if statement line 83-85 to after this line 70 it completely fixes all issues locally.

This is what occurs locally before the said changes

e85addict@AMD-PC:~$ cd dev/;git clone https://github.com/j-hc/revanced-magisk-module;cd revanced-magisk-module/; ./build.sh
Cloning into 'revanced-magisk-module'...
remote: Enumerating objects: 3672, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 3672 (delta 34), reused 29 (delta 14), pack-reused 3615 (from 1)
Receiving objects: 100% (3672/3672), 19.80 MiB | 39.14 MiB/s, done.
Resolving deltas: 100% (2033/2033), done.
./build.sh: line 53: "$TEMP_DIR"/*-rv/changelog.md: ambiguous redirect
[+] Getting 'revanced-magisk/bin/arm64/cmpr' from 'https://github.com/j-hc/cmpr/releases/latest/download/cmpr-arm64-v8a'
2024-09-29 18:42:50 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/523507553/0603abb6-fceb-4d58-992e-2f411d0e4918?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014248Z&X-Amz-Expires=300&X-Amz-Signature=1d4dffafa76754f613d1e5249dd05f138b99f4f9bef7310040514f877c6bd46b&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dcmpr-arm64-v8a&response-content-type=application%2Foctet-stream [8192/8192] -> "revanced-magisk/bin/arm64/tmp.cmpr" [1]
[+] Getting 'revanced-magisk/bin/arm/cmpr' from 'https://github.com/j-hc/cmpr/releases/latest/download/cmpr-armeabi-v7a'
2024-09-29 18:42:50 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/523507553/ab385644-5990-4cc8-96b0-13dbdc1b57a1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014250Z&X-Amz-Expires=300&X-Amz-Signature=1801c5da88ca69ebf0d0b3f9ec9d91655a17e92129ebbaf0bffb047e85d57a36&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dcmpr-armeabi-v7a&response-content-type=application%2Foctet-stream [5832/5832] -> "revanced-magisk/bin/arm/tmp.cmpr" [1]
[+] Getting 'revanced-magisk/bin/x86/cmpr' from 'https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86'
2024-09-29 18:42:51 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/523507553/224abd4d-6bce-4a26-b858-2ccd3ec8be4d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014251Z&X-Amz-Expires=300&X-Amz-Signature=abe5c127d67199fa5eb1e6e80941b11785692a40a749da2561edeb0743a1dcd8&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dcmpr-x86&response-content-type=application%2Foctet-stream [7104/7104] -> "revanced-magisk/bin/x86/tmp.cmpr" [1]
[+] Getting 'revanced-magisk/bin/x64/cmpr' from 'https://github.com/j-hc/cmpr/releases/latest/download/cmpr-x86_64'
2024-09-29 18:42:53 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/523507553/76d66c5d-4084-4d22-ad9f-b05a21cbc135?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014252Z&X-Amz-Expires=300&X-Amz-Signature=71065aef351b3086040c6059d7c86341e976393c883d5c5a0cdcbca18c783b1b&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dcmpr-x86_64&response-content-type=application%2Foctet-stream [7824/7824] -> "revanced-magisk/bin/x64/tmp.cmpr" [1]
[+] Getting prebuilts (ReVanced)
2024-09-29 18:42:53 URL:https://api.github.com/repos/j-hc/revanced-cli/releases/latest [3684/3684] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/j-hc-rv/revanced-cli-4.6.0-all.jar' from 'https://api.github.com/repos/j-hc/revanced-cli/releases/assets/159960172'
2024-09-29 18:42:56 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/531294240/527ba4ab-0de3-4b6d-a543-1e5d6b123734?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014254Z&X-Amz-Expires=300&X-Amz-Signature=3501bc9bef89abc90a39387b26336350e3360ad782f2c399cf0c57457ce976ee&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Drevanced-cli-4.6.0-all.jar&response-content-type=application%2Foctet-stream [50857113/50857113] -> "/home/e85addict/dev/revanced-magisk-module/temp/j-hc-rv/tmp.revanced-cli-4.6.0-all.jar" [1]
2024-09-29 18:42:56 URL:https://api.github.com/repos/ReVanced/revanced-integrations/releases/latest [6609/6609] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/revanced-integrations-1.14.2.apk' from 'https://api.github.com/repos/ReVanced/revanced-integrations/releases/assets/194377576'
2024-09-29 18:42:57 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/470324030/8df9c2d6-656a-4f69-9ee3-b3518e151ea2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014256Z&X-Amz-Expires=300&X-Amz-Signature=b956135440c14eaa4ba03a4454bf59c24cc0c833cd2073984a36fcb76871e205&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Drevanced-integrations-1.14.2.apk&response-content-type=application%2Fvnd.android.package-archive [278872/278872] -> "/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/tmp.revanced-integrations-1.14.2.apk" [1]
2024-09-29 18:42:58 URL:https://api.github.com/repos/ReVanced/revanced-patches/releases/latest [8545/8545] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/revanced-patches-4.15.0.jar' from 'https://api.github.com/repos/ReVanced/revanced-patches/releases/assets/194377342'
2024-09-29 18:42:59 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/731390704/28fe23b5-b817-4a76-8403-c7d1479ea6a0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014258Z&X-Amz-Expires=300&X-Amz-Signature=2d773a44bbdf898e5184aa1346281e5b3c1f0b0338599cbfaf92f111d19050d6&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Drevanced-patches-4.15.0.jar&response-content-type=application%2Foctet-stream [3165163/3165163] -> "/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/tmp.revanced-patches-4.15.0.jar" [1]
2024-09-29 18:42:59 URL:https://api.github.com/repos/ReVanced/revanced-patches/releases/latest [8545/8545] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/patches-v4.15.0.json' from 'https://api.github.com/repos/ReVanced/revanced-patches/releases/assets/194377340'
2024-09-29 18:43:00 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/731390704/38c32e2b-9b4e-4662-b1c0-12f8743af8b1?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240930%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240930T014259Z&X-Amz-Expires=300&X-Amz-Signature=c961c99846317cd07810819dea0aded78f8aa3f8e7759796f52e2525adb401f4&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dpatches.json&response-content-type=application%2Foctet-stream [85828/85828] -> "/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/tmp.patches-v4.15.0.json" [1]
[+] Getting prebuilts (ReVanced)
[-] ABORT: wrong ver
[-] ABORT: could not download rv prebuilts
::error::utils.sh [-] ABORT: could not download rv prebuilts

Also this error comes up after being added in commit "fixes" "./build.sh: line 53: "$TEMP_DIR"/*-rv/changelog.md: ambiguous redirect"

E85Addict commented 1 month ago

Also tested that change on a public repo, works perfectly. Here is the run https://github.com/E85Addicts/revanced-magisk-module/actions/runs/11097032800

So this change works as intended in both a public repo, and locally with no issues.

j-hc commented 1 month ago

Also tested that change

this does not make sense. you are grepping in $file when its empty.

E85Addict commented 1 month ago

Also tested that change

this does not make sense. you are grepping in $file when its empty.

Understandable, it's just odd that building locally, it fixes the issue.

Using your repo as is, this is exactly the error it spits and it hangs on building anything from inotia00


[-] ABORT: wrong ver
[-] ABORT: could not download rv prebuilts
::error::utils.sh [-] ABORT: could not download rv prebuilts
E85Addict commented 1 month ago

With the latest commits, this is the new error, and it just hangs here.

e85addict@AMD-PC:~/dev/revanced-magisk-module$ ./build.sh
[+] Getting prebuilts (ReVanced)
2024-10-05 16:09:44 URL:https://api.github.com/repos/j-hc/revanced-cli/releases/latest [3684/3684] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/j-hc-rv/revanced-cli-4.6.0-all.jar' from 'https://api.github.com/repos/j-hc/revanced-cli/releases/assets/159960172'
2024-10-05 16:09:45 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/531294240/527ba4ab-0de3-4b6d-a543-1e5d6b123734?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241005%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241005T230945Z&X-Amz-Expires=300&X-Amz-Signature=ff8a53579e1679f4f4b500fd07fe1d18a69190b7089a5ab511d2f208b81fcfdf&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Drevanced-cli-4.6.0-all.jar&response-content-type=application%2Foctet-stream [50857113/50857113] -> "/home/e85addict/dev/revanced-magisk-module/temp/j-hc-rv/tmp.revanced-cli-4.6.0-all.jar" [1]
2024-10-05 16:09:46 URL:https://api.github.com/repos/ReVanced/revanced-integrations/releases/latest [6760/6760] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/revanced-integrations-1.15.0.apk' from 'https://api.github.com/repos/ReVanced/revanced-integrations/releases/assets/195953872'
2024-10-05 16:09:48 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/470324030/11ac79d6-ed34-45d7-9939-aeb09611e32d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241005%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241005T230948Z&X-Amz-Expires=300&X-Amz-Signature=83f970b34a2707ce7bc2ec435dcd35972722b328de7c5edc60de9e7b5dff66bb&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Drevanced-integrations-1.15.0.apk&response-content-type=application%2Fvnd.android.package-archive [280320/280320] -> "/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/tmp.revanced-integrations-1.15.0.apk" [1]
2024-10-05 16:09:48 URL:https://api.github.com/repos/ReVanced/revanced-patches/releases/latest [9904/9904] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/revanced-patches-4.16.0.jar' from 'https://api.github.com/repos/ReVanced/revanced-patches/releases/assets/195950676'
2024-10-05 16:09:50 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/731390704/7d3fa8a2-b9c4-43c5-acdc-bba7ccd51409?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241005%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241005T230950Z&X-Amz-Expires=300&X-Amz-Signature=f53e17e1448a879975a04f67992218c7875304c3b96b8e09638f15ad20fa57ff&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Drevanced-patches-4.16.0.jar&response-content-type=application%2Foctet-stream [3185307/3185307] -> "/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/tmp.revanced-patches-4.16.0.jar" [1]
2024-10-05 16:09:51 URL:https://api.github.com/repos/ReVanced/revanced-patches/releases/latest [9904/9904] -> "-" [1]
[+] Getting '/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/patches-v4.16.0.json' from 'https://api.github.com/repos/ReVanced/revanced-patches/releases/assets/195950673'
2024-10-05 16:09:52 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/731390704/796a24a3-5422-4b8e-b8b9-6c0f497daea5?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241005%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241005T230952Z&X-Amz-Expires=300&X-Amz-Signature=500b414b3da3f02c3097919a8bde76bdf0bfcf315ced62f0c92c464f7935c4c4&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dpatches.json&response-content-type=application%2Foctet-stream [86519/86519] -> "/home/e85addict/dev/revanced-magisk-module/temp/revanced-rv/tmp.patches-v4.16.0.json" [1]
[+] Getting prebuilts (ReVanced)
[-] ABORT: filter fail: '/home/e85addict/dev/revanced-magisk-module/temp/j-hc-rv/revanced-cli-4.6.0-all.jar' with 'latest'
[-] ABORT: could not download rv prebuilts
::error::utils.sh [-] ABORT: could not download rv prebuilts

e85addict@AMD-PC:~/dev/revanced-magisk-module$ 2024-10-05 16:09:54 URL:https://dn790002.ca.archive.org/0/items/jhc-apks/apks/com.google.android.youtube/ [659] -> "-" [1]
[+] Choosing version '19.16.39' for YouTube
[+] Downloading 'YouTube' from archive

It's really odd that this only happens building locally, seems like building on Github Actions it's completely fine.

j-hc commented 1 month ago

fixed 01c85cb

E85Addict commented 1 month ago

fixed 01c85cb

Amazing work, all is working well now!