oxyroid / M3UAndroid

FOSS Player, which made of jetpack compose. Android 8.0 and above supported.
https://t.me/m3u_android
Apache License 2.0
229 stars 25 forks source link

F-Droid can't build #75

Closed licaon-kter closed 4 months ago

licaon-kter commented 4 months ago

ref: https://gitlab.com/fdroid/fdroiddata/-/jobs/5928486717#L1100

/LE: fyi https://gitlab.com/fdroid/fdroiddata/-/commit/104c2ec47f9d159c18bef8ead0a1b4e98a34deb8

linsui commented 4 months ago

diff.html.zip

oxyroid commented 4 months ago

@linsui @licaon-kter What's the meaning? I can't understand, what should I do?

licaon-kter commented 4 months ago

@realOxy was this apk https://github.com/realOxy/M3UAndroid/releases/tag/v1.14.0-alpha06 really built from https://github.com/realOxy/M3UAndroid/commit/9d6211a9d7bf4dc5e0afee8e954b03344aca3b5a ?

If so... maybe try to rebuild it from command line, but first clean up any caches. Put the APK here or there and ping us to retest

oxyroid commented 4 months ago

@licaon-kter oh sorry, let me push all local commits and release a new version now.

oxyroid commented 4 months ago

@realOxy was this apk https://github.com/realOxy/M3UAndroid/releases/tag/v1.14.0-alpha06 really built from 9d6211a ?

If so... maybe try to rebuild it from command line, but first clean up any caches. Put the APK here or there and ping us to retest

Hi, I have released a new one. Based latest commit.

oxyroid commented 4 months ago

@licaon-kter Do I need to close this issue before ci can be re-executed?

licaon-kter commented 4 months ago

We'll retest and close if confirmed

licaon-kter commented 4 months ago

still fails https://gitlab.com/fdroid/fdroiddata/-/jobs/5936278922#L1104

oxyroid commented 4 months ago

still fails https://gitlab.com/fdroid/fdroiddata/-/jobs/5936278922#L1104

How can I look for their difference

licaon-kter commented 4 months ago

The APK is in right sidebar Browse -> tmp -> https://gitlab.com/fdroid/fdroiddata/-/jobs/5936278922/artifacts/file/tmp/com.m3u.androidApp_92.apk

licaon-kter commented 4 months ago

diff log: m3u92.log

All those const sound like https://gitlab.com/fdroid/fdroiddata/-/issues/3138

oxyroid commented 4 months ago

@licaon-kter It means I should build it in compose compiler 1.5.6 ? πŸ€” https://github.com/realOxy/M3UAndroid/blob/93a55c1a0e7f21ca11bf3e5c6e9b63f221323d0c/gradle/libs.versions.toml#L40

licaon-kter commented 4 months ago

If you can build an APK with that we could test

oxyroid commented 4 months ago

@licaon-kter released: https://github.com/realOxy/M3UAndroid/releases/tag/v1.14.0-alpha08

linsui commented 4 months ago

Since M3U 1.13.6 already uses complier 1.5.7, that shouldn't be the problem.

oxyroid commented 4 months ago

Since M3U 1.13.6 already uses complier 1.5.7, that shouldn't be the problem.

This software has never been successfully uploaded to f-droid before. Were the previous builds not affected by the compose compiler?

linsui commented 4 months ago

1.13.6 is the first version which is just published.

oxyroid commented 4 months ago

1.13.6 is the first version which is just published.

Oh, sorry. I just noticed this

licaon-kter commented 4 months ago

building 1.14.0-alpha09 locally now

licaon-kter commented 4 months ago

diff log :(

m3u941.log

oxyroid commented 4 months ago

@licaon-kter why...

linsui commented 4 months ago

Is your apk built with GitHub Action?

oxyroid commented 4 months ago

Is your apk built with GitHub Action?

No, I built them in my own Mac, the GitHub action is merged from other contributors. It may be useless to repository or not(I am not sure😭). I have not studied GitHub action :(

linsui commented 4 months ago

Currently it builds the debug apk. Maybe we can try building the release apk with it and compare it with the fdroid apk. https://github.com/realOxy/M3UAndroid/blob/master/.github/workflows/android.yml#L27

oxyroid commented 4 months ago

Currently it builds the debug apk. Maybe we can try building the release apk with it and compare it with the fdroid apk. https://github.com/realOxy/M3UAndroid/blob/master/.github/workflows/android.yml#L27

Does it means I should change it to androidApp:assembleRelease ?

oxyroid commented 4 months ago

Do I need to publish a new release after changing it?

linsui commented 4 months ago

Does it means I should change it to androidApp:assembleRelease ?

Yes.

Do I need to publish a new release after changing it?

No, we just need to check the apk.

oxyroid commented 4 months ago

@linsui Hi, I have pushed it. Yesterday I merged a PR which has an android resource file changed and a fastlane metadata file changed, I just revert the android resource commit.

linsui commented 4 months ago

Your apk is in https://github.com/realOxy/M3UAndroid/actions/runs/7551132575/artifacts/1174212234. Our apk is in https://gitlab.com/linsui/fdroiddata/-/jobs/5945007947/artifacts/file/tmp/com.m3u.androidApp_94.apk. They have lots of diff. Weird...

oxyroid commented 4 months ago

@linsui What compare tool you used

image

I compared them in android studio

licaon-kter commented 4 months ago

Use apktool to disassemble each APK first, remove META-INF, original and apktool.yml, then use diff -ru or better yet diffoscope between the folders.

Or just feed the APKs to the diffoscope site :)

oxyroid commented 4 months ago

Hi, I use apktool d, remove META-INF, original and apktool.yml, and use pkgdiff -d. Get this result:

pkgdiff_reports.zip

licaon-kter commented 4 months ago

which apks did you compare? links pls

oxyroid commented 4 months ago

left: https://github.com/realOxy/M3UAndroid/actions/runs/7551132575/artifacts/1174212234 right: https://gitlab.com/linsui/fdroiddata/-/jobs/5945007947/artifacts/file/tmp/com.m3u.androidApp_94.apk

licaon-kter commented 4 months ago

Yup confirmed the same difference locally

β”‚ β”‚   --- m3u_94_githubci/unknown/kotlin-tooling-metadata.json
β”‚ β”œβ”€β”€ +++ com.m3u.androidApp_94/unknown/kotlin-tooling-metadata.json
β”‚ β”‚ β”‚ +    "buildSystemVersion": "8.4",
β”‚ β”‚ β”‚ -    "buildSystemVersion": "8.5",

so you are close :)

Also... makes us think about why your Mac is outputting un-repro builds :(

oxyroid commented 4 months ago

I build the apk by android studio -> build -> generate signed APK -> choose release build variant. Is this right?

licaon-kter commented 4 months ago

Should be okay too, now you need to hunt for that difference, buildSystemVersion

oxyroid commented 4 months ago

buildSystemVersion is a cli command? I cannot execute it. My Mac is MBA M2 Sonoma 14.2.1

oxyroid commented 4 months ago

Oh sorry, It is Gradle. I forgot

oxyroid commented 4 months ago

Now I re-compare diff between the f-droid generated APK and Mac generated APK.

pkgdiff_reports.f-d_to_local.zip It seems only has one diff. https://en.wikipedia.org/wiki/.DS_Store

licaon-kter commented 4 months ago

Which links?

oxyroid commented 4 months ago

Which links?

left: https://gitlab.com/linsui/fdroiddata/-/jobs/5945007947/artifacts/file/tmp/com.m3u.androidApp_94.apk right: Same commit in my Mac

I just push a new ci commit, maybe can solve the Gradle version mistake. We should restart ci and then check them again.

oxyroid commented 4 months ago

hmmmm, failed..

licaon-kter commented 4 months ago

right: Same commit in my Mac

you mean https://github.com/realOxy/M3UAndroid/releases/tag/v1.14.0-alpha09 this one published 19h ago?

linsui commented 4 months ago

hmmmm, failed..

I guess you should run ./gradlew

oxyroid commented 4 months ago

right: Same commit in my Mac

you mean https://github.com/realOxy/M3UAndroid/releases/tag/v1.14.0-alpha09 this one published 19h ago?

I am not sure, but Now I get their Md5, They are different. Are they should has some md5?

oxyroid commented 4 months ago

hmmmm, failed..

I guess you should run ./gradlew

OK, let me try.

oxyroid commented 4 months ago

@linsui CI now passed. Should I publish a new version?

licaon-kter commented 4 months ago

@realOxy just say which commit and post a link to the APK so we can test

oxyroid commented 4 months ago

@licaon-kter Based on latest commit: https://tmpfiles.org/3893637/androidapp-release.apk